|
Subject: [xsl] Saxon and XT both exhibit unexpected document() behaviour From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 03 Dec 2003 21:47:16 -0500 |
(1) - a directory listing showing only four files in two directories:
dir1/data.xml
dir1/ss1.xsl
dir2/data.xml
dir2/ss2.xsl (5) - ss2's call to document('../data.xml') incorrectly finds dir1/data.xml
instead of reporting that data.xml is not in the parent directoryT:\test\dir1>dir \test /s Volume in drive T is Crane Data Volume Serial Number is 0445-7502
2003-12-03 21:11 <DIR> .
2003-12-03 21:11 <DIR> ..
2003-12-03 21:13 <DIR> dir1
2003-12-03 21:13 <DIR> dir2
0 File(s) 0 bytes2003-12-03 21:13 <DIR> .
2003-12-03 21:13 <DIR> ..
2003-12-03 21:12 24 data.xml
2003-12-03 21:10 296 ss1.xsl
2 File(s) 320 bytes2003-12-03 21:13 <DIR> .
2003-12-03 21:13 <DIR> ..
2003-12-03 21:12 24 data.xml
2003-12-03 21:08 340 ss2.xsl
2 File(s) 364 bytes Total Files Listed:
4 File(s) 684 bytes
8 Dir(s) 12,797,771,776 bytes freeT:\test\dir1>type data.xml <dir>dir1\data.xml</dir> T:\test\dir1>type ..\dir2\data.xml <dir>dir2\data.xml</dir> T:\test\dir1>type ss1.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/"> <xsl:call-template name="remote"/> </xsl:template>
T:\test\dir1>type ..\dir2\ss2.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="remote">
"data.xml" from ss2: <xsl:value-of select="document('data.xml')"/>
"../data.xml" from ss2: <xsl:value-of select="document('../data.xml')"/>
</xsl:template>"data.xml" from ss2: dir2\data.xml "../data.xml" from ss2: dir1\data.xml T:\test\dir1>saxon ss1.xsl ss1.xsl
"data.xml" from ss2: dir2\data.xml "../data.xml" from ss2: dir1\data.xml T:\test\dir1>
-- Next public European delivery: 3-day XSLT/2-day XSL-FO 2004-01-?? Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details
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) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] attributes and elements, Bruce D'Arcus | Thread | Re: [xsl] Saxon and XT both exhibit, G. Ken Holman |
| Re: [xsl] TOC despair, Gustaf Liljegren | Date | Re: [xsl] Combining two nodesets, Ivan Churkin |
| Month |