cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <...@onclave.com>
Subject Text elements in XSLT
Date Tue, 22 Aug 2000 05:20:06 GMT
Why does this XSL snippet return '[Level1]',
and not '[Level1 /Level1]' with the following data?

XSLT:
	<xsl:template match="prefs">
		[<xsl:value-of select="text()"/>]<br/>
		<xsl:apply-templates select="prefs"/>
	</xsl:template>


Data:
	<prefs>
		Level1
		<prefs>Level2</prefs>
		/Level1
	</prefs>

According to the XSLT spec:
"The node test text() is true for any text node. For example, child::text()
will select the text node children of the context node."

As I see it, the top level prefs should have three children: a text element
(Level1), a child element(prefs), and another text element (/Level1).

Help would be appreciated,
Per.


Mime
View raw message