[XOM-interest] Problem with "Missing scheme in absolute URI reference"

Peter Murray-Rust pm286 at cam.ac.uk
Thu Jan 1 12:30:47 EST 2009


Elliotte Harold wrote:
> Peter Murray-Rust wrote:
> 
>> I accept this (reluctantly). Could not XOM parse the standalone="yes" 
>> message and so not pass the DTD address to Xerces?). I still don't 
>> understand where the error message comes from but it must be somewhere 
>> in the DTD structure on the W3C pages. I don't understand why a DTD 
>> has to reference a namespaceURI at all and why the error is generated 
>> in the way it is. Is Xerces producing a misleading error message? And 
>> is the W3C spec in error (it validates on their pages) or does Xerces 
>> report a spurious error?
> 
> I still have to look at where that error is coming from. I agree it does 
> sound misleading.

Thanks;
> 
> The problem with standalone='yes' is that there's limited guarantee that 
> it's accurate. What is a parser/XOM supposed to do when it hits an 
> undeclared entity reference after not reading the DTD?
> 
> Also, standalone='yes' actually has a very technical meaning. In 
> practice, standalone='yes' is wrong for almost every document with a DTD:
> 
> The standalone document declaration MUST have the value "no" if any 
> external markup declarations contain declarations of:
> 
>     * attributes with default values, if elements to which these 
> attributes apply appear in the document without specifications of values 
> for these attributes, or
>     * entities (other than amp, lt, gt, apos, quot), if references to 
> those entities appear in the document, or
>     * attributes with tokenized types, where the attribute appears in 
> the document with a value such that normalization will produce a 
> different value from that which would be produced in the absence of the 
> declaration, or
>     * element types with element content, if white space occurs directly 
> within any instance of those types.
> 
> If we were redesigning XML from scratch today, I think the standalone 
> document declaration would be one of the first things to go (right after 
> the internal DTD subset).

Understood. And I agree that you/XOM have to support XML as it is, 
rather than how we would like it to be. It's because of that, that I in 
my own language (CML) I have a lightweight approach to all XML (whether 
text-oriented or data-oriented). I avoid DTDs, entities - except 
explicit numeric ones, mixed content, default values, types other than 
CDATA. Validation is  through Schematron and (for chemistry) bespoke 
code. It's probably off topic, but I could see the value of a 
lightweight subset of XML - and we had ideas of that sort back in 
1998-2000.

P.




More information about the XOM-interest mailing list