[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: No match or what...
David C explained what was happening, so to try it out I generated the following to 'demonstrate' it. xml: <?xml version="1.0" ?> <RDF> <channel>first block of text <title>(Contained block of text)</title>Second block of text</channel> </RDF> xsl: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/RDF"> <xsl:apply-templates /> </xsl:template> <xsl:template match="channel"> =================================== Output from normalize-space(text()[1]) <xsl:value-of select="normalize-space(text()[1])"/> Output from normalize-space(text()[2]) <xsl:value-of select="normalize-space(text()[2])"/> ==================================== Now output from value-of select= . <xsl:value-of select="."/> =================================== Output from normalize-space(text()) <xsl:value-of select="normalize-space(text())"/> =================================== Output from for-each select=text() <xsl:for-each select="text()"> <xsl:value-of select="."/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Result: <?xml version="1.0" encoding="utf-8"?> =================================== Output from normalize-space(text()[1]) first block of text Output from normalize-space(text()[2]) Second block of text ==================================== Now output from value-of select= . first block of text (Contained block of text)Second block of text =================================== Output from normalize-space(text()) first block of text =================================== Output from for-each select=text() first block of text Second block of text XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|