In: Categories » » HTML XHTML and CSS » Putting XHTML 1 Together
For now, XHTML is assembled using the parameter entities and DTD modules just described. XHTML 1.1 - Module-based XHTML includes a driver file and a customization file that handle the formal integration, as well as a set of rules for XHTML 1.1 conformance. Much of the work done in XHTML 1.1 - Module-based XHTML builds on the work performed in the other drafts, incorporating them by reference without describing what's happening.
Note The XHTML profiles provided by the W3C include SGML Open Catalog entries in addition to FPIs, but it isn't clear from the drafts whether Open Catalog entries are required or optional parts of XHTML modularization projects. For more on how to build SGML Open Catalog entries, see http://www.oasisopen. org/html/a401.htm. The Formal Public Identifier is the easiest part to create. FPIs contain four fields, separated by doubleslashes (//). The first field is always a dash, unless the resource the FPI describes is created by a formal standards organization such as ISO. (If the FPI is created by a standards organization, this field identifies the standard to which it refers.) The second field contains the name of the organization maintaining the resource. For the XHTML specification, this is W3C. For your own FPIs, it should be an identifier for your organization – possibly a domain name. The third field contains a unique name, chosen within your organization, which describes the referenced resource and includes version information as well. The final field should contain a language identifier (from the list in Appendix C). The language identifier describes the language within the resource and doesn't place any limitations on the content of documents using it. For example, the FPI for XHTML 1.1 is this:
-//W3C//DTD XHTML 1.1//EN
The first field is a dash (-) because the W3C is technically a vendor consortium, not a standards body proper. The second field contains W3C, the identifier used by the World Wide Web Consortium (W3C). The third field identifies the resource as a Document Type Definition (DTD) for XHTML 1.1. If the DTD changes for version 1.2 or 2.0, the W3C can change the version number within the FPI. Finally, EN identifies that the descriptions used in the DTD are written in English. (If the W3C provides a French translation, it might be FR. But French-language documents can refer to the English DTD without any problem.) Creating your own FPIs is easy. First (unless you work for ISO), start with a dash. Then identify your organization, followed by your project, followed by the language in which the DTDs are written. For example, if I create a profile that describes "Simon's Markup Language" version 1.0, the FPI might look like this:
-//simonstl.com//DTD SimonML 1.0//EN
Profile creators also should support a system identifier, typically a URL, where you can retrieve the DTD or other resource. Then the combination of the public and system identifiers is used in the DOCTYPE declaration by documents using the profile:
<!DOCTYPE simonML PUBLIC "-//simonstl.com//DTD SimonML 1.0//EN" "http://www.simonstl.com/xhtml/chap15/simonML.dtd">
The system identifier should refer to the driver file for the XHTML profile, just as the identifiers for XHTML 1.1 and XHTML Basic refer to their driver files. Driver files contain comments describing the module, a few entity declarations, and then an entity declaration that references and includes the customization file. After the customization file is included, the rest of the modules that make up the DTD are included using the .mod and .module parameter entities just described.
XREF It isn't clear quite how the W3C expects these files to fit into Web infrastructure. While XML processors routinely load resources like DTDs from across the Internet, that approach hasn't been used for the most part with HTML processors. Most likely, the W3C expects processors to use the FPI in the DOCTYPE declaration to figure out what they have to work with, and then apply logic specific to that document type rather than generic XML validation and processing. Because DOCTYPE declarations require a URI in addition to the FPI, however, ordinary XML processors will be capable of processing documents using the information retrieved from that URI. SGML Open Catalog entries (also provided in the XHTML specifications) provide another way for generic XML processors to interpret the FPI and retrieve the needed information.
legal notice
Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.
Useful tools and features
related articles
Overview Hypertext Markup Language (HTML) is getting an enormous and overdue cleanup. Much of HTML's early charm as browsers reached a wide audience was the ease of use created by browser tolerance for a wide variety of syntactical variations and unknown markup. Unfortunately, that charm has worn thin through years of "browser wars" and demands for new features that go beyond presenting documents. The World Wide Web Consortium (W3C) is rebuilding HTML on a new foundati...
2. HTML and XHTML Application Possibilities
Overview Shifting from HTML to XHTML requires a significant change in mindset from the design-oriented freefor- all that characterized the early years of the Web. This change in style reflects movement in the underlying architecture toward a more powerful and more controllable approach to document creation, presentation, and management. Understanding the connections between the architectural and stylistic changes may help you find more immediate benefits from XHTML –...
3. Coding Styles HTMLs Maximum Flexibility
The XHTML 1.0 specification provides a set of rules for XHTML (User Agent Conformance) that includes a rough description of how XHTML software differs from HTML software, though these rules exist mostly to bring XHTML rendering practice in line with the rules for parsing XML 1.0. XHTML also is designed to remain compatible (mostly) with the previous generation of HTML applications, so it may take a while for the transition to occur. Pure XHTML user agents (also known as XHTML processing software) aren't l...
4. XML and XHTMLs Maximum Structure
Coding Styles— XML and XHTML's Maximum Structure Overview XML parsers are far more brutal about rejecting documents they don't like than are HTML browsers. XML's clear focus on structure demands that the practices described in the previous chapter must change. However, most of those changes shouldn't cause more than minor inconveniences – at least for newly created documents. Note If reading this chapt...
5. XML and CDATA
Processing instructions XML also enables developers to pass information to the application through processing instructions (often called PIs). Processing instructions use a similar syntax to the XML declaration, although the rules for them are much less strict. Processing instructions begin with <? and end with ?>, but the developer generally dictates their contents. The first bit of text before a space appears in a PI is called the target. The target must start with a letter, unde...
6. lang Internationalization
Internationalization: xml:lang and lang Internationalization (often abbreviated i18n because 18 characters appear between the i and the n) gets a significant boost with the shift to XML primarily because of XML's use of Unicode as the underlying character model. While not every document needs to encode Chinese, Cyrillic, Arabic, and Indian characters, Unicode makes it possible for all of these forms to exist within a single document. In addition, XML and XHTML allow for the possibility of other e...
7. Anatomy of an XHTML Document
The transition from HTML to XHTML will come with a fair number of bumps. While later chapters introduce tools to help you get past those bumps – and figure out where they come from – this chapter examines what's going to change and demonstrates a few strategies for handling those changes. Along the way, we visit the ghosts of browsers past and explore problems that exist in current browsers. In turn, you discover how prepared and unprepared various tools are for XHTML. Note Som...
8. Converting to strict HTML and XHTML
Converting to strict HTML You start out by declaring your intentions to use the strict HTML 4.01 DTD by putting the appropriate DOCTYPE declaration at the head of the document: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Now the first section of the document, including the HTML opening tag and the HEAD element and its contents, is fine except for one line. The SCRIPT element no longer supports a LANGUAGE at...
9. Reading the XHTML DTDs A Guide to XML Declarations
Reading the XHTML DTDs: A Guide to XML Declarations Although the W3C has long had document type definitions (DTDs) for HTML, few developers actually use those DTDs as a foundation for learning HTML. XHTML 1.0 simplifies those DTDs with the slightly friendlier XML syntax – they previously used SGML's more complex syntax – and the increased emphasis on validation may lead developers to explore them more closely. Making good use of XHTML 1.1 requires some level of ...
