mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
More tests from section 9 of the tutorial, Daniel
This commit is contained in:
parent
0fb0106547
commit
80ec90acf1
24
result/relaxng/tutor9_6.rng
Normal file
24
result/relaxng/tutor9_6.rng
Normal file
@ -0,0 +1,24 @@
|
||||
<grammar>
|
||||
|
||||
<start>
|
||||
<element name="addressBook">
|
||||
<zeroOrMore>
|
||||
<element name="card">
|
||||
<ref name="card.attlist"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</start>
|
||||
|
||||
<define name="card.attlist">
|
||||
<group>
|
||||
<attribute name="name">
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name="email">
|
||||
<text/>
|
||||
</attribute>
|
||||
</group>
|
||||
</define>
|
||||
|
||||
</grammar>
|
1
result/relaxng/tutor9_6_1
Normal file
1
result/relaxng/tutor9_6_1
Normal file
@ -0,0 +1 @@
|
||||
./test/relaxng/tutor9_6_1.xml validates
|
4
result/relaxng/tutor9_6_1.err
Normal file
4
result/relaxng/tutor9_6_1.err
Normal file
@ -0,0 +1,4 @@
|
||||
xmlRelaxNGValidateAttribute(name): 0
|
||||
xmlRelaxNGValidateAttribute(email): 0
|
||||
xmlRelaxNGValidateDefinition(): validated card : 0
|
||||
xmlRelaxNGValidateDefinition(): validated addressBook : 0
|
2
result/relaxng/tutor9_6_2
Normal file
2
result/relaxng/tutor9_6_2
Normal file
@ -0,0 +1,2 @@
|
||||
Extra content for element addressBook
|
||||
./test/relaxng/tutor9_6_2.xml validation generated an internal error
|
5
result/relaxng/tutor9_6_2.err
Normal file
5
result/relaxng/tutor9_6_2.err
Normal file
@ -0,0 +1,5 @@
|
||||
xmlRelaxNGValidateAttribute(name): 0
|
||||
xmlRelaxNGValidateAttribute(email): -1
|
||||
xmlRelaxNGValidateDefinition(): validated card : -1
|
||||
error detected at relaxng.c:4341
|
||||
xmlRelaxNGValidateDefinition(): validated addressBook : -1
|
2
result/relaxng/tutor9_6_3
Normal file
2
result/relaxng/tutor9_6_3
Normal file
@ -0,0 +1,2 @@
|
||||
Extra content for element addressBook
|
||||
./test/relaxng/tutor9_6_3.xml validation generated an internal error
|
5
result/relaxng/tutor9_6_3.err
Normal file
5
result/relaxng/tutor9_6_3.err
Normal file
@ -0,0 +1,5 @@
|
||||
xmlRelaxNGValidateAttribute(name): 0
|
||||
xmlRelaxNGValidateAttribute(email): 0
|
||||
xmlRelaxNGValidateDefinition(): validated card : -1
|
||||
error detected at relaxng.c:4341
|
||||
xmlRelaxNGValidateDefinition(): validated addressBook : -1
|
24
test/relaxng/tutor9_6.rng
Normal file
24
test/relaxng/tutor9_6.rng
Normal file
@ -0,0 +1,24 @@
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
||||
|
||||
<start>
|
||||
<element name="addressBook">
|
||||
<zeroOrMore>
|
||||
<element name="card">
|
||||
<ref name="card.attlist"/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</start>
|
||||
|
||||
<define name="card.attlist">
|
||||
<group>
|
||||
<attribute name="name">
|
||||
<text/>
|
||||
</attribute>
|
||||
<attribute name="email">
|
||||
<text/>
|
||||
</attribute>
|
||||
</group>
|
||||
</define>
|
||||
|
||||
</grammar>
|
3
test/relaxng/tutor9_6_1.xml
Normal file
3
test/relaxng/tutor9_6_1.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<addressBook>
|
||||
<card name="foo" email="bar"/>
|
||||
</addressBook>
|
3
test/relaxng/tutor9_6_2.xml
Normal file
3
test/relaxng/tutor9_6_2.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<addressBook>
|
||||
<card name="foo"/>
|
||||
</addressBook>
|
3
test/relaxng/tutor9_6_3.xml
Normal file
3
test/relaxng/tutor9_6_3.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<addressBook>
|
||||
<card name="foo" email="bar" error="extra"/>
|
||||
</addressBook>
|
Loading…
x
Reference in New Issue
Block a user