views:

43

answers:

2

I have the option of validating XHTML 1.1 documents against the official XHTML 1.1 DTDs (I use the plural because the "main" DTD actually includes several others) or against the official XHTML 1.1 XML Schemas.

Now I know that the XML Schema language is more expressive and powerful and can therefore check for more things. What I'm wondering is whether these "extra" features are actually in use in the official schemas. To put it differently, will validating against these schemas check for more things than validating against these DTDs?

A: 

There are many things that you can only express with a schema and than means that validating against a schema will always give you a better response about the validity of your XML file.

Kau-Boy
I'm asking about these _specific_ schemas and DTDs, _not_ in general.
Lucas
Why not simply try it out. We haven't read the complete DTD and schema. But I am very sure, that they not just copied the DTD validation rules into the schema. And as it has some datatypes in it, yes it will validate more things.
Kau-Boy
+1  A: 

It's a requirement that anything that validates using the DTD should also validate using the schema.

The conformance definition states that

The document MUST conform to the constraints expressed in Appendix C.

and Appendix C contains the DTDs. Nothing is said about conforming to the schemas which are in Appendix D. Therefore, any extra constraints from the schemas would not be binding, since documents only need to satisfy the DTDs.

(Edited)

tovare
"as far as I can tell" :)... I'm looking for a "100% yes" or a "100% no", because there is a definitive answer.
Lucas
Sorry about the hesitation, it's 99.99% ... if there's anything it's a deeply hidden artifact or sideffect somewhere.
tovare
Could we get a source for that requirement?
Lucas
It was expressed as such in a draft, now it says "This section contains the driver for the XHTML 1.1 document type implementation as an XML Schema." (Existing implementation, not the standard-prose)
tovare
I've expanded this answer since it's CV and accepted it.
Lucas