The W3C HTML Working Group has released a Note defining XHTML 1.0 in XML Schema. "This work in progress provides informative XML schemas corresponding to the XHTML 1.0 Strict, Transitional, and Frameset DTDs. For the most part, these XML Schemas are written to imitate the structure of the XHTML 1.0 DTDs; major differences are those affecting the validation of XHTML 1.0 documents." Using XML Schema for XHTML 1.0 provides three principal benefits via-à-vis DTDs: (1) Strong datatyping and thus better validation; (2) Better expressive power for describing content models [e.g., fieldset]; (3) Better namespace support. "DTD validation and XML Schema validation are not mutually exclusive. Sometimes authors might want to use some DTD features (e.g., entities) while taking advantage of the XML Schema validation."
Bibliographic information: XHTML 1.0 in XML Schema. W3C Note 2-September-2002. Edited by Ishikawa Masayasu (W3C). Version URL: http://www.w3.org/TR/2002/NOTE-xhtml1-schema-20020902. Latest version URL: http://www.w3.org/TR/xhtml1-schema. Also in XHTML format.
How to specify an XML Schema: "Unlike DTD, which requires the use of the DOCTYPE declaration, XML Schemas are not required to be specified in the instance itself. However, when necessary, authors may specify an intended XML Schema through the schemaLocation attribute in the XML Schema instance namespace, typically added to the root element..."
Using DTD and XML Schema together: "Authors may include the xsi:schemaLocation attribute; however, those attributes are not defined in the XHTML 1.0 DTDs, so if authors wish to use DTD and XML Schema together, those attributes must be declared in the internal DTD subset..."
- XHTML 1.0 in XML Schema
- W3C XML Schema website
- XHTML 1.0 Schemas:
- HyperText Markup Language (HTML) Home Page
- Mailing List archive for 'firstname.lastname@example.org' (comments and error reports)
- Mailing List archive for 'email@example.com' (discussion)
- HTML Working Group Roadmap
- See also Modularization of XHTML in XML Schema
- See also: "XHTML and 'XML-Based' HTML Modules."
- W3C HyperText Markup Language Activity Statement
- "XML Schemas" - Main reference page.