|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: concat selected text nodes
Me> from which we deduce you are using MSXML3 ? Seems like I needlesly maligned msxml here (which has a documented tendency to drop white space nodes while building its DOM input, a fearure you can turn off from script) I just tried your test file: <item>This is a<ver id="0">n old </ver> <ver id="1">new</ver> sentance.</item> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output encoding="utf-8"/> <xsl:param name="ver"/> <xsl:template match="/"> <xsl:apply-templates select="//item"/> </xsl:template> <xsl:template match="item"> <xsl:apply-templates select="text()|ver[@id=$ver]"/> </xsl:template> </xsl:stylesheet> and got the expected output: BASH.EXE-2.02$ msxsl node.xml nodes.xsl ver=0 <?xml version="1.0" encoding="utf-8"?>This is an old sentance.BASH.EXE-2.02$ BASH.EXE-2.02$ msxsl node.xml nodes.xsl ver=1 <?xml version="1.0" encoding="utf-8"?>This is a new sentance.BASH.EXE-2.02$ David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp 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
|

Cart








