summaryrefslogtreecommitdiffstats
path: root/libxml2/test/relaxng/tutor9_3.rng
diff options
context:
space:
mode:
Diffstat (limited to 'libxml2/test/relaxng/tutor9_3.rng')
-rw-r--r--libxml2/test/relaxng/tutor9_3.rng37
1 files changed, 37 insertions, 0 deletions
diff --git a/libxml2/test/relaxng/tutor9_3.rng b/libxml2/test/relaxng/tutor9_3.rng
new file mode 100644
index 0000000..62c6e7d
--- /dev/null
+++ b/libxml2/test/relaxng/tutor9_3.rng
@@ -0,0 +1,37 @@
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+ <start>
+ <element name="data">
+ <interleave>
+ <text/>
+ <ref name="inline.class"/>
+ </interleave>
+ </element>
+ </start>
+
+ <define name="inline.class" combine="choice">
+ <element name="bold">
+ <ref name="inline"/>
+ </element>
+ </define>
+
+ <define name="inline.class" combine="choice">
+ <element name="italic">
+ <ref name="inline"/>
+ </element>
+ </define>
+
+ <define name="inline">
+ <zeroOrMore>
+ <choice>
+ <text/>
+ <element name="code">
+ <ref name="inline"/>
+ </element>
+ <element name="em">
+ <ref name="inline"/>
+ </element>
+ <!-- etc -->
+ </choice>
+ </zeroOrMore>
+ </define>
+</grammar>