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

Re: How to use document() of doc() function with copy

Subject: Re: How to use document() of doc() function with copy idiom, or how to access nodes of doc() tree
From: Abel Braaksma Online <abel.online@xxxxxxxxx>
Date: Tue, 25 Jul 2006 17:02:49 +0200
Re:  How to use document() of doc() function with copy
Thanks Michael, for pointing that out. This "initial template" thing is nice and looks much better than using itself as input.
Thanks Colin, for your extra explanation on "initial template". I'm all up to grips again!

I indeed overlooked this "value-of". I should've known better ;)


Michael Kay wrote:

Your problem seems to be very simple:

<xsl:value-of select="document($input-file)" />

The xsl:value-of instruction writes a text node whose value is the
string-value of the input. The string value of a document node is the
concatenation of all its text, with no hierarchic structure. You probably
want xsl:copy-of or xsl:sequence.

Note also: XSLT 2.0 does allow you to run a stylesheet with no principal
input document. Just specify a named template as the entry point. If using
the Saxon command line you do this with the "it" option, e.g. "-it main".

Michael Kay

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.