This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Matchin elements in text nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Matchin elements in text nodes
- From: mika dot borner at telia dot fi
- Date: Mon, 22 Jan 2001 11:59:54 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Here it is, without the article typo:
<article>
<article_id>123456</article_id>
<main_heading>heading</main_heading>
<article_date>article date</article_date>
This is the article text part 1
<sub_heading>sub heading</sub_heading>
The article continues. This is part 2 of it
</article>
...
<xsl:template match="article">
<html>
<body>
<p>
<xsl:value-of select="text()"/>
</p>
</body>
</html>
</xsl:template>
As I said <xsl:value-of select=". "/> returns the content of all child elements.
But <xsl:value-of select="text()"/> returns nothing.
What I'm expecting is just the content of the article text node.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list