home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / F1272_gra_sgml.txt < prev    next >
Encoding:
Text File  |  1999-02-10  |  4.7 KB  |  97 lines

  1. document        ::=    prolog element misc*
  2. prolog            ::=    xmlDecl? misc* (doctypedecl misc*)? 
  3. xmlDecl            ::=    '<?xml' (S attribute)* S? '?>' 
  4. misc            ::=    comment | pi | S
  5. doctypedecl        ::=    '<!DOCTYPE' S DocTypeName (S externalID)? S? ('[' dtdText? ']' S?)? '>'
  6. dtdText            ::= (markupdecl | DocTypeText | S)+ 
  7. DocTypeName        ::= Name
  8. DocTypeText        ::= PEReference+
  9. markupdecl        ::=    elementdecl | attlistDecl | entityDecl | notationDecl | pi | dtdSpecialSect | comment
  10. element            ::= emptyElemTag | realElemTag
  11. realElemTag        ::= sTag content eTag { ElementName = ElementNameEnd }
  12. sTag            ::=    '<' ElementName (S attribute)* S? '>' 
  13. attribute        ::=    AttName Eq attQValue
  14. Eq!                ::=    S? '=' S? 
  15. eTag            ::= '</' ElementNameEnd S? '>'
  16. content            ::=    ( element | cdSect | pi | comment | S? | TextData )*
  17. TextData        ::= S* ( CharNoWhite | Reference ) ( CharData | Reference )*
  18. emptyElemTag    ::= '<' ElementName (S attribute)* S? '/>'
  19. ElementName        ::= Name
  20. ElementNameEnd    ::= Name
  21. elementdecl        ::= '<!ELEMENT' S ElementDeclName S sgmlStyleEDecl? ContentSpec (S dtdComment)? S? '>'
  22. ElementDeclName    ::= Name | choice
  23. sgmlStyleEDecl    ::= DashZero S DashZero S
  24. DashZero        ::= '-' | 'O' | 'o'
  25. ContentSpec        ::= 'EMPTY' | 'ANY' | 'CDATA' | Mixed | children | PEReference
  26. children        ::= ('?' | '*' | '+')? (sgmlseq | choice | seq ) ('?' | '*' | '+')?
  27. choice            ::= '(' S? cp ( S? '|' S? cp )* S? ')'
  28. cp                ::= ('?' | '*' | '+' | '-')? ( '#PCDATA' | Name | PEReference | choice | seq) ('?' | '*' | '+')?
  29. seq                ::= '(' S? cp ( S? ',' S? cp )* S? ')'
  30. sgmlseq            ::= ( cp | Mixed ) S ( cp | Mixed )
  31. Mixed            ::=    ('(' S? '#PCDATA' (S? '|' S? ( Name | PEReference ))* S? ')*') | ('(' S? '#PCDATA' S? ')')
  32. attlistDecl        ::=    '<!ATTLIST' S AttlistName AttlistText? (S dtdComment)? S? '>' 
  33. AttlistName        ::= Name | ( '#' NotationType ) | choice
  34. AttlistText        ::= AttDef*
  35. AttDef            ::= S ( ( Name S (dtdComment S)? ( AttType | PEReference ) S DefaultDecl (S dtdComment)? ) | PEReference S? dtdComment? )
  36. AttType            ::= StringType | TokenizedType | EnumeratedType | NumberType | NameType
  37. StringType        ::= 'CDATA'
  38. NumberType        ::= 'NUMBER'
  39. NameType        ::= 'NAME'
  40. TokenizedType    ::= 'IDREFS' | 'IDREF' | 'ID' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' | PEReference
  41. EnumeratedType    ::= NotationType | Enumeration 
  42. NotationType    ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' 
  43. Enumeration        ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
  44. DefaultDecl        ::= '#REQUIRED' | '#IMPLIED' | '#CONREF' | (('#FIXED' S)? attQValue) | Name | Digit+
  45. Reference        ::= EntityRef | CharRef
  46. CharRef            ::= ('&#' [0-9]+ ';') | ('&#x' [0-9a-fA-F]+ ';')
  47. EntityRef        ::= '&' Name ';'
  48. PEReference        ::= '%' Name ';'
  49. entityDecl        ::= geDecl | peDecl
  50. geDecl            ::= '<!ENTITY' S GEName S GEDef (S dtdComment)? S? '>'
  51. peDecl            ::= '<!ENTITY' S PEName S PEDef (S dtdComment)? S? '>'
  52. GEName            ::= Name
  53. PEName            ::= '%' S Name
  54. GEDef            ::= EntityValue | (externalID NDataDecl?)
  55. PEDef            ::= EntityValue | externalID
  56. externalID        ::= (ExtIDNameSys S ExtIDTextSys) | (ExtIDNamePub S ExtIDTextPub)
  57. ExtIDNameSys    ::= 'SYSTEM'
  58. ExtIDTextSys    ::= SystemLiteral
  59. ExtIDNamePub    ::= 'PUBLIC'
  60. ExtIDTextPub    ::= PubidLiteral S SystemLiteral
  61. NDataDecl        ::= S 'NDATA' S Name
  62. notationDecl    ::= '<!NOTATION' S NotationName S NotationText (S dtdComment)? S? '>'
  63. NotationName    ::= Name
  64. NotationText    ::= externalID | PublicID
  65. PublicID        ::= 'PUBLIC' S PubidLiteral
  66. S!                ::=    (#x20 | #x09 | #x0D | #x0A)+
  67. AttName            ::=    Name
  68. Name            ::= (Letter | '_' | ':') (NameChar)*
  69. NameChar        ::= Letter | Digit | '.' | '-' | '_' | ':'
  70. Nmtoken            ::= NameChar+
  71. EntityValue        ::= ('"' ([^%&"] | PEReference | Reference)* '"') | ("'" ([^%&'] | PEReference | Reference)* "'")
  72. attQValue        ::=    ('"' AttValue1 '"') | ("'" AttValue2 "'")
  73. AttValue1        ::= ([^<&"] | Reference)*
  74. AttValue2        ::= ([^<&'] | Reference)*
  75. SystemLiteral    ::= ('"' [^"]* '"') | ("'" [^']* "'") 
  76. PubidLiteral    ::= ('"' PubidChar* '"') | ("'" (PubidCharNoQu)* "'")
  77. PubidChar!        ::= #x20 | #x0D | #x0A | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
  78. PubidCharNoQu!    ::= #x20 | #x0D | #x0A | [a-zA-Z0-9] | [-()+,./:=?;!*#@$_%]
  79. CharData        ::=    [^<&]* / ']]>'
  80. CharNoWhite!    ::=    [^< #x09#x0D#x0A]
  81. comment            ::=    '<!--' CommentText '-->'
  82. dtdComment        ::=    '--' CommentText '--'
  83. CommentText        ::= ((CharNoDash) | ('-' (CharNoDash)))*
  84. CharNoDash!        ::=    #x09 | #x0A | #x0D | [#x20-#x2C] | [#x2E-#xFF]
  85. pi                ::= '<?' PITarget (S PIData)? '?>'
  86. PITarget        ::= Name - 'xml'
  87. PIData            ::=    Char* / '?>'
  88. Char!            ::=    #x09 | #x0A | #x0D | [#x20-#xFF]
  89. dtdSpecialSect    ::=    DtdSpecialStart CData? CDEnd
  90. DtdSpecialStart    ::=    '<![' S? ( Name | PEReference ) S? '[' 
  91. cdSect            ::=    CDStart CData? CDEnd 
  92. CDStart!        ::=    '<![CDATA[' 
  93. CData            ::=    Char* / ']]>'
  94. CDEnd!            ::=    ']]>'
  95. Digit!            ::=    [#x30-#x39]
  96. Letter!            ::=    [#x41-#xFF]
  97.