- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Tue, 21 Jan 2014 19:06:55 +0100
- To: Jirka Kosek <jirka@kosek.cz>
- Cc: xml-editor@w3.org
Regarding http://www.w3.org/TR/REC-xml/#proc-types, then it explains well on what basis to report errors: ]] [Definition: [ … snip … ] To accomplish this, validating XML processors MUST read and process the entire DTD and all external parsed entities referenced in the document. [[ Leif Halvard SIlli Leif Halvard Silli, Tue, 21 Jan 2014 18:30:39 +0100: > Jirka Kosek, Tue, 21 Jan 2014 15:17:08 +0100: >> On 19.1.2014 21:29, Leif Halvard Silli wrote: >>> Therefore, my proposal is to extract rules or guidance for what to do >>> when the DOCTYPE declaration points to no markup declaration and place >>> this into the 6th edition of XML. (Or to put it differently: define >>> what to do when the DOCTYPE lacks an internal or external DTD.) >> >> I don't think this makes sense. Whether validation is done is decided >> not by document itself, but by processor you use -- in terms of XML 1.0 >> spec you can use validating or non-validating processor. >> (http://www.w3.org/TR/REC-xml/#proc-types) >> >> If some tool triggers validating mode on encountering <!DOCTYPE> then I >> suggest appraoching developers of such tool and ask for some option that >> will allow control of such behaviour. >> >> I don't think that behaviour you describe is generic and is implied by >> statements in XML 1.0 spec. > > But they cannot report validity errors when the lack anything to > validate it against. > > The behavior of xmllint is OK: When it fails to find a DTD, it reports > that the *process* known as validation failed: “validity error : > Validation failed: no DTD found !“ (even if I think it could delete the > phrase "validity error"). > > However, I have another XML tool which, in face of the HTML5 doctype, > reports an error for every single element or attribute the document > contains. And btw, that same tool shows a behavior similar to that of > xmllint if I use the SYSTEM variant of the HTML5 doctype - <!DOCTYPE > html SYSTEM "about:legacy-compat">. > > A document that lacks DTD is simply ”not valid” > <http://www.w3.org/TR/REC-xml/#sec-prolog-dtd>. And, as not valid, > whether it has validation errors is a question that is out of the > question. > > Leif Halvard Silli
Received on Tuesday, 21 January 2014 18:07:28 UTC