[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: concat selected text nodes

Subject: Re: concat selected text nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 20 Apr 2001 23:26:24 +0100
bash concat
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.