Name

rng:externalRef — References an external schema

XML syntax example

<element name="date" xmlns="http://relaxng.org/ns/
 structure/1.0">
<interleave>
 <element name="year">
  <list>
   <choice>
    <value>2002</value>
    <value>2003</value>
    <value>2004</value>
    <value>2005</value>
    <value>2006</value>
    <value>2007</value>
   </choice>
  </list>
 </element>
 <externalRef href="month.rng"/>
 <externalRef href="day.rng"/>
</interleave>
</element>

Compact syntax example

element date {
  element year {
    list { "2002" | "2003" | "2004" | "2005" | "2006" |
    "2007" }
  }
  & external "month.rnc"
  & external "day.rnc"
}

Attributes

href

The location of the external schema

Parents

attribute, choice (( ) and |), define (name of pattern followed by =), element, except (-), group (( ) and ,), interleave (&), list, mixed, oneOrMore (+), optional (?), start (start followed by =), zeroOrMore (*)

Description

The externalRef pattern references an external schema, in effect replacing the instance of the externalRef element with the content of the external schema. The external schema must contain a pattern.

See also

§9.1, include, parentRef, ref

Get XML Pocket Reference, 3rd Edition 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.