|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Unanticipated Results from text()
Signature House wrote:
No matter how many line-breaks are in the XML, or where they're placed, in IE the "normalize-space(text())" picks up the "B2" text as I expected. But FileMaker/Xalan/Xerces won't pick up the "B2" text if a line-break appears between the <BBB><CCC>. I just tried the other white-space characters (blank and tab) and the same thing happened. No white-space between the <BBB><CCC>, FM//Xalan/Xerces get the "B2", any white-space between <BBB><CCC>, FM//Xalan/Xerces doesn't get the "B2" text. The problem is that you call e.g. normalize-space(text()) so you call normalize-space on a node set of all child text nodes. That way you normalize white space in the first text node in the node set as converting the node set to a string takes the string of the first node only. I think what you want instead is e.g. <xsl:for-each select="text()"> <xsl:value-of select="normalize-space()"/> </xsl:for-each> -- Martin Honnen http://JavaScript.FAQTs.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







