Subject: Re: [xsl] concat selected text nodes From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 20 Apr 2001 23:26:24 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] concat selected text node, David Carlisle | Thread | RE: [xsl] producing xhtml using xsl, Clapham, Paul |
Re: [xsl] Ampersand for URLs, Thomas B. Passin | Date | Re: [xsl] XSLT FAQ? and really ques, Dan Diebolt |
Month |