RE: Problem with ignoring system ID of Doctype

Subject: RE: Problem with ignoring system ID of Doctype
From: Paul Grosso <pgrosso@xxxxxxxxxxxxx>
Date: Thu, 14 Sep 2000 10:09:41 -0500
At 12:17 2000 09 14 +0200, Bovone Stefano wrote:
>Paul Terray wrote:
>>We have a lot of problems with the DOCTYPE call : it seems the system ID is
>>mandatory (can someone confirm that ?). I know someone answered me about a 
>>catalog in XML, much like the library in SGML.
>
>No, DOCTYPE is not mandatory: you use it to validate an XML document, if you
>want only a well-formed XML you can not use it.

As Stefano says, the doctype declaration is optional.

But, as PaulT said, if you have a doctype decl and it references
an external subset via an ExternalID (production [75]), the
system id is mandatory.

>>Is there a standard for a parser (we use Oracle) that make it ignore the 
>>DTD and use the public ID when the system ID is not good ? Is there a 
>>standard way not to specify any system ID ? We keep our XML in a DB, and 
>>don't want to store the system ID of the editor, as it is absolute.
>
>If you declare a SYSTEM identifier and a PUBLIC identifier I think the
>parser tries to use the public before, the system after (I'm not sure ..)

No, that is generally not true, even in SGML.  There is no standard saying
which to use first.  The SGML Open/OASIS TR9401:1997 catalog resolution [1]
includes an OVERRIDE entry that can be used to say whether the SYSTEM
or PUBLIC id is preferred, but in the absence of an OVERRIDE entry,
there is no specified default, so one processor could (by default)
prefer system and another prefer public.

And all this is currently mostly moot with respect to XML, since the
XML spec did not define a catalog (unfortunately, in my opinion).  And
since the system id is required, almost all XML processors I know of
use it and general ignore the public id.

However, Java classes that implement catalogs for XML have been put
into the public domain, and I'm hopeful that more and more XML
processors out there will use them (or the equivalent) to add catalog
support for XML.  Norm's article [2] for both a good description of 
the issues and for a pointer to some Java classes that implement both 
the TR9401:1997 catalogs and XML Catalogs [3].

paul

[1] http://www.oasis-open.org/html/a401.htm
[2]
http://www.arbortext.com/Think_Tank/Norm_s_Column/Issue_Three/issue_three.html
[3] http://www.ccil.org/~cowan/XML/XCatalog.html



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


Current Thread