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 ...
Get XML: kurz & gut 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.