O'Reilly logo

XML: kurz & gut by Michael Fitzgerald, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

rng:interleave

Passt auf Muster, die in beliebiger Reihenfolge gemischt sind.

Beispiel für XML-Syntax

<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<start>
 <element name="name">
  <ref name="name"/>
 </element>
</start>

<define name="name">
 <interleave>
  <element name="vor">
   <text/>
  </element>
  <optional>
   <element name="zwischen">
    <text/>
   </element>
  </optional>
  <element name="nach">
   <text/>
  </element>
 </interleave>
</define>

</grammar>

Beispiel für kompakte Syntax

start = element name { name }
name = element vor { text }
&
 element zwischen { text }?
&
 element nach { text }

Eltern

attribute, choice (( ) und |), define (Name des Musters, gefolgt von =), element, except (-), group (( ) und,), interleave (&), list, mixed, oneOrMore (+), optional ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required