Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Relative namespace URIs

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Relative namespace URIs
  • Date: Sat, 02 Oct 2004 11:12:08 -0400

Michael Kay wrote:

As far as I can tell, XOM is rejecting source documents that use namespace
names where the namespace name is not a valid absolute URI.


You are correct.

Assuming I'm right, I can't see the justification for this.

The theoretical justification is that a document that uses relative namespace URIs does not have an information set, according to the XML Infoset specification.

The philosophical justification is that XOM prevents users from doing things they shouldn't be doing, such as using relative namespace URIs.

The practical justification is that XOM tends to notice when users accidentally swap the namespace and name arguments to various methods, instead of silently producing bad data.

Getting down to practicalities, I have hundreds of documents in a test suite
that use relative URIs as namespace names, and I can't use XOM on these
documents. I suspect they were automatically generated; they certainly
predate W3C's decision to deprecate relative namespace URIs. With
considerable effort I could convert the documents to use absolute URIs, but
this would invalidate my reference results for the tests.

The OASIS XSLT test suite, right? I was bugging the XSLT team about this a week and a half ago. They really need to fix those tests. If you'd care to add your voice to the clamor for the test suite to be updated, that would be appreciated. Up until about two months ago, their comments form was simply dumping comments into a black hole that no one ever saw, so they haven't seen any comments you sent until about August, 2004. I finally got in touch with a human to fix this, and the form should work now, but any other issues you've had with the suite have probably been unintentionally ignored unless you were in direct contact with the people on the working group.

In the meantime, if you look at the XSLTransformTest class in nu.xom.tests you'll notice that XOM essentially skips any tests that depend on relative namespace URIs.

Practically I've encountered about three cases where relative namespace URIs have been used. Two of them were test suites. I forget what the third was. Almost all the examples in the test suites were simply lazy typing. Nobody was actually trying to test whether relative namespace URIs were handled.

--
Elliotte Rusty Harold
elharo AT metalab.unc.edu




Archive powered by MHonArc 2.6.24.

Top of Page