W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2016

Re: Why does xml.xsd have a DOCTYPE declaration?

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Tue, 26 Apr 2016 18:28:26 +0100
To: "Costello\, Roger L." <costello@mitre.org>
Cc: "xmlschema-dev\@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f5b8u001dqd.fsf@troutbeck.inf.ed.ac.uk>
Costello, Roger L. writes:

> Interestingly, when I view [xml.xsd] using Internet Explorer, I
> see this:

> <!DOCTYPE schema SYSTEM "XMLSchema.dtd" PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN">

What you're seeing is the output of an XSLT stylesheet, which is (or at
least was historically, I don't know if it still is) included _in the
Internet Explorer binary_ run over the xml original of xml.xsd.  That
stylesheet and/or the IE XSLT engine apparently mis-represents the
actual DOCTYPE information from xml.xsd.

> Whereas when I "view source" I see this:
>
> <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >

Correct.  It's also what you would see if you were to use curl or wget.

> When I call Xerces from a Java program to validate xml.xsd I get this
> error message:
>
> org.xml.sax.SAXParseException; systemId:file ...
>
> In fact, Xerces complains with any schema file containing the above
> DOCTYPE. Anyone have an idea on what's causing this?

No, sounds like a bug.  Works for me with rxp [1] or, indeed, Saxon.

ht

[1] https://www.ltg.ed.ac.uk/software/rxp/
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
Received on Tuesday, 26 April 2016 17:29:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:10 UTC