xsl-list
[Top] [All Lists]

RE: [xsl] Use document() function to get a reference to the input doc

2006-07-17 22:18:42
I wish to use the document() function to create a variable 
holding the input document. My stylesheet contains this element:

<xsl:variable name="main-doc" select="document('/')" />

When I run the transform, Saxon complains that I may not have 
any content in the prologue. 

The message comes from the XML parser, not from Saxon - Saxon is only the
messenger, and tries hard to make this clear, but people still think it's
Saxon complaining.

I *think* that this message from Xerces usually means that a file has been
successfully read, but it's not XML, or anything remotely resembling XML. In
this case I suspect that the resource with URI "/" is a directory listing,
and Xerces of course can't parse a directory listing as XML.

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>
--~--