The Custom XHTML 1.0 Strict DTD.

Accessible Theme Preference:

About Accessible Themes.

Purpose of the Content.

This is a test page for a modified XHTML 1.0 Strict DTD. It is a custom DTD hosted on Boinkin Chipmunks that has been adjusted to include the embed tag and supports Apple's Quick Time and Real Network's Real Player. The DTD, also, supports the target attribute.

With the recent removal of Microsoft's “Click to Activate” multimedia function within Internet Explorer, Microsoft's Knowledge Base Article 945007 [EXT], support for the Adobe Flash Player has been added to the DTD.

The DTD Declaration is:

<!DOCTYPE html PUBLIC "-//BoinkinChipmunks//DTD XHTML 1.0 Strict Enhanced//EN"
"http://www.boinkinchipmunks.com/dtd/modified/xhtml1-strict-modified.dtd">

The Logic behind this Custom DTD.

This custom DTD was developed to overcome issues with validation of code and to allow for an efficient method of including multimedia content within a Web page.

All modern graphic browsers recognize the embed tag for use with multimedia content. However, this tag has been deprecated by the W3C in favor of the object tag. Use of the embed tag will produce validation errors when a W3C strict DTD is declared.

Various JavaScript techniques are used on many Web sites to overcome the problems with W3C validation when multimedia content is included on a Web page. JavaScript, in my view, is overused, has produced a plethora of security issues and presents problems for Web visitors who have JavaScript disabled. Whenever a more direct method is available that performs the same function as a JavaScript function, I will always use the more direct method.

Since by definition of XHTML in that it is defined as being extensible, development of a custom XHTML strict DTD, that included the embed tag and that would validate, made sense.

Issues with the embed Tag.

Accessibility standards state that whenever the embed tag is used, it should also include the noembed tag. I am exploring the logic and practical reasons to include the noembed tag within the custom DTD. I may not add the noembed tag to this custom DTD. Instead, I may use a separate link, as I have done on this page, that allows anyone to use the media player of their choice to play the multimedia content. The logic is that any visitor should be able to play multimedia content in the viewer of their choice. This technique is a convenient method to allow for that choice.

Use of this separate link method serves the same purpose as the noembed tag for accessibility and expands its benefit to any user of the content. The drawback to this method is that accessibility machine validation will report an error for lack of use of the noembed tag. The bulk of accessibility validation falls upon human review including any discrepancies reported via machine validation. Any machine validation errors should be listed within the accessibility policy of the Web site.

Use of the target Attribute.

I included the target attribute for the same general reasons that the embed tag was included.

There are instances when a judicious use of the target attribute makes sense, e.g. whenever comparison of content from one page to another is helpful or necessary for the Web visitor.

Whenever a page opens into a new window, the link needs to inform the user that such will occur.

This is a test link of the target attribute:   Keyboard Shortcut Keys for Boinkin Chipmunks [Opens in a New Window].


Issues Encountered Developing the Custom DTD.

During the development of this custom DTD, several issues were encountered. I undoubtedly believe that other developers may not have encountered these same problems if given the same task. Problems, more often than not, are minimized based upon objective, structures taken to achieve the objective, knowledge and level of skill.

XML Parsing Errors.

Initial development of the DTD produced errors in both Firefox and Safari. During parsing of the Web page, errors of the following were produced: XML Parsing Error: undefined entity.

The special entities are those entities coded as alpha characters [HTML entities] for such things as non–breaking spaces or the short hyphen, e.g., &nbsp; and &ndash;.

Normally, Web browsers load these entities automatically for HTML documents even with an omitted DOCTYPE declaration. Firefox and Safari, however, appear to load these entities only for known W3C Document Types and not for custom document types. Firefox, for example, will render the content as XML instead of XHTML.

There are two solutions to this parsing problem. One is to embed the W3C entities directly into the custom DTD [since Firefox does not read the DTD, this will not solve the problem] or, preferably, discontinue the use of HTML entities and code them as numeric Unicode [Numeric Character References, NCR] values.

Be careful of using non–standard values of 128 through 159. Use their four character replacements, instead.

For myself, this is a difficult transition since, for years, I have coded special characters using their HTML Friendly equivalent. HTML Special Characters [EXT] is extremely handy and worth a hard copy printout.

Most HTML named entities will, also, cause problems within any XML document.

Be sure to preface the DTD with the proper encoding: encoding="utf-8". The entire DTD code with the XML declaration should be as follows:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//BoinkinChipmunks//DTD XHTML 1.0 Strict Enhanced//EN"
"http://www.boinkinchipmunks.com/dtd/modified/xhtml1-strict-modified.dtd">

Use of the meta tag to specify content MIME type is not necessary. This particular DTD will be delivered with a content MIME as application/xhtml+xml in supported browsers. The exception will be ASP.NET when content is delivered globally with a MIME type of text/html.

ASP.NET Errors and Adjustments.

Using the ASP.NET 2.0 framework may cause several unique issues when a custom XHTML 1.0 Strict DTD is used.

XML Name–Space.

Be sure to include the proper XML name–space with the code, e.g.:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">

CSS Friendly Control Adapters.

The CSS Friendly Control Adapters are a set of modified ASP.NET adapters that produce non–table based CSS layouts. These control adapters include a JavaScript function whenever the target attribute is specified. When this modified XHTML 1.0 DTD is used, the Web Control Adapter Extender file will need modified to remove the JavaScript for the target attribute.

MIME Type Content Delivery.

This Web site uses, for the bulk of its content, a XHTML 1.1 Strict DTD. Actually, it uses a custom XHTML 1.1 Strict DTD but the same issues are present when any XHTML DTD is used, also throughout the site, within the ASP.NET framework.

Most modern browsers, except Microsoft's Internet Explorer, recognize the content MIME type of application/xhtml+xml. Any content served as a XHTML should be rendered by the browser as application/xhtml+xml.

Microsoft's NET runtime version 2.0 does not inherently deliver XHTML content with the appropriate MIME type. Instead, it delivers it as text/html.

Microsoft has provided a work–around to enable its .NET version 2.0 framework to deliver XHTML content as application/xhtml+xml to modern browsers that support the MIME type of application/xhtml+xml.

This work–around entails placing the following code within the global.asx file:

<%@ Application Language="VB" %>
<script runat="server">
Sub Application_PreSendRequestHeaders(ByVal s As Object, _
ByVal e As EventArgs)
If Array.IndexOf(Request.AcceptTypes, _
"application/xhtml+xml") > -1 Then
Response.ContentType = "application/xhtml+xml"
End If
End Sub
</script>
.

The above method forces all ASP.NET content to be rendered as application/xhtml+xml within .NET framework 2.0 in browsers that support the XHTML MIME. In all other browsers, the content is delivered as text/html.

I have not, yet, researched how the newly released .NET framework version 3.5 handles HTTP Content Type delivery.

Miscellaneous Rendering and Validation Issues.

There are two more issues that should be addressed if using XHTML DTDs within .NET framework 2.0. These apply, also, to use of custom XHTML DTDs. Please note that how these issues may have either changed or been resolved within .NET framework 3.5 are unknown by this author at the time this article was written.

Strict DTD Rendering.

The .NET framework 2.0 renders content, by default, with a transitional based format. To render content in a Strict XHTML format, the web.config file will need to be adjusted.

The following code will need to added between the system.web tags:

<xhtmlConformance mode="Strict"/>

Validation of the Code within the W3C Validation Engine.

To accommodate validation of the Web content within the W3C validation engine, the engine's specifications will need to be added to the ADD.browser file contained within the App_Browsers folder.

The following code will need to be added between the browsers tags within the ADD.browser file:

<browser id="w3cValidator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capture>
<userAgent match="^W3C_Validator/(?'version'(?'major'\d+)(?'minor'\.\d+)\w*).*" />
</capture>
<capabilities>
<capability name="browser" value="w3cValidator" />
<capability name="majorversion" value="${major}" />
<capability name="minorversion" value="${minor}" />
<capability name="version" value="${version}" />
<capability name="w3cdomversion" value="1.0" />
<capability name="xml" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
</capabilities>
</browser>

Validation of CSS within the W3C CSS Validation Service.

When the custom XHTML 1.0 DTD is used, CSS will validate locally against the W3C CSS Validation Service.

However, when attempt is made to validate the CSS using a URI [EXT – Opens in a New Window], the Validation Service throws the following error message:

The markup declarations contained or pointed to by the document type declaration must be well-formed.

The W3C CSS Validation Service Bug List references one report [EXT – Opens in a New Window] that may shed some light on this error.

While the specific issue of the XML Namespace problems were resolved by the W3C as mentioned by Olivier Thereaux's response:

I think this bug is moot now that we replaced our dual parser with tagsoup. Need to test and close.

It may have created another issue. The important word within Thereaux's response is: tagsoup. What, in this case, constitutes tagsoup as used within the W3C CSS Validation Service? I have no idea.

It may well be that the W3C CSS Validation Service when it attempts to parse CSS has constrained its parse ability on recognized W3C XHTML 1.0 DTDs. This hypothesis was tested by using both of the W3C XHTML official DTDs, Strict and Transitional, renaming them to xhtml1-strict-modified.dtd and running the URI through the CSS Validation Service. The Validation Service reported the same error.

When the following DTDs were used:

<!DOCTYPE html PUBLIC "-//BoinkinChipmunks//DTD XHTML 1.0 Strict Enhanced//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
and;

<!DOCTYPE html PUBLIC "-//BoinkinChipmunks//DTD XHTML 1.0 Strict Enhanced//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and the URIs where run through the CSS Validation Service, no error was reported and the Validation Service parsed the CSS.

I do not believe this to be a problem of any major consequence. The CSS Validation Service must accommodate a lot of various issues. Use of a custom XHTML 1.0 DTD is so infrequently used that it probably would not get addressed by the W3C if a bug report were filed. In fact, the W3C discourages use of any public custom DTD.

The important thing is that any CSS used within Web content should validate not whether the CSS Validation Service can validate CSS in rare cases.

All CSS used within Boinkin Chipmunks validates according to CSS 2.1 specification.

Other Possible Issues with Direct URI CSS Service Validation.

ASP.NET issues could be impacting direct URI CSS Validation. There are three areas: the web.config file, the global.asax file and/or a possibility of a need to add a CSS Validation Service browser parameter to the ADD.browser file.

I do not have the expertise nor the inclination to research those areas to narrow down or eliminate the possible impact on this issue.

As stated, the important thing is that the CSS code is valid according to specification.


Acknowledgment and Resources.

The entire XHTML DTD and entity package from the W3C is available for download [EXT - Opens in a New Window].

Acknowledgment is made to Joe Clark's article, “Modifying XHTML 1.0 with Old-style Embedded Objects” [EXT - Opens in a New Window], for providing the basis and information for the creation of the Boinkin Chipmunks custom XHTML 1.0 DTD.

Addendum.

I have noticed some interest in the custom DTDs that have been created for this Web site. There is some hot linking occurring to these DTDs along with some specialty JavaScript files. Hot linking is a bad practice. It can pose a significant security risk to those external sites that have hot linked external files. Besides that, it just plain discourteous and disrespectful.

If you wish to use them on your servers, e-Mail me and ask. I would strongly advise against further hot links to any content on this site.

Thank you.


Recent Modification to the DTD.

March 2008 Changes.

For better support of embedded Flash content, the following attributes have been added to the DTD:

  1. allowscriptaccess
  2. base
  3. bgcolor
  4. menu
  5. wmode

Use of the Object and Embed Tags for Including Audio Content.

It's a Dirty World, The Traveling Wilburys.

The Traveling Wilburys.

Music | A Dirty World | 1988

Traveling Wilburys | Rock

MP3 Pro | Stereo [D] Accessibility Long Description for the music.

Apple Quick Time [External] or other comparable audio browser plug–in is required for viewing.

Please use the following link to access alternate accessibility content if needed: Dirty World.

If your browser doesn't support the embedding of multimedia files, use the link of It's a Dirty World to launch the music in your preferred media player.

Use Notice.

This audio file is used to demonstrate accessibility access for music. It is presented for editorial context, only.

Validation Check of the Content Page.

Use the following link to check for validation: Check for Validation of the Web Page [EXT – Opens in a New Window].

Comments.

If you find any discrepancies or issues with my logic or what has been presented, please e-Mail:  that guy at Boinkin Chipmunks.


Skip the Keyboard Shortcut List and go to the End of the Page.

The Keyboard Shortcut List.

Shortcut Key, Two.
INTERNAL LINK: Jump to the General Page Menu.
Shortcut Key, Five.
Jump to the Copyright Notice.
Shortcut Key, Six.
Jump to the Safety Policy.
Shortcut Key, Seven.
Jump to the Privacy Policy.
Shortcut Key, Eight.
Jump to the Terms of Use.
Shortcut Key, Nine.
Jump to the Contact Page.
Shortcut Key, Zero.
Jump to the Keyboard Shortcut Links Table.
Shortcut Key, t.
INTERNAL LINK: Jump to the Top of the Page.

End of the content page.