Re: Use document() function to get a reference to the
A variable holding the input document is usually simply
I'm told that generate-id(/) is not equal to generate-id(document("",/)) ... when I thought it was obvious that it should be.
So, in my XSLStyle stylesheet, when tracing through import statements trying to detect recursive references, I was unable to use the simple test above that I've written in prose.
I ended up having to store the input document's document element as follows:
<xsl:variable name="xs:input-document-element" select="document('',/)/*"/>
And only then would my generate-id() give me what I needed to detect an incorrect use of xsl:import ... without doing it that way, just using generate-id(/*), wouldn't work.
When I brought this issue up off-list, this is the response I received:
> I'm getting two different generate-id() > values for the same document's root node.
Sorry, Charles, to have misunderstood your original post.
. . . . . . . . Ken
-- Registration open for UBL training: Montrial, 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@xxxxxxxxxxxxxxxxxxxx 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format