Name

externalRef — Reference to an external schema

Synopsis

element externalRef
{
 attribute href { xsd:anyURI },
 (
 attribute ns { text }?,
 attribute datatypeLibrary { xsd:anyURI }?,
 attribute * - (rng:* | local:*) { text }*
 ),
 ( element * - rng:* { ... }* )
}

Class

pattern

May be included in

attribute, choice, define, element, except, group, interleave, list, mixed, oneOrMore, optional, start, zeroOrMore

Compact syntax equivalent

external

Description

The externalRef pattern is a reference to an external schema. It has the same effect as replacing the externalRef pattern with the external schema, which is treated as a pattern.

Example

<element name="book">
  <externalRef href="book.rng"/>
</element>
      
<element xmlns="http://relaxng.org/ns/structure/1.0" name="university">
 <element name="name">
  <text/>
 </element>
 <externalRef href="flat.rng"/>
</element>

Attributes

datatypeLibrary

This attribute defines the default datatype library. The value is inherited.

href

This attribute defines the location of the external schema.

ns

This attribute defines the default namespace for the elements defined in a portion of a schema. The value is inherited.

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.