[1]
document
::=
prolog
element
Misc* PS (Links on this page do not work)
Tokens & options to be recognised
[2] [3] S [26] VersionNum::= ([a-zA-Z0-9_.:] | '-')+
[81] EncName::= [A-Za-z] ([A-Za-z0-9._] | '-')*
[5] Name ::= ( Letter | '_' | ':') ( NameChar)*
[4] NameChar ::= Letter | Digit |'.'|'-'|'_'|':'| CombiningChar | Extender
[84] Letter ::= BaseChar | Ideographic
[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
[12] PubidLiteral ::= '"' PubidChar* '"' | "'" ( PubidChar - "'")* "'"
[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] |
[22]
prolog
::=
XMLDecl?
Misc* (
doctypedecl
Misc*)?
[23]
XMLDecl
::= '<?xml'
VersionInfo
EncodingDecl?
SDDecl?
S? '?>'
|
|
[24] VersionInfo ::=
'version' (' ' |"
|
|
|
|
::= S? '=' S? |
|
|
|
|
|
|
|
[80] EncodingDecl ::= S
('"' '"' | "'" "'" ) |
|
|
|
::= S? '=' S? |
|
|
|
'"' | "'" |
|
"'" ) |
|
::=
'standalone' (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) |
|
|
|
|
|
S |
S |
|
|
[27]
Misc
::=
Comment |
PI |
S
[15] (( Char '-->' |
|
Char - '-') | ('-' ( Char - '-)))* |
|
|
|
[16] PI ::= '<?'
|
|
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) |
|
S ( Char* - ( Char* '?>' Char*)))? '?>' |
|
[28]
doctypedecl
::= '<!DOCTYPE'
S
Name (
S
ExternalID)?
S? ('[' (
markupdecl |
PEReference |
S)* ']'
S?)? '>'
[ VC:
Root Element Type ]
|
|
75] ExternalID ::= 'SYSTEM' S SystemLiteral
|
|
|
|
[12] PubidLiteral ::= '"' PubidChar* '"' | "'" ( PubidChar - "'")* "'" |
|
[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") |
|
[29] markupdecl ::=
| PI | Comment |
[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
[51] Mixed ::= '(' S? '#PCDATA' ( S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'
[47] children ::= ( choice | seq) ('?' | '*' | '+')?
::= '(' S? cp ( S? '|' S? cp )* S? ')'
[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' |
[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
[53] AttDef ::= S Name S AttType S DefaultDecl
[54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID'| 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' |
|
[70] EntityDecl ::= GEDecl | PEDecl
[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
[73] EntityDef ::= EntityValue | ( ExternalID NDataDecl?)
[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
[69] PEReference ::= '%' Name ';'
[67] Reference ::= EntityRef | CharRef
[68] EntityRef ::= '&' Name ';'
[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
[76] NDataDecl ::= S 'NDATA' S Name
[72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
[74] PEDef ::= EntityValue | ExternalID |
|
[82] NotationDecl ::= '<!NOTATION' S Name S ( ExternalID | PublicID) S? '>' |
|
[16] PI ::= '<?' PITarget ( S ( Char* - ( Char* '?>' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) |
|
[15] Comment ::= '<!--' (( Char - '-') | ('-' ( Char - '-')))* '-->' |
|
[69] PEReference ::= '%'
';' Entity Declared ]
No Recursion ]
In DTD ] |
|
|
|
Entity Declared ] the Name given in the entity reference must match that in an entity declaration |
|
No Recursion ] |
|
In DTD ] |
|
|
|
[39]
element
::=
EmptyElemTag |
STag
content
ETag [ WFC:
Element Type Match ]
[ VC:
Element Valid ]
[44] S Unique Att Spec ] |
|
|
[41] Attribute ::=
|
||
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' |
||
|
|
|
[40] STag ::= '<' Name ( S Attribute)* S?
'>' |
|
|
S Attribute)* S? |
[41] Attribute ::= Name Eq AttValue |
|
'>' |
'>' |
|
[43] content ::= ( element |
CharData CDSect PI Comment |
[39] element ::= EmptyElemTag | STag content ETag |
[39] element ::= EmptyElemTag | STag content ETag |
[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) |
[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) |
|
[67] Reference ::= EntityRef | CharRef |
[67] Reference ::= EntityRef | CharRef |
|
[18] CDSect ::=
|
[19] CDStart ::= '<![CDATA[' |
|
[20] CData ::= ( Char* - ( Char* ']]>' Char*)) |
||
[21] CDEnd ::= ']]>' |
||
[16] PI ::= '<?' PITarget ( S ( Char* - ( Char* '?>' Char*)))? '?>' |
[16] PI ::= '<?' PITarget ( S ( Char* - ( Char* '?>' Char*)))? '?>' |
|
[15] Comment ::= '<!--' (( Char - '-') | ('-' ( Char - '-')))* '-->' |
[15] Comment ::= '<!--' (( Char - '-') | ('-' ( Char - '-')))* '-->' |
|
[42] ETag ::= '</' Name
S '>' |
|
|
S |
S |
|
|
|