[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Saxon and XT both exhibit unexpected document() be

Subject: Re: Saxon and XT both exhibit unexpected document() behaviour
From: David Tolpin <dvd@xxxxxxxxxxxxxx>
Date: Mon, 8 Dec 2003 03:35:10 +0400 (AMT)
rfc 2396 42
> Both Saxon and xt have a version that is prepackaged to use the
> Microsoft JVM, and (probably) both are using the java.net.URL class to
> resolve relative URIs. So if the answer is wrong, you can probably blame
> the Microsoft JVM. 

Yes, this is a bug in Microsoft JVM. But the result described by Ken Holman is
oposite to one that can be observed if RFC 2396 were not followed. It looks
like it is a bug in Microsoft's libraries for handling file paths, not URLs.

> As others have pointed out, this comes down to a
> question of whether the JVM is handling "\" in accordance with RFC 2396.

SAXON 6.5.3 and XT both use java.net.URL to resolve paths. Recent versions
of Sun JVM parse URLs in strict accordance to RFC 2396. However, a different
usecase shows that SAXON 6.5.3 (I am sorry I didn't test XT when I had access
to a Windows machine and I cannot say for sure from the source code) displays
a different but still non-conformant behaviour.

It happens not because the library deviates from RFC 2396 (Sun JDK 1.3.1 runtime
follows it strictly) but because SAXON sets systemId of the included stylesheet
by calling createURL on the file's name, and then setSystemId on the created file.

createURL contains explicit code to re-slash the path (ExtendedInputSource.java).

Thus, it is not related to the extent Java Runtime follows RFC 2396, but is caused
by the way SAXON computes systemId of a file, namely, by forcing reslashing the path
to the UNIX way, which leads to non-conformant behaviour.

I would prefer the url's not to be reslashed on Windows platforms, as it hides
errors and complicates debugging; however, as David Carlisle has mentioned, the
client-side URL transformation is a tricky part.

David Tolpin
http://davidashen.net/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.