Mixing Your Own XHTML
The XHTML 1.1 DTD does not include all of the modules that are available. For instance, frames and the legacy presentational elements are deliberately omitted and cannot easily be turned on. This is the W3C’s not-so-subtle way of telling you that you shouldn’t be using these elements in the first place. If you do want to use them, you’ll need to create your own complete DTD using the individual modules you require.
To do this, you must first define the namespace URI and
prefixed names for your elements and attributes. The W3C provides a template you can adapt for this purpose
at http://www.w3.org/TR/xhtml-modularization/DTD/templates/template-qname-1.mod.
Example 7-6 demonstrates
with a DTD fragment that defines the names for the today and quoteoftheday elements that one of the
authors (Harold) uses on his web sites. The module is based on the
W3C-provided template.
<!-- ........................................................... --> <!-- CafeML Qualified Names Module ............................. --> <!-- file: cafe-qname-1.mod This is an extension of XHTML, a reformulation of HTML as a modular XML application. This DTD module is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//Elliotte Rusty Harold//ELEMENTS CafeML Qualified Names 1.0//EN" "cafe-qname-1.mod" ........................................................... --> <!-- NOTES: Using the CafeML Qualified ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access