[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: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 23 Jan 2006 13:10:01 +0000
andrew welch 23
> 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:

I know what you meant so sorry to be a bit pedantic, but xsl:copy-of
doesn't copy "start and end tags" - the concept of start and end tags
don't exist at that point, only a node in a tree in memory.

In other words, there is a node in the source XML tree which gets
copied to result tree.  The serializer passes over this in memory tree
and writes out the single node as start and end tags in whatever is
being written to (file, socket, screen etc).

This is a common hurdle in learning XSLT - an input tree gets
transformed to a result tree, you can't insert start and end tags
because they dont exist at transform time.

cheers
andrew

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.