cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Bayer <>
Subject [C2] bug in xsp.xsl get-nested-content
Date Tue, 01 May 2001 21:57:39 GMT

i've encountered serveral problems with prepared statements in
esql.xsl and with xsp:element. The problems have to do with the
get-nested-content and the template with the match="text() pattern in
xsp.xsl. The test: $content/* in get-nested-content is also true if
there is only one text child. To fix the problem we have to look if
there are a child other than text nodes. If you do an apply-templates on
a text node the match="text()" template is instanziated and 

this.characters("parameter for java")

is placed in a java Method like

someMethod(this.characters("parameter for java");)

An addional predicate will fix the problem:

  <xsl:template name="get-nested-content">
    <xsl:param name="content"/>
      <!-- look if there is a non text child -->
      <xsl:when test="$content/*[not(text())]">
        <xsl:apply-templates select="$content/*"/>
      <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise>

Thomas Bayer

To unsubscribe, e-mail:
For additional commands, email:

View raw message