Name

element — Pattern matching an element

Synopsis

element element
{
 (
 attribute name { xsd:QName }
 | (
 ( element * - rng:* { ... }* )
 & (
 element name { ... }
 | element anyName { ... }
 | element nsName { ... }
 | element choice { ... }
 )
 )
 ),
 (
 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

pattern

May be included in

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

Compact syntax equivalent

element

Description

The element pattern matches an element. The name of the element may be defined either through a name attribute or through a name class.

Example

<element name="born">
 <text/>
</element>
<element name="character">
  <attribute name="id"/>
  <element name="name">
   <text/>
  </element>
  <element name="born">
   <text/>
  </element>
  <element name="qualification">
   <text/>
  </element>
</element>
<element>
  <anyName/>
  <ref name="anything"/>
</element>

Attributes

datatypeLibrary

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

name

When name is specified, the element pattern matches only elements with this name. name is a shortcut to define a single name as a name class for the element pattern.

name and the definition of a name class can’t be specified together (they are exclusive options).

ns

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.86.215