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

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