4 ms·
XML spec: http://www.w3.org/TR/REC-xml/#sec-conformance http://www.w3.org/TR/REC-xml/#sec-conformance >Conforming XML processors fall into two classes: validat
by Groxx 16y ago
XML spec: http://www.w3.org/TR/REC-xml/#sec-conformance http://www.w3.org/TR/REC-xml/#sec-conformance
>Conforming XML processors fall into two classes: validating and non-validating.
Yup, that's a guarantee alright. A guarantee consisting of the people who wrote the parser agreeing to write DTD-parsing code. Or not. Depends on your parser.
It has a specification for validation because a specification for validating it has been written, based on agreement of the specification and implementation by the parsers, not because XML has some inherent, magical validatability quality.
edit: this is all on top of that a spec is just a spec until someone implements it. Plenty of specs have been chucked because others did something else, or have attributes which nobody implements (how many email forms accept the full RFC-compliant email set?). A spec is an abstract agreement.
- dfox 16y agoI have never seen anything that implements validating XML parser as intended by specification and is actually used in production code. Half of XML consumers I've seen in production implement namespaces in various broken ways (like depend on exact values of prefixes)
- vilya 16y agoWell-formedness is a separate issue from validation. All XML parsers are required by the spec to reject documents that aren't well formed. You can think of it as the lexical analysis rules for XML, whereas validation is the parsing (if that helps).