Name
rng:parentRef
Verweist auf ein benanntes Muster in einer Eltern-Grammatik.
Beispiel für XML-Syntax
<grammar xmlns="http://relaxng.org/ns/structure/1.0"> <start> <choice> <ref name="typ" /> <ref name="alt" /> </choice> </start> <define name="typ"> <element name="typ"> <list> <choice> <value>html</value> <value>xhtml</value> <value>xml</value> </choice> </list> </element> </define> <define name="alt"> <grammar> <start> <choice> <element name="methode"> <list> <choice> <value>text</value>
<value>other</value>
</choice>
</list>
</element>
<parentRef name="typ"/>
</choice>
</start>
</grammar>
</define>
</grammar>
Beispiel für kompakte Syntax
start = typ | alt typ = element typ { list { "html" | "xhtml" | "xml" } } alt = grammar { start = element methode ...
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.