xsl-list
[Top] [All Lists]

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

2006-07-17 14:03:01
At 2006-07-17 16:57 -0400, cknell(_at_)onebox(_dot_)com wrote:
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. I know this is a huge clue as to what I've done wrong, but I just can't see it. What have I done wrong and how do I fix it?

It looks like you are not pointing to an XML document ... or if you think you are, it is not well-formed. Check for a garbage character at the very start of the document (sometimes I end up with one when running emacs because of my type-ahead).

I hope this helps.

. . . . . . . Ken

--
Registration open for UBL training:    Montréal, Canada 2006-08-07
Also for XSL-FO/XSLT training:    Minneapolis, MN 2006-07-31/08-04
Also for UBL/XML/XSLT/XSL-FO training: Varo,Denmark 06-09-25/10-06
World-wide corporate, govt. & user group UBL, XSL, & XML training.
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


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