1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-26 10:03:34 +03:00

added check for external reference in xmlRelaxNGGetElements (bug 137718)

* relaxng.c: added check for external reference in
  xmlRelaxNGGetElements (bug 137718)
* test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added
  regression test for above
This commit is contained in:
William M. Brack 2004-03-20 11:32:36 +00:00
parent 20d823614e
commit 236c8c09f0
9 changed files with 46 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Sat Mar 20 19:26:03 HKT 2004 William Brack <wbrack@mmm.com.hk>
* relaxng.c: added check for external reference in
xmlRelaxNGGetElements (bug 137718)
* test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added
regression test for above
Wed Mar 17 16:37:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
* nanohttp.c: added a close for the local file descriptor

View File

@ -3978,7 +3978,8 @@ xmlRelaxNGGetElements(xmlRelaxNGParserCtxtPtr ctxt,
(cur->type == XML_RELAXNG_OPTIONAL) ||
(cur->type == XML_RELAXNG_PARENTREF) ||
(cur->type == XML_RELAXNG_REF) ||
(cur->type == XML_RELAXNG_DEF)) {
(cur->type == XML_RELAXNG_DEF) ||
(cur->type == XML_RELAXNG_EXTERNALREF)) {
/*
* Don't go within elements or attributes or string values.
* Just gather the element top list

View File

@ -0,0 +1 @@
./test/relaxng/proofsystem.rng validates

View File

View File

@ -0,0 +1 @@
./test/relaxng/rngbug-001.rng validates

View File

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="e2"/>
</start>
<define name="e2">
<element name="e2">
<element name="e3">
<text/>
</element>
</element>
</define>
</grammar>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="root"/>
</start>
<define name="root">
<element name="root">
<interleave>
<element name="e1">
<text/>
</element>
<externalRef href="rngbug-001.ext"/>
</interleave>
</element>
</define>
</grammar>

View File

@ -0,0 +1,6 @@
<root>
<e1>x</e1>
<e2>
<e3>y</e3>
</e2>
</root>