cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <...@onclave.com>
Subject RE: Text elements in XSLT
Date Tue, 22 Aug 2000 14:15:05 GMT
Manfred, et al,

That worked exactly as you advertised.

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

on the input:

	<prefs>
		Level1
		<prefs>Level2</prefs>
		/Level1
	</prefs>


Produces:
[Level1 /Level1]
[Level2]

But I don't understand why. The only difference is that I tried:

		[<xsl:value-of select="text()"/>]<br/>

instead of xsl:apply-templates.

I thought that the way that XPath worked, text() would select all nodes of
type text. Ah! Maybe that's the answer: maybe value-of must only one node's
value?

Per.


Mime
View raw message