Re: [xml-dev] XML spec and XSD

From
Mukul Gandhi <>
To
David Carlisle <>
Date
2009-11-09T03:33:59Z
ID
<>
Thread
Re: [xml-dev] XML spec and XSD
Thanks, David for the insights.

looking at the following section of XML 1.0 fifth edition
specification, http://www.w3.org/TR/2008/REC-xml-20081126/#proc-types

"Validating and Non-Validating Processors"
The spec seems to suggest that XML documents are valid only if a DTD
is associated with the XML document.
But I think, that's not entirely true given that XSD is also another
XML validation language from W3C XML activity.

I don't mind validating XML documents with other technologies like
RelaxNG or Schematron, if there is a need for me to do so. But I
think, existence of technologies like RelaxNG or Schematron cannot be
an excuse for XML spec, not to mention XSD within it as a validating
technology.

On Sun, Nov 8, 2009 at 9:01 PM, David Carlisle <> wrote:
> essentially for the same reason that XSD should not be referenced from
> the xml spec. XSD (like Relax NG, XSLT etc) all work on the infoset
> produced by parsing an XML document, thus they require an XML parser to
> provide them input, to expand entities etc.
>
> DTD processing on the other hand does not work by taking an infoset as
> input but is instead a modified parser that reports validation outcomes.
>
> XSD can not define entities as it is too late in the chain. If the
> document uses entity references that are not defined to the parser then
> the document is in error (or not well formed if there is no external DTD
> reference at all).



-- 
Regards,
Mukul Gandhi