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

Re: Unable to get text() of node

Subject: Re: Unable to get text() of node
From: Kasimier Buchcik <K.Buchcik@xxxxxxxxxxxx>
Date: Mon, 23 Jan 2006 12:51:58 +0100
Re:  Unable to get text() of node

On Mon, 2006-01-23 at 12:46 +0100, Geert Josten wrote:
> > A <xsl:copy-of select="."/> will select the concatenated text of all
> > descendant text-nodes in document-order; note the additional "don't" in
> > the result:
> > 
> > <output>"Johnny
> >     don't
> >     B.
> >     Good
> > "</output>
> No, copy-of literally copies the selected nodes. If you select text(), it copies all text child 
> nodes of the current node. If you select ., it copies the current node itself, including its start 
> and end tag and all it's descendants, resulting in:
> <output>"<foo>Johnny
>      <bar>don't</bar>
>      B.
>      <bar/>Good
> </foo>"</output>

True, I had that wrong.

> > MSXML does strip such whitespace text-nodes by _default_. So one might
> > want to use <xsl:strip-space elements="*"/> for compatibility with
> > the MSXML-XSLT engine.
> Or just use <xsl:preserve-space elements="*" /> when using MSXSL to make it comply with the other 
> parsers.. :-)

Ah, good to know - thanks!



Current Thread


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.
First Name
Last Name
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.