Browsable RELAX NG Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: meta/syntax/relaxng/extracted
Source used for this grammar: jjc, RELAX NG for RELAX NG, relaxng.rng, 2002/05/30

Summary

Syntax

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 ::=
	other (start-element | define-element | [div]::(common-atts grammar-content) | [include]::([href]::string common-atts include-content))*
include-content ::=
	other (start-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)*

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []