[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Validing parser required?




In the interest of being "cleanly and thoroughly specified", the AtomPub Working Group should decide whether consumers should be required to use validating XML parsers in order to consistently and correctly handle the Atom feed and protocol.


First, here is a relevant portion of the XML specification[1]:

For maximum reliability in interoperating between different XML
processors, applications which use non-validating processors should
not rely on any behaviors not required of such processors.
Applications which require facilities such as the use of default
attributes or internal entities which are declared in external
entities should use validating XML processors.

Now for historical benefit, the Netscape RSS 0.91 spec, revision 3 contains the following text[2]:


Files must be 100% valid XML. We're trying to move towards a more
standard format, and to this end we have included several tags from
the popular <scriptingNews> format. We have also ensured that this
version is 100% valid XML. We did this by requiring that a DOCTYPE
tag be included, and validating each RSS document against that DTD.
This means that it is not enough for an RSS document to be
"well-formed". It must also be "valid" with respect to its DTD.

The requirement for a DTD was dropped in both the UserLand 0.91 spec[3] (and has not reappeared in subsequent revisions derived from this spec), nor was is it present in the RSS 1.0 spec[4].


- - -

As I said, I would like to see Atom "cleanly and thoroughly specified". People should not be required to use a validating parser simply because the spec is silent on whether this is allowed or not, and therefore must be allowed.

One way to handle this is the way SOAP[5] does :

A SOAP message MUST NOT contain a Document Type Declaration.

That seems pretty clear, and certainly is very effective.


However, if someone is interested in crafting more surgical language which only addresses the issue of validation and does not prevent, for example, inline DTDs, I will gladly defer to them. Otherwise, I will write up a Pace to include something like the sentence above into the Atom specifications and such a Pace will eventually get scheduled and disposed of.

- Sam Ruby

[1]<http://www.w3.org/TR/2000/REC-xml-20001006#safe-behavior>
[2]<http://my.netscape.com/publish/formats/rss-spec-0.91.html>
[3]<http://backend.userland.com/rss091>
[4]<http://web.resource.org/rss/1.0/spec>
[5]<http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383492>