hygene in XHTML 1.0 strict DTD
The XHTML 1.0 strict DTD as shipped with XHTML 1.0 spec
REC-xhtml1-20000126
(which also carries this revision info:
$Revision: 1.14 $
$Date: 2000/01/25 23:52:20 $)
has some hygenic problems which emit warnings during validation.
To wit, a perfectly valid document will cause it to emit these
warnings:
> onsgmls -wxml -wall -s xhtml-1.0-strict.xml
onsgmls:/usr/lib/sgml/dtd/xhtml-1.0/xhtml1-strict.dtd:97:0:W: unused parameter entity "MultiLengths"
onsgmls:/usr/lib/sgml/dtd/xhtml-1.0/xhtml1-strict.dtd:166:0:W: unused parameter entity "focus"
onsgmls:/usr/lib/sgml/dtd/xhtml-1.0/xhtml1-strict.dtd:885:0:W: unused parameter entity "CAlign"
onsgmls:/usr/lib/sgml/dtd/xhtml-1.0/xhtml1-strict.dtd:88:0:W: unused parameter entity "FrameTarget"
onsgmls:/usr/lib/sgml/dtd/xhtml-1.0/xhtml1-strict.dtd:844:0:W: unused parameter entity "TAlign"
Proposed remedy:
Apply the attached patch to the DTD, which fixes the problem (and also
actually makes the DTD a bit smaller, by actually taking advantage of
the %focus parameter entity).
Rationale:
It's disorienting to the user who is fastidious enough to check all
warnings against their document to find that the DTD itself has some
hygenic problems.
Please let me know if this information is useful -- I can go through
the rest of the XHTML 1.0 DTDs and correspondingly check and scrub
those as well.
--
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>
Index: xhtml1-strict.dtd
===================================================================
RCS file: /usr/local/cvs/debian/sgml-data/xml/xhtml-1.0/xhtml1-strict.dtd,v
retrieving revision 1.2
diff -u -u -r1.2 xhtml1-strict.dtd
--- xhtml1-strict.dtd 2000/10/02 21:34:20 1.2
+++ xhtml1-strict.dtd 2001/02/05 03:21:34
@@ -85,18 +85,12 @@
<!ENTITY % Text "CDATA">
<!-- used for titles etc. -->
-<!ENTITY % FrameTarget "NMTOKEN">
- <!-- render in this frame -->
-
<!ENTITY % Length "CDATA">
<!-- nn for pixels or nn% for percentage length -->
<!ENTITY % MultiLength "CDATA">
<!-- pixel, percentage, or relative -->
-<!ENTITY % MultiLengths "CDATA">
- <!-- comma-separated list of MultiLength -->
-
<!ENTITY % Pixels "CDATA">
<!-- integer representing length in pixels -->
@@ -499,12 +493,9 @@
hreflang %LanguageCode; #IMPLIED
rel %LinkTypes; #IMPLIED
rev %LinkTypes; #IMPLIED
- accesskey %Character; #IMPLIED
shape %Shape; "rect"
coords %Coords; #IMPLIED
- tabindex %Number; #IMPLIED
- onfocus %Script; #IMPLIED
- onblur %Script; #IMPLIED
+ %focus;
>
<!--===================== Inline Elements ================================-->
@@ -676,10 +667,7 @@
href %URI; #IMPLIED
nohref (nohref) #IMPLIED
alt %Text; #REQUIRED
- tabindex %Number; #IMPLIED
- accesskey %Character; #IMPLIED
- onfocus %Script; #IMPLIED
- onblur %Script; #IMPLIED
+ %focus;
>
<!--================ Forms ===============================================-->
@@ -731,13 +719,10 @@
src %URI; #IMPLIED
alt CDATA #IMPLIED
usemap %URI; #IMPLIED
- tabindex %Number; #IMPLIED
- accesskey %Character; #IMPLIED
- onfocus %Script; #IMPLIED
- onblur %Script; #IMPLIED
onselect %Script; #IMPLIED
onchange %Script; #IMPLIED
accept %ContentTypes; #IMPLIED
+ %focus;
>
<!ELEMENT select (optgroup|option)+> <!-- option selector -->
@@ -777,12 +762,9 @@
cols %Number; #REQUIRED
disabled (disabled) #IMPLIED
readonly (readonly) #IMPLIED
- tabindex %Number; #IMPLIED
- accesskey %Character; #IMPLIED
- onfocus %Script; #IMPLIED
- onblur %Script; #IMPLIED
onselect %Script; #IMPLIED
onchange %Script; #IMPLIED
+ %focus;
>
<!--
@@ -811,10 +793,7 @@
value CDATA #IMPLIED
type (button|submit|reset) "submit"
disabled (disabled) #IMPLIED
- tabindex %Number; #IMPLIED
- accesskey %Character; #IMPLIED
- onfocus %Script; #IMPLIED
- onblur %Script; #IMPLIED
+ %focus;
>
<!--======================= Tables =======================================-->
@@ -840,9 +819,6 @@
<!ENTITY % TRules "(none | groups | rows | cols | all)">
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
<!-- horizontal alignment attributes for cell contents
char alignment char, e.g. char=':'
@@ -881,8 +857,6 @@
cellspacing %Length; #IMPLIED
cellpadding %Length; #IMPLIED
>
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
<!ATTLIST caption
%attrs;
Reply to: