Title: XML
1XML
2document prolog element Misc
prolog XMLDecl Misc (doctypedecl Misc)?
XMLDecl 'lt?xml' VersionInfo EncodingDecl?
SDecl? S? '?gt'
VersionInfo S 'version' S? '' S?
('1.1''1.0'1.1",1.0")
element EmptyElemTag STag content ETag
STag 'lt' Name (S Attribute) S? 'gt'
ETag 'lt/' Name S? '/gt'
EmptyElemTag 'lt' Name (S Attribute) S? '/gt'
content CharData?((elementReferenceCDSectP
IComment)CharData?)
Attribute Name S? '' S? AttValue
Misc Comment PI S
S white space
3DTD
4doctypedecl 'lt!DOCTYPE' S Name (S
ExternalID)? S? ( '' intSubset '' S?)?
intSubset (markupdecl DeclSep)
DeclSep S PEReference
markupdecl elementdecl AttlistDecl
EntityDecl
NotationDecl PI Comment
elementdecl 'lt!ELEMENT' S Name S
contentspec S? 'gt'
contentspec 'EMPTY' 'ANY' Mixed
children children (choiceseq) ('?'
'' '')? choice '(' S? cp (S?
'' S? cp) S? ')' cp (Name
choice seq) ('?' '' '')? seq
'(' cp ( S? ',' S? cp) S? ')' Mixed
'(' S? 'PCDATA' ( S? '' Name) S? ')'
'(' S? 'PCDATA' S? ')'
5doctypedecl 'lt!DOCTYPE' S Name (S
ExternalID)? S? ( '' intSubset '' S?)?
intSubset (markupdecl DeclSep)
markupdecl elementdecl AttlistDecl
EntityDecl
NotationDecl PI Comment
AttlistDecl 'ltATTLIST' S Name AttDef S?
'gt'
AttDef S Name S AttType S
DefaultDecl
AttType 'CDATA' 'ID' 'IDREF' 'IDREFS'
'ENTITY 'ENTITIES'
'NMTOKEN' 'NMTOKENS' EnumeratedType
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