An attribute of CDATA type can contain any character if it conforms to well formedness constraints. NMTOKEN type can contain
only letters, digits and point [ . ] , hyphen [ - ], underline [ _ ] and colon [ : ] . NMTOKENS can contain the same characters
as NMTOKEN plus whitespaces. White space consists of one or more space characters, carriage returns, line feeds, or tabs.
The attributes bbb and ccc must be always present, the attribute aaa is optional:
<!ELEMENT attributes (#PCDATA)> <!ATTLIST attributes aaa CDATA #IMPLIED bbb NMTOKEN #REQUIRED ccc NMTOKENS #REQUIRED> |
All required attributes are present and their values are of the correct type:
<!DOCTYPE tutorial SYSTEM "tutorial.dtd">
<attributes aaa="#d1" bbb="a1:12" ccc=" 3.4 div -4"/> |
All required attributes are present and their values are of the correct type:
<!DOCTYPE tutorial SYSTEM "tutorial.dtd">
<attributes bbb="a1:12" ccc="3.4 div -4"/> |
Documents with errors |
HOME
|
The character # is not permitted in attributes of type NMTOKEN and NMTOKENS:
<!DOCTYPE tutorial SYSTEM "tutorial.dtd">
<attributes aaa="#d1" bbb="#d1" ccc="#d1"/> |
The space character is forbiden in attributes of NMTOKEN type:
<!DOCTYPE tutorial SYSTEM "tutorial.dtd">
<attributes bbb="A B C" ccc="A B C"/> |