I may be in error, or my memory may not serve me so well, but I seem to remember that to formally express the prohibitions iin the DTD would have involved great difficultie or an extensive rewrite, so it was decided just to put a written prohibition on the inclusions. If Dave Ragget, Steve Pemberton or Murray Altheim still follow this list they may be able to correct me.Frank Boumphrey----- Original Message -----From: Benoît ChapelSent: Sunday, January 02, 2005 1:50 PMSubject: ERROR ON XHTML 1.0 DTD AND SCHEMASummary of this mail
I don't understand :
In specification, in DTD's comment, in XML Shema's comment, i can read :"premust not contain theimg,object,big,small,sub, orsupelements."
But in the DTD's formalism and XML Shema's formalism,big,small,sub, orsupelements are authorized !
Thanks for your explications.
Bonjour,
Je vous fait part d'une erreur concernant l'élément PRE.
Dans les spécifications ainsi que dans les commentaires de la DTD ou du Shema XML, il est dit que l'élément "pre" n'a pas pour contenu les éléments "big, small, sub ou sup".
Or d'après le formalisme de la DTD ou du schema XML, ces éléments "big, small, sub ou sup" sont parfaitement autorisé !
Comment cela se fait t'il ?
Est ce une erreur ou est-ce que quelque chose m'échappe ?
Merci par avance pour vos explications.
Benoit Chapel.
Extraits de la spécification http://www.w3.org/TR/xhtml1/ :
B. Element Prohibitions
This appendix is normative.
The following elements have prohibitions on which elements they can contain (see SGML Exclusions). This prohibition applies to all depths of nesting, i.e. it contains all the descendant elements.
pre- must not contain the
img,object,big,small,sub, orsupelements.
Extraits de la DTD http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd :
<!--=================== Preformatted Text ================================-->
<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
<!ELEMENT pre %pre.content;>
<!ATTLIST pre
%attrs;
xml:space (preserve) #FIXED 'preserve'
>
<!ENTITY % pre.content
"(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
| %inline.forms;)*">
<!ENTITY % fontstyle "tt | i | b | big | small ">
<!ENTITY % phrase "em | strong | dfn | code | q |
samp | kbd | var | cite | abbr | acronym | sub | sup ">
Extraits du XHTML1 Schéma http://www.w3.org/TR/xhtml1-schema/#xhtml1-strict :
<xs:annotation> <xs:documentation> =================== Preformatted Text ================================ </xs:documentation> </xs:annotation> <xs:element name="pre"> <xs:annotation> <xs:documentation> content is "Inline" excluding "img|object|big|small|sub|sup" </xs:documentation> </xs:annotation> <xs:complexType mixed="true"> <xs:complexContent> <xs:extension base="pre.content"> <xs:attributeGroup ref="attrs"/> <xs:attribute ref="xml:space" fixed="preserve"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element><xs:complexType name="pre.content" mixed="true"> <xs:annotation> <xs:documentation> pre uses "Inline" excluding big, small, sup or sup </xs:documentation> </xs:annotation> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="a"/> <xs:group ref="fontstyle"/> <xs:group ref="phrase"/> <xs:group ref="special.pre"/> <xs:group ref="misc.inline"/> <xs:group ref="inline.forms"/> </xs:choice> </xs:complexType><xs:group name="special.pre"> <xs:choice> <xs:element ref="br"/> <xs:element ref="span"/> <xs:element ref="bdo"/> <xs:element ref="map"/> </xs:choice> </xs:group> <xs:group name="special"> <xs:choice> <xs:group ref="special.pre"/> <xs:element ref="object"/> <xs:element ref="img"/> </xs:choice> </xs:group> <xs:group name="fontstyle"> <xs:choice> <xs:element ref="tt"/> <xs:element ref="i"/> <xs:element ref="b"/> <xs:element ref="big"/> <xs:element ref="small"/> </xs:choice> </xs:group> <xs:group name="phrase"> <xs:choice> <xs:element ref="em"/> <xs:element ref="strong"/> <xs:element ref="dfn"/> <xs:element ref="code"/> <xs:element ref="q"/> <xs:element ref="samp"/> <xs:element ref="kbd"/> <xs:element ref="var"/> <xs:element ref="cite"/> <xs:element ref="abbr"/> <xs:element ref="acronym"/> <xs:element ref="sub"/> <xs:element ref="sup"/> </xs:choice> </xs:group>