document ::= prolog element Misc* EOF prolog ::= XMLDecl? Misc* ( doctypedecl Misc* )? XMLDecl ::= '' VersionInfo ::= S 'version' Eq ( "'" VersionNum "'" | '"' VersionNum '"' ) Eq ::= S? '=' S? Misc ::= Comment | PI | S doctypedecl ::= '' DeclSep ::= PEReference | S intSubset ::= ( markupdecl | DeclSep )* markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment SDDecl ::= S 'standalone' Eq ( "'" ( 'yes' | 'no' ) "'" | '"' ( 'yes' | 'no' ) '"' ) element ::= '<' Name ( S Attribute )* S? ( '/>' | '>' content ETag ) Attribute ::= Name Eq AttValue ETag ::= '' content ::= CharData? ( ( element | Reference | CDSect | PI | Comment ) CharData? )* elementdecl ::= '' contentspec ::= 'EMPTY' | 'ANY' | Mixed | children children ::= choiceOrSeq ( '?' | '*' | '+' )? cp ::= ( Name | choiceOrSeq ) ( '?' | '*' | '+' )? choiceOrSeq ::= '(' S? cp S? ( ( '|' S? cp S? )+ | ( ',' S? cp S? )* ) ')' Mixed ::= '(' S? '#PCDATA' S? ( ( '|' S? Name S? )* ')*' | ')' ) AttlistDecl ::= '' AttDef ::= S Name S AttType S DefaultDecl AttType ::= StringType | TokenizedType | EnumeratedType StringType ::= 'CDATA' TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' EnumeratedType ::= NotationType | Enumeration NotationType ::= 'NOTATION' S '(' S? Name ( S? '|' S? Name )* S? ')' Enumeration ::= '(' S? Nmtoken ( S? '|' S? Nmtoken )* S? ')' DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | ( '#FIXED' S )? AttValue Reference ::= EntityRef | CharRef EntityRef ::= '&' Name ';' EntityDecl ::= GEDecl | PEDecl GEDecl ::= '' PEDecl ::= '' EntityDef ::= EntityValue | ExternalID NDataDecl? PEDef ::= EntityValue | ExternalID ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral NDataDecl ::= S 'NDATA' S Name EncodingDecl ::= S 'encoding' Eq ( '"' EncName '"' | "'" EncName "'" ) NotationDecl ::= '' ExternalOrPublicID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral ( S SystemLiteral )? EOF ::= $ Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] S ::= ( #x20 | #x9 | #xD | #xA )+ NameStartChar ::= ':' | [A-Z] | '_' | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] NameChar ::= NameStartChar | '-' | '.' | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] Name ::= NameStartChar NameChar* Nmtoken ::= NameChar+ EntityValue ::= '"' ( [^%&"] | PEReference | Reference )* '"' | "'" ( [^%&'] | PEReference | Reference )* "'" AttValue ::= '"' ( [^<&"] | Reference )* '"' | "'" ( [^<&'] | Reference )* "'" SystemLiteral ::= '"' [^"]* '"' | "'" [^']* "'" PubidLiteral ::= '"' PubidChar* '"' | "'" ( PubidChar - "'" )* "'" PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*@$_%#x23] CharData ::= ( [^<]] | ']' [^<]] | ']' ']'+ [^<&>#x5D] )+ ']'* | ']'+ Comment ::= '' PI ::= '] )* '?'* )? '?>' PITarget ::= Name CDSect ::= '#x5D] )* ']'+ ']>' VersionNum ::= '1.' [0-9]+ CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' Reference ::= EntityRef | CharRef EntityRef ::= '&' Name ';' PEReference ::= '%' Name ';' EncName ::= [A-Za-z] ( [A-Za-z0-9._] | '-' )*