[Mirrored from: http://www.w3.org/pub/WWW/MarkUp/SGML/productions.html (September 01, 1996)]
SGML Productions
Derived from Erik Naggum's list of
productions from the SGML standard.
- SGML document
-
( SGML document entity,
*( SGML subdocument entity
| SGML text entity
| character data entity
| specific character data entity
| non-SGML data entity ) )
- SGML document entity
-
( *s,
SGML declaration,
prolog,
document instance set,
Ee )
- SGML subdocument entity
-
( prolog,
document instance set,
Ee )
- SGML text entity
-
( *SGML character,
Ee )
- s
-
( SPACE
| RE
| RS
| SEPCHAR )
- character data entity
-
( *SGML character,
Ee )
- specific character data entity
-
( *SGML character,
Ee )
- non-SGML data entity
-
( *character,
Ee )
- prolog
-
( *other prolog,
base document type declaration,
*( document type declaration
| other prolog ),
*( link type declaration
| other prolog ) )
- other prolog
-
( comment declaration
| processing instruction
| s )
- base document type declaration
-
document type declaration
- document instance set
-
( base document element,
*other prolog )
- base document element
-
document element
- document element
-
element
- element
-
( ?start-tag,
content,
?end-tag )
- start-tag
-
( ( stago ("<"),
document type specification,
generic identifier specification,
attribute specification list,
*s,
tagc (">") )
| minimized start-tag )
- minimized start-tag
-
( empty start-tag
| unclosed start-tag
| net-enabling start-tag )
- empty start-tag
-
( stago ("<"),
tagc (">") )
- unclosed start-tag
-
( stago ("<"),
document type specification,
generic identifier specification,
attribute specification list,
*s )
- net-enabling start-tag
-
( stago ("<"),
generic identifier specification,
attribute specification list,
*s,
net ("/") )
- end-tag
-
( ( etago ("</"),
document type specification,
generic identifier specification,
*s,
tagc (">") )
| minimized end-tag )
- minimized end-tag
-
( empty end-tag
| unclosed end-tag
| null end-tag )
- empty end-tag
-
( etago ("</"),
tagc (">") )
- unclosed end-tag
-
( etago ("</"),
document type specification,
generic identifier specification,
*s )
- null end-tag
-
net ("/")
- content
-
( mixed content
| element content
| replaceable character data
| character data )
- mixed content
-
*( data character
| element
| other content )
- element content
-
*( element
| other content
| s )
- other content
-
( comment declaration
| short reference use declaration
| link set use declaration
| processing instruction
| shortref
| character reference
| general entity reference
| marked section declaration
| Ee )
- document type specification
-
?name group
- generic identifier specification
-
( generic identifier
| rank stem )
- generic identifier
-
name
- attribute specification list
-
*attribute specification
- attribute specification
-
( *s,
?( name,
*s,
vi ("="),
*s ),
attribute value specification )
- attribute value specification
-
( attribute value
| attribute value literal )
- attribute value literal
-
( ( lit ("\""),
replaceable character data,
lit ("\"") )
| ( lita ("'"),
replaceable character data,
lita ("'") ) )
- attribute value
-
( character data
| general entity name
| general entity name list
| id value
| id reference value
| id reference list
| name
| name list
| name token
| name token list
| notation name
| number
| number list
| number token
| number token list )
- general entity name list
-
name list
- id value
-
name
- id reference list
-
name list
- id reference value
-
name
- name list
-
( name,
*( SPACE,
name ) )
- name token list
-
( name token,
*( SPACE,
name token ) )
- notation name
-
name
- number list
-
( number,
*( SPACE,
number ) )
- number token list
-
( number token,
*( SPACE,
number token ) )
- processing instruction
-
( pio (">"),
system data,
pic ("<?") )
- system data
-
character data
- replaceable character data
-
*( data character
| character reference
| general entity reference
| Ee )
- character data
-
*data character
- data character
-
SGML character
- character
-
( SGML character
| NONSGML )
- SGML character
-
( markup character
| DATACHAR )
- markup character
-
( name character
| function character
| DELMCHAR )
- name character
-
( name start character
| Digit
| LCNMCHAR
| UCNMCHAR )
- name start character
-
( LCLetter
| UCLetter
| LCNMSTRT
| UCNMSTRT )
- function character
-
( RE
| RS
| SPACE
| SEPCHAR
| MSOCHAR
| MSICHAR
| MSSCHAR
| FUNCHAR )
- name
-
( name start character,
*name character )
- number
-
+Digit
- name token
-
+name character
- number token
-
( Digit,
*name character )
- general entity reference
-
( ero ("&"),
?name group,
name,
reference end )
- parameter entity reference
-
( pero ("%"),
?name group,
name,
reference end )
- reference end
-
?( refc (";")
| RE )
- character reference
-
( cro (""),
( function name
| character number ),
reference end )
- function name
-
( "RE"
| "RS"
| "SPACE"
| name )
- character number
-
number
- ps
-
( s
| Ee
| parameter entity reference
| comment )
- parameter literal
-
( ( lit ("\""),
replaceable parameter data,
lit ("\"") )
| ( lita ("'"),
replaceable parameter data,
lita ("'") ) )
- replaceable parameter data
-
*( data character
| character reference
| parameter entity reference
| Ee )
- name token group
-
( grpo ("("),
*ts,
name token,
*( *ts,
connector,
*ts,
name token ),
*ts,
grpc (")") )
- name group
-
( grpo ("("),
*ts,
name,
*( *ts,
connector,
*ts,
name ),
*ts,
grpc (")") )
- ts
-
( s
| Ee
| parameter entity reference )
- ds
-
( s
| Ee
| parameter entity reference
| comment declaration
| processing instruction
| marked section declaration )
- associated element type
-
( generic identifier
| name group )
- external identifier
-
( ( "SYSTEM"
| ( "PUBLIC",
+ps,
public identifier ) ),
?( +ps,
system identifier ) )
- public identifier
-
minimum literal
- system identifier
-
( ( lit ("\""),
system data,
lit ("\"") )
| ( lita ("'"),
system data,
lita ("'") ) )
- minimum literal
-
( ( lit ("\""),
minimum data,
lit ("\"") )
| ( lita ("'"),
minimum data,
lita ("'") ) )
- minimum data
-
*minimum data character
- minimum data character
-
( RS
| RE
| SPACE
| LCLetter
| UCLetter
| Digit
| Special )
- formal public identifier
-
( owner identifier,
"//",
text identifier )
- owner identifier
-
( ISO owner identifier
| registered owner identifier
| unregistered owner identifier )
- ISO owner identifier
-
minimum data
- registered owner identifier
-
( "+//",
minimum data )
- unregistered owner identifier
-
( "-//",
minimum data )
- text identifier
-
( public text class,
SPACE,
?unavailable text indicator,
public text description,
"//",
( public text language
| public text designating sequence ),
?( "//",
public text display version ) )
- unavailable text indicator
-
"-//"
- public text class
-
( "CAPACITY"
| "CHARSET"
| "DOCUMENT"
| "DTD"
| "ELEMENTS"
| "ENTITIES"
| "LPD"
| "NONSGML"
| "NOTATION"
| "SHORTREF"
| "SUBDOC"
| "SYNTAX"
| "TEXT" )
- public text description
-
( ISO text description
| minimum data )
- ISO text description
-
minimum data
- public text language
-
name
- public text designating sequence
-
minimum data
- public text display version
-
minimum data
- comment declaration
-
( mdo ("<!"),
?( comment,
*( s
| comment ) ),
mdc (">") )
- comment
-
( com ("--"),
*SGML character,
com ("--") )
- marked section declaration
-
( marked section start,
status keyword specification,
dso ("["),
marked section,
marked section end )
- marked section start
-
( mdo ("<!"),
dso ("[") )
- marked section end
-
( msc ("]]"),
mdc (">") )
- marked section
-
*SGML character
- status keyword specification
-
( *( +ps,
( status keyword
| "TEMP" ) ),
*ps )
- status keyword
-
( "CDATA"
| "IGNORE"
| "INCLUDE"
| "RCDATA" )
- entity declaration
-
( mdo ("<!"),
"ENTITY",
+ps,
entity name,
+ps,
entity text,
*ps,
mdc (">") )
- entity name
-
( general entity name
| parameter entity name )
- general entity name
-
( name
| ( rni ("#"),
"DEFAULT" ) )
- parameter entity name
-
( pero ("%"),
+ps,
name )
- entity text
-
( parameter literal
| data text
| bracketed text
| external entity specification )
- data text
-
( ( "CDATA"
| "SDATA"
| "PI" ),
+ps,
parameter literal )
- bracketed text
-
( ( "STARTTAG"
| "ENDTAG"
| "MS"
| "MD" ),
+ps,
parameter literal )
- external entity specification
-
( external identifier,
?( +ps,
entity type ) )
- entity type
-
( "SUBDOC"
| ( ( "CDATA"
| "NDATA"
| "SDATA" ),
+ps,
notation name,
?data attribute specification ) )
- document type declaration
-
( mdo ("<!"),
"DOCTYPE",
+ps,
document type name,
?( +ps,
external identifier ),
?( +ps,
dso ("["),
document type declaration subset,
dsc ("]") ),
*ps,
mdc (">") )
- document type name
-
generic identifier
- document type declaration subset
-
*( entity declaration
| element declaration
| attribute definition list declaration
| notation declaration
| short reference mapping declaration
| short reference use declaration
| ds )
- entity set
-
*( entity declaration
| ds )
- element set
-
*( element declaration
| attribute definition list declaration
| notation declaration
| ds )
- short reference set
-
*( entity declaration
| short reference mapping declaration
| short reference use declaration
| ds )
- element declaration
-
( mdo ("<!"),
"ELEMENT",
+ps,
element type,
?( +ps,
omitted tag minimization ),
+ps,
( declared content
| content model ),
*ps,
mdc (">") )
- element type
-
( generic identifier
| name group
| ranked element
| ranked group )
- ranked element
-
( rank stem,
+ps,
rank suffix )
- ranked group
-
( grpo ("("),
*ts,
rank stem,
*( *ts,
connector,
*ts,
rank stem ),
*ts,
grpc (")"),
+ps,
rank suffix )
- rank stem
-
name
- rank suffix
-
number
- omitted tag minimization
-
( start-tag minimization,
+ps,
end-tag minimization )
- start-tag minimization
-
( "O"
| minus ("-") )
- end-tag minimization
-
( "O"
| minus ("-") )
- declared content
-
( "CDATA"
| "RCDATA"
| "EMPTY" )
- content model
-
( ( model group
| "ANY" ),
?( +ps,
exceptions ) )
- model group
-
( grpo ("("),
*ts,
content token,
*( *ts,
connector,
*ts,
content token ),
*ts,
grpc (")"),
?occurrence indicator )
- content token
-
( primitive content token
| model group )
- primitive content token
-
( ( rni ("#"),
"PCDATA" )
| element token
| data tag group )
- element token
-
( generic identifier,
?occurrence indicator )
- connector
-
( and ("&")
| or ("|")
| seq (",") )
- occurrence indicator
-
( opt ("?")
| plus ("+")
| rep ("*") )
- data tag group
-
( dtgo ("["),
*ts,
generic identifier,
*ts,
seq (","),
*ts,
data tag pattern,
*ts,
dtgc ("]"),
?occurrence indicator )
- data tag pattern
-
( ( data tag template group
| data tag template ),
?( *ts,
seq (","),
*ts,
data tag padding template ) )
- data tag template group
-
( grpo ("("),
*ts,
data tag template,
*( *ts,
or ("|"),
*ts,
data tag template ),
*ts,
grpc (")") )
- data tag template
-
parameter literal
- data tag padding template
-
parameter literal
- exceptions
-
( ( exclusions,
?( +ps,
inclusions ) )
| inclusions )
- inclusions
-
( plus ("+"),
name group )
- exclusions
-
( minus ("-"),
name group )
- attribute definition list declaration
-
( mdc (">"),
"ATTLIST",
+ps,
( associated element type
| associated notation name ),
+ps,
attribute definition list,
*ps,
mdc (">") )
- attribute definition list
-
( attribute definition,
*( +ps,
attribute definition ) )
- attribute definition
-
( attribute name,
+ps,
declared value,
+ps,
default value )
- attribute name
-
name
- declared value
-
( "CDATA"
| "ENTITY"
| "ENTITIES"
| "ID"
| "IDREF"
| "IDREFS"
| "NAME"
| "NAMES"
| "NMTOKEN"
| "NMTOKENS"
| "NUMBER"
| "NUMBERS"
| "NUTOKEN"
| "NUTOKENS"
| notation
| name token group )
- notation
-
( "NOTATION",
+ps,
name group )
- default value
-
( ( ?( rni ("#"),
"FIXED",
+ps ),
attribute value specification )
| ( rni ("#"),
( "REQUIRED"
| "CURRENT"
| "CONREF"
| "IMPLIED" ) ) )
- notation declaration
-
( mdo ("<!"),
"NOTATION",
+ps,
notation name,
+ps,
notation identifier,
*ps,
mdc (">") )
- notation identifier
-
external identifier
- associated notation name
-
( rni ("#"),
"NOTATION",
+ps,
( notation name
| name group ) )
- data attribute specification
-
( +ps,
dso ("["),
attribute specification list,
*s,
dsc ("]") )
- short reference mapping declaration
-
( mdc (">"),
"SHORTREF",
+ps,
map name,
+( +ps,
parameter literal,
+ps,
name ),
*ps,
mdc (">") )
- map name
-
name
- short reference use declaration
-
( mdc (">"),
"USEMAP",
+ps,
map specification,
?( +ps,
associated element type ),
*ps,
mdc (">") )
- map specification
-
( map name
| ( rni ("#"),
"EMPTY" ) )
- link type declaration
-
( mdo ("<!"),
"LINKTYPE",
+ps,
link type name,
+ps,
( simple link specification
| implicit link specification
| explicit link specification ),
?( +ps,
external identifier ),
?( +ps,
dso ("["),
link type declaration subset,
dsc ("]") ),
*ps,
mdc (">") )
- link type name
-
name
- simple link specification
-
( rni ("#"),
"SIMPLE",
+ps,
rni ("#"),
"IMPLIED" )
- implicit link specification
-
( source document type name,
+ps,
rni ("#"),
"IMPLIED" )
- explicit link specification
-
( source document type name,
+ps,
result document type name )
- source document type name
-
document type name
- result document type name
-
document type name
- link type declaration subset
-
( *( link attribute set
| link set declaration ),
?ID link set declaration,
*( link attribute set
| link set declaration ) )
- link attribute set
-
*( attribute definition list declaration
| entity set )
- link set declaration
-
( mdo ("<!"),
"LINK",
+ps,
link set name,
+( +ps,
link rule ),
+ps,
mdc (">") )
- link rule
-
( source element specification
| explicit link rule )
- link set name
-
( name
| ( rni ("#"),
"INITIAL" ) )
- source element specification
-
( associated element type,
?( +ps,
rni ("#"),
"USELINK",
+ps,
( link set name
| ( rni ("#"),
"EMPTY" ) ) ),
?( +ps,
rni ("#"),
"POSTLINK",
+ps,
link set specification ),
?link attribute specification )
- link attribute specification
-
( +ps,
dso ("["),
attribute specification list,
*s,
dsc ("]") )
- explicit link rule
-
( ( source element specification,
+ps,
result element specification )
| ( source element specification,
+ps,
rni ("#"),
"IMPLIED" )
| ( rni ("#"),
"IMPLIED",
+ps,
result element specification ) )
- result element specification
-
( generic identifier,
?result attribute specification )
- result attribute specification
-
( +ps,
dso ("["),
attribute specification list,
*s,
dsc ("]") )
- ID link set declaration
-
( mdo ("<!"),
"IDLINK",
+( +ps,
name,
+ps,
link rule ),
*ps,
mdc (">") )
- link set use declaration
-
( mdo ("<!"),
"USELINK",
+ps,
link set specification,
+ps,
link type name,
*ps,
mdc (">") )
- link set specification
-
( link set name
| ( rni ("#"),
"EMPTY" )
| ( rni ("#"),
"RESTORE" ) )
- SGML declaration
-
( mdo ("<!"),
"SGML",
+ps,
minimum literal,
+ps,
document character set,
+ps,
capacity set,
+ps,
concrete syntax scope,
+ps,
concrete syntax,
+ps,
feature use,
+ps,
application-specific information,
*ps,
mdc (">") )
- document character set
-
( "CHARSET",
+ps,
character set description )
- character set description
-
( base character set,
+ps,
described character set portion,
*( +ps,
base character set,
+ps,
described character set portion ) )
- base character set
-
( "BASESET",
+ps,
public identifier )
- described character set portion
-
( "DESCSET",
+( +ps,
character description ) )
- character description
-
( described set character number,
+ps,
number of characters,
+ps,
( base set character number
| minimum literal
| "UNUSED" ) )
- described set character number
-
character number
- base set character number
-
character number
- number of characters
-
number
- capacity set
-
( "CAPACITY",
+ps,
( ( "PUBLIC",
+ps,
public identifier )
| ( "SGMLREF",
+( +ps,
name,
+ps,
number ) ) ) )
- concrete syntax scope
-
( "SCOPE",
+ps,
( "DOCUMENT"
| "INSTANCE" ) )
- concrete syntax
-
( "SYNTAX",
+ps,
( public concrete syntax
| ( shunned character number identification,
+ps,
syntax-reference character set,
+ps,
function character identification,
+ps,
naming rules,
+ps,
delimeter set,
+ps,
reserved name use,
+ps,
quantity set ) ) )
- public concrete syntax
-
( "PUBLIC",
+ps,
system identifier,
?( +ps,
"SWITCHES",
+( +ps,
character number,
+ps,
character number ) ) )
- shunned character number identification
-
( "SHUNCHAR",
+ps,
( "NONE"
| ( ( "CONTROLS"
| character number ),
*( +ps,
character number ) ) ) )
- syntax-reference character set
-
character set description
- function character identification
-
( "FUNCTION",
+ps,
"RE",
+ps,
character number,
+ps,
"RS",
+ps,
character number,
+ps,
"SPACE",
+ps,
character number,
*( +ps,
added function,
+ps,
function class,
+ps,
character number ) )
- added function
-
name
- function class
-
( "FUNCHAR"
| "MSICHAR"
| "MSOCHAR"
| "MSSCHAR"
| "SEPCHAR" )
- naming rules
-
( "NAMING",
+ps,
"LCNMSTRT",
+( +ps,
parameter literal ),
+ps,
"UCNMSTRT",
+( +ps,
parameter literal ),
+ps,
"LCNMCHAR",
+( +ps,
parameter literal ),
+ps,
"UCNMCHAR",
+( +ps,
parameter literal ),
+ps,
"NAMECASE",
+ps,
"GENERAL",
+ps,
( "NO"
| "YES" ),
+ps,
"ENTITY",
+ps,
( "NO"
| "YES" ) )
- delimeter set
-
( "DELIM",
+ps,
general delimeters,
+ps,
short reference delimeters )
- general delimeters
-
( "GENERAL",
+ps,
"SGMLREF",
*( +ps,
name,
+ps,
parameter literal ) )
- short reference delimeters
-
( "SHORTREF",
+ps,
( "SGMLREF"
| "NONE" ),
*( +ps,
parameter literal ) )
- reserved name use
-
( "NAMES",
+ps,
"SGMLREF",
*( +ps,
name,
+ps,
parameter literal ) )
- quantity set
-
( "QUANTITY",
+ps,
"SGMLREF",
*( +ps,
name,
+ps,
number ) )
- feature use
-
( "FEATURES",
+ps,
markup minimization features,
+ps,
link type features,
+ps,
other features )
- markup minimization features
-
( "MINIMIZE",
+ps,
"DATATAG",
+ps,
( "NO"
| "YES" ),
+ps,
"OMITTAG",
+ps,
( "NO"
| "YES" ),
+ps,
"RANK",
+ps,
( "NO"
| "YES" ),
+ps,
"SHORTTAG",
+ps,
( "NO"
| "YES" ) )
- link type features
-
( "LINK",
+ps,
"SIMPLE",
+ps,
( "NO"
| ( "YES",
+ps,
number ) ),
+ps,
"IMPLICIT",
+ps,
( "NO"
| "YES" ),
+ps,
"EXPLICIT",
+ps,
( "NO"
| ( "YES",
+ps,
number ) ) )
- other features
-
( "OTHER",
+ps,
"CONCUR",
+ps,
( "NO"
| ( "YES",
+ps,
number ) ),
+ps,
"SUBDOC",
+ps,
( "NO"
| ( "YES",
+ps,
number ) ),
+ps,
"FORMAL",
+ps,
( "NO"
| "YES" ) )
- application-specific information
-
( "APPINFO",
+ps,
( "NONE"
| minimum literal ) )
- system declaration
-
( mdo ("<!"),
"SYSTEM",
+ps,
minimum literal,
+ps,
document character set,
+ps,
capacity set,
+ps,
feature use,
+ps,
concrete syntax scope,
+ps,
concrete syntaxes supported,
+ps,
validation services,
+ps,
SDIF support,
*ps,
mdc (">") )
- concrete syntaxes supported
-
+( +ps,
concrete syntax,
?( +ps,
concrete syntax changes ) )
- concrete syntax changes
-
( "CHANGES",
+ps,
( "SWITCHES"
| ( "DELIMLEN",
+ps,
number,
+ps,
"SEQUENCE",
+ps,
( "YES"
| "NO" ),
+ps,
"SRCNT",
+ps,
number,
+ps,
"SRLEN",
+ps,
number ) ) )
- validation services
-
( "VALIDATE",
+ps,
"GENERAL",
+ps,
( "NO"
| "YES" ),
+ps,
"MODEL",
+ps,
( "NO"
| "YES" ),
+ps,
"EXCLUDE",
+ps,
( "NO"
| "YES" ),
+ps,
"CAPACITY",
+ps,
( "NO"
| "YES" ),
+ps,
"NONSGML",
+ps,
( "NO"
| "YES" ),
+ps,
"SGML",
+ps,
( "NO"
| "YES" ),
+ps,
"FORMAL",
+ps,
( "NO"
| "YES" ) )
- SDIF support
-
( "SDIF",
+ps,
"PACK",
+ps,
( "NO"
| ( "YES",
?( +ps,
"ASN1" ) ) ),
+ps,
"UNPACK",
+ps,
( "NO"
| ( "YES",
?( +ps,
"ASN1" ) ) ) )