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:include

Liest eine andere Grammatik in die aktuelle Grammatik ein.

Beispiel für XML-Syntax

include.rng

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

<include href="typ.rng"/>

<start combine="choice">
 <ref name="typ" />
</start>

<define name="typ">
<element name="typ">
  <list>
   <choice>
    <value>html</value>
    <value>xhtml</value>
    <value>xml</value>
   </choice>
  </list>
 </element>
</define>

</grammar>

typ.rng

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

<start combine="choice">
 <element name="typ">
  <list>
   <choice>
    <value>text</value>
    <value>other</value>
   </choice>
  </list>
 </element>
</start>

</grammar>

Beispiel für kompakte Syntax

include.rnc

include "typ.rnc"
start |= typ
typ = element typ { list { "html" | "xhtml" | "xml" } }

typ.rnc

start ...

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