[relaxng-user] Bug in Jing and libxml2 -- restriction on start
before simplification
David Tolpin
dvd at davidashen.net
Sat Mar 6 11:05:28 ICT 2004
Hi,
thanks to Alexander Peshkov for discovering the bug.
The following grammar
1 start = element foo {
2 grammar {
3 start = element bar { text }, element doh {text}
4 }
5 }
when converted to XML Syntax:
1 <?xml version="1.0" encoding="UTF-8"?>
2 <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3 <start>
4 <element name="foo">
5 <grammar>
6 <start>
7 <element name="bar">
8 <text/>
9 </element>
10 <element name="doh">
11 <text/>
12 </element>
13 </start>
14 </grammar>
15 </element>
16 </start>
17 </grammar>
is not accepted by either Jing or libxml2,
with the following reporting
xmllint --relaxng test.rng test.xml
test.rng:10: element element: Relax-NG parser error : start more than one children
Relax-NG schema test.rng failed to compile
java com.thaiopensource.relaxng.util.Driver test.rng test.xml
/home/dvd/work/test.rng:10:31: error: "start" pattern must contain at most one pattern
Both Jing and RNV validate successfully against the grammar in the compact
syntax.
David Tolpin
http://davidashen.net/
More information about the relaxng-user
mailing list