XHTML 1.1 and validation
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
XML validation, the subject of this tip, is extremely important for interoperability. We are looking for more, equally important, tips. You probably have some from your experience, and you can submit them easily by following this link.
On May 31, 2001, the W3C promoted the specification entitled "XHTML™ 1.1 - Module-based XHTML" to recommended status. To all intents and purposes, this makes XHTML 1.1 the latest and greatest version of XHTML, and it introduces some interesting changes. Basically, XHTML 1.1 works like XHTML 1.0 according to the Strict XHTML 1.0 DTD, except that it breaks the contents of that DTD up into 20-plus named markup modules, where each such module provides a certain set of markup and/or attributes, and attendant functionality. For more details on XHTML 1.1, see my Tip entitled "Say Hello to XHTML 1.1" dated 6/6/2001 (http://searchmiddleware.techtarget.com/tip/1,289483,sid26_gci558228,00.html).
The benefits of XHTML 1.1 primarily stem from its modular nature, in that markup can be assembled from a collection of pre-defined modules so that only markup used in a document (or set of documents) is represented in its governing DTD. In addition, this approach makes it easy to omit standard XHTML functionality (such as the Forms or Basic Forms module) in favor of newer, more powerful functionality (such as the XML XForms application) as it becomes available. This gives document designers the opportunity to keep things simple for use on cell phones, PDAs, or embedded systems, and to more easily mix and match "standard XHTML markup" with other more advanced XML capabilities. Now that I've been getting to know more about the modularization process, I'm convinced it's not only interesting, put also quite promising for those document designers who want to exploit existing markup definitions, but who may not want to develop their own custom DTDs or XML Schemas.
Unfortunately, the industry's still catching up with changes imposed by the finalization of XHTML 1.1. In plain English, the W3C validator hasn't yet caught up with XHTML 1.1, and is presently incapable of recognizing modularized XHTML documents as such. For the time being, this means that certain contortions may be necessary:
- For those bound and determined to use the W3C validator, you can still validate to the XHTML 1.0 DTD of your choice, then change the DTD reference after validation is complete. This puts the onus on individuals to make sure that by using a monolithic XHTML 1.0 DTD, they don't violate the restrictions inherent in whatever subset of XHTML 1.1 modules they actually intend to use.
- On the other hand, several 3rd-party validators already recognize XHTML 1.1, and may be used in the interim until the W3C validator catches up, including:
By hook or by crook, you can indeed find a way to make sure your XHTML 1.1 efforts, experimental, fledgling, or otherwise, are not only well-formed, but also valid!
Ed Tittel is a principal at LANWrights, Inc., a wholly owned subsidiary of LeapIt.com. LANWrights offers training, writing, and consulting services on Internet, networking, and Web topics (including XML and XHTML), plus various IT certifications (Microsoft, Sun/Java, and Prosoft/CIW).
Did you like this tip? Whether you did or not, we'd like to know. E-mail and let us know.
XHTML by Example
Author : Ann Navarro
Publisher : QUE
Published : Nov 2000
XHTML by Example explains the differences in syntax between HTML and XHTML, and the concept of 'well-formedness', which is underused in HTML but crucial and required in XHTML. Further coverage includes authoring guidelines for a smooth transition to XHTML, XML DTDs and Schemas, and how they relate to XHTML, how XHTML modularization provides content to non-traditional browsers such as Palm devices, pagers, and cell phones, adding custom XHTML modules to standard XHTML, XHTML document profiling, and plans for XHTML 1.1. The final chapters cover advanced features, including Extended Forms, XHTML Basic, and Profiling content for different types of browsers.