Official XHTML 1.1 DTDs vs. official XHTML 1.1 XML Schemas
Asked Answered
P

3

6

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?

Prelatism answered 28/8, 2010 at 10:55 Comment(0)
C
1

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)

Carbaugh answered 28/8, 2010 at 10:55 Comment(4)
"as far as I can tell" :)... I'm looking for a "100% yes" or a "100% no", because there is a definitive answer.Prelatism
Sorry about the hesitation, it's 99.99% ... if there's anything it's a deeply hidden artifact or sideffect somewhere.Carbaugh
Could we get a source for that requirement?Prelatism
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)Carbaugh
M
1

The XHTML 1.1 pages for the DTD and XML schema both state, "This appendix is normative." That means they should perform identical validation checks.

So to answer your question: No.

Mylonite answered 27/4, 2011 at 15:25 Comment(0)
P
0

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.

Portauprince answered 28/8, 2010 at 11:3 Comment(2)
I'm asking about these specific schemas and DTDs, not in general.Prelatism
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.Portauprince

© 2022 - 2024 — McMap. All rights reserved.