cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: idea for documenting xsp logicsheets
Date Wed, 26 Jul 2000 19:55:39 GMT
On Wed, 26 Jul 2000, Kevin Sonney wrote:

> On Wed, 26 Jul 2000, Donald Ball wrote:
> > assuming we could configure the xsp processor to ignore the xspdoc
> > elements (either by stripping them when doing the XSLT transform or adding
> > "strip xspdoc elements" rules to the xsp to java stylesheet), all we'd
> > need to generate concise docs is a simple stylesheet like this:
> 
> Why strip them? I would rather somrthing like :
> 
> <xspdoc:desc>Here's the JDBC Driver</xspdoc:desc>
> 
> be placed in the java code as a *REAL* comment :
> 
> /* Here's the JDBC Driver */
> 
> This would make it a little more debug freindly when I'm gutting the
> auto-generated java files tracking down an error.

cool idea, but i'm afraid that it'll be tough to do in practice so that
they're meaningful. fer instance, with the sql logicsheet:

<xsl:template match="sql:execute-query">
<xspdoc:desc>executes a sql query and returns any results</xspdoc:desc>
        <xsl:variable name="use-connection">
        <xspdoc:desc>the name of the connection pool to use</xspdoc:desc>
                <xsl:call-template name="get-nested-string">
                        <xsl:with-param
name="content" select="sql:use-connection"/>
                </xsl:call-template>
        </xsl:variable>
        ...

i do a whole slew of variable declarations in XSL before i get into doing
any work in java, so you'd end up with something like this:

/** executes a sql query and returns any results **/
/** the name of the connection pool to use **/
/** the class name of the database driver **/
{
Integer max_rows = new Integer(-1);
....
}

which isn't really helpful. well, the first line might be helpful, but the
variable descriptions aren't - those are variables in the XSLT world,
being initialized from elements in the XML source tree; they may or may
not have any relevance to java variables.

- donald


Mime
View raw message