RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)
You are welcome to use our annotation system to give your feedback.
start — Start of a grammar
start-element
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 { ... } ) ) } |
div, grammar, include.
start
The start pattern defines the "start" of a grammar. When this grammar is used to validate a complete document, the start pattern defines which elements may be used as the document (root) element. When this grammar is embedded in another grammar, the start pattern describes 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.
<start> <element name="library"> <oneOrMore> <ref name="book-element"/> </oneOrMore> </element> </start> <start combine="choice"> <ref name="book-element"/> </start> <define name="author-element"> <grammar> <start> <element name="author"> <attribute name="id"/> <ref name="name-element"/> <ref name="born-element"/> <optional> <ref name="died-element"/> </optional> </element> </start> <define name="name-element"> <element name="name"> <text/> </element> </define> <define name="born-element"> <element name="born"> <text/> </element> </define> <define name="died-element"> <element name="died"> <text/> </element> </define> </grammar> </define> |
The combine attribute specifies how multiple definitions of start pattern should be combined together. The possible values are choice and interleave.
When the combine attribute is specified and set to choice, multiple definitions of a start pattern are combined in a choice pattern. When the combine attribute is specified and set to interleave, multiple definitions of a start pattern are combined in an interleave pattern.
Note that it is forbidden to specify more than one start with the same name and no combine attribute or multiple start with different values of combine attribute.
The datatypeLibrary attribute defines the default datatype library. The value of datatypeLibrary is inherited.
The ns attribute defines the default namespace for the elements defined in a portion of schema. The value of ns is inherited.
You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.