Name
start — Start of a grammar
Synopsis
element start { ( attribute combine { “choice” | “interleave” }? ), ( attribute ns { text }?, attribute datatypeLibrary { xsd:anyURI }?, attribute * - (rng:* | local:*) { text }* ), ( ( element * - rng:* { ... }* ) & ( element element { ... } | element attribute { ... } | element group { ... } | element interleave { ... } | element choice { ... } | element optional { ... } | element zeroOrMore { ... } | element oneOrMore { ... } | element list { ... } | element mixed { ... } | element ref { ... } | element parentRef { ... } | element empty { ... } | element text { ... } | element value { ... } | element data { ... } | element notAllowed { ... } | element externalRef { ... } | element grammar { ... } ) ) }
Class
start-element
May be included in
div
, grammar
,
include
Compact syntax equivalent
start
Description
The start
pattern defines the
“start” of a
grammar
. When this grammar is used to validate a
complete document, the start
pattern specifies
which elements can be used as the document (root) element. When this
grammar is embedded in another grammar
, the
start
pattern specifies which pattern should be
applied at the location where the grammar
is
embedded. Like named pattern definitions, start patterns may be
combined by choice
or
interleave
and redefined when they are included in
include
patterns.
Example
<start> <element name="library"> <oneOrMore> <ref name="book-element"/> </oneOrMore> </element> </start> <start combine="choice"> <ref name="book-element"/> ...
Get RELAX NG now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.