xml:base attributes in XML test suite driver documents

I believe there are some bugs in some of the entities that make up 
xmltest.xml (the master list of all the test cases in the XML test 
suite. These are related to unnecessary xml:base attributes. Not all of 
the documents have this problem but some do. One of them (I'll send 
others as I find them) is xmlconf/xmltest/xmltest.xml. This document begins:

<?xml version="1.0" encoding="UTF-8"?>
<!--
    @(#)xmltest.xml    1.12 99/02/12
    Copyright 1998-1999 by Sun Microsystems, Inc.
    All Rights Reserved.
-->

<TESTCASES PROFILE="James Clark XMLTEST cases, 18-Nov-1998" 
xml:base="xmltest/">

The problem is the xml:base attribute. This means that this element and 
its descendants have the base URI xmlconf/xmltest/xmltest/ (or 
file:///home/whatever/xmlconf/xmltest/xmltest/ after the relative URL is 
resolved with repsect ot the local file system). That's one too many 
xmltest. Since the document is already in the xmltest directory, no 
xml:base attribute is needed.

The effect is that the relaive URLs found in the various URI attributes 
of TEST elements cannot be resolved relative to the base URI of their 
element, only with repsect to the base URI of the containing entity. 
This is not in keeping with the XML Base specification. This might not 
be noticed if the driver were written using SAX2 or DOM2 or some other 
API that does not take account of xml:base attributtes. It does become 
important when using XOM, JDOM, possibly DOM3, or other more recent APIs 
that do conider xml:base attributes when calculating the base URI.

I suggest that any such xml:base attributes be removed from the test 
suite documents.

--
Elliotte Rusty Harold

Received on Thursday, 12 February 2004 20:23:31 UTC