Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/metasyntax/relaxng/extracted
Source used for this grammar: OASIS, RELAX NG 1.0, from the RELAX NG Specification, with errata applied, relaxng.rng
, July 2008
pattern
, grammar-content
, include-content
, start-element
, define-element
, combine-att
, open-patterns
, open-pattern
, name-class
, except-name-class
, open-name-classes
, open-name-class
, common-atts
, other
, any
), 1 root (pattern
), 0 top (—), 0 bottom (—).[name]
7, [element]
, [attribute]
, [group]
, [interleave]
, [choice]
2, [optional]
, [zeroOrMore]
, [oneOrMore]
, [list]
, [mixed]
, [ref]
, [parentRef]
, [empty]
, [text]
, [type]
2, [value]
, [param]
, [except]
2, [data]
, [notAllowed]
, [href]
2, [externalRef]
, [grammar]
, [div]
2, [include]
, [start]
, [define]
, [combine]
, [anyName]
, [nsName]
, [ns]
, [datatypeLibrary]
.pattern ::= [element]::[name]::string open-name-class common-atts open-patterns [attribute]:: common-atts [name]::string open-name-class other pattern [group]:: common-atts open-patterns [interleave]:: common-atts open-patterns [choice]:: common-atts open-patterns [optional]:: common-atts open-patterns [zeroOrMore]:: common-atts open-patterns [oneOrMore]:: common-atts open-patterns [list]:: common-atts open-patterns [mixed]:: common-atts open-patterns [ref]:: [name]::string common-atts other [parentRef]:: [name]::string common-atts other [empty]:: common-atts other [text]:: common-atts other [value]:: [type]::string common-atts string [data]:: [type]::string common-atts other [param]:: [name]::string common-atts string [except]:: common-atts open-patterns [notAllowed]:: common-atts other [externalRef]:: [href]::string common-atts other [grammar]:: common-atts grammar-content
grammar-content ::= otherstart-element define-element [div]:: common-atts grammar-content [include]:: [href]::string common-atts include-content
include-content ::= otherstart-element define-element [div]:: common-atts include-content
start-element ::= [start]::combine-att common-atts open-pattern
define-element ::= [define]::[name]::string combine-att common-atts open-patterns
combine-att ::= [combine]::"choice""interleave"
open-patterns ::=
other pattern
open-pattern ::= other pattern
name-class ::= [name]::common-atts string [anyName]:: common-atts except-name-class [nsName]:: common-atts except-name-class [choice]:: common-atts open-name-classes
except-name-class ::=
other [except]::open-name-classes
open-name-classes ::=
other name-class
open-name-class ::= other name-class
common-atts ::= [ns]::string[datatypeLibrary]::string α
other ::=α string any
any ::=α string any