by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)
include — Grammar merge
element include { attribute href { xsd:anyURI }, ( attribute ns { text }?, attribute datatypeLibrary { xsd:anyURI }?, attribute * - (rng:* | local:*) { text }* ), ( ( element * - rng:* { ... }* ) & ( ( element start { ... } ) | ( element define { ... } ) | element div { ... } )* ) } |
The include pattern includes a grammar and merges its definitions with the definitions of the current grammar. The definitions of the included grammar may be redefined and overridden by the definitions embedded in the include pattern. Note that a schema must contain an explicit grammar definition in order to be included.
<grammar xmlns="http://relaxng.org/ns/structure/1.0"> <start> <element name="library"> <oneOrMore> <ref name="book-element"/> </oneOrMore> </element> </start> <include href="included.rng"/> ... </grammar> <grammar xmlns="http://relaxng.org/ns/structure/1.0"> <include href="flat.rng"> <define name="book-element"> <element name="book"> <attribute name="id"/> <attribute name="available"/> <ref name="isbn-element"/> <ref name="title-element"/> <ref name="description-element"/> <zeroOrMore> <ref name="author-element"/> </zeroOrMore> </element> </define> </include> <define name="description-element"> <element name="description"> <text/> </element> </define> </grammar> |
This attribute defines the default datatype library. The value is inherited.
This attribute defines the location of the schema and specifies the grammar to be included.
This attribute defines the default namespace for the elements defined in a portion of schema. The value is inherited.
This text is released under the Free Software Foundation GFDL.