xsl-list
[Top] [All Lists]

Re: [xsl] How to use document() of doc() function with copy idiom, or how to access nodes of doc() tree

2006-07-25 08:03:13
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 ;)

Cheers,
Abel

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
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--