|
ca10c7d7
|
2025-07-24T18:10:25
|
|
relaxng: Added xmlRelaxNGValidCtxtClearErrors to recover from errors during streaming validation
This allows to perform XML element validation skipping errors without recreating
a validation context. Tested it in runsuite.c in the rngTestStreaming() method.
Also added xmlRegExecClearErrors(exec) as necessary.
|
|
9760a14f
|
2025-06-30T13:47:33
|
|
relaxng: In the simplification step also unlink notAllowed refs from choice
This fixes false reports of non allowed content compared to notAllowed as tag within the choice tag.
|
|
bb7169b5
|
2025-06-10T18:34:44
|
|
Fix relaxng is parsed to an infinite attrs->next loop
Test data for the bug.
|
|
5bb84b47
|
2024-04-04T11:55:28
|
|
relaxng: Fix tree corruption in xmlRelaxNGParseNameClass
Don't create cycles in tree structure. This will lead to an infinite
loop or call stack overflow later.
Closes: https://gitlab.gnome.org/GNOME/libxml2/-/issues/711
|
|
f0df3e6d
|
2023-12-21T14:35:18
|
|
tests: Try to fix RelaxNG test cases
These were added recently in ea695ac0 and 8074b881 but were a total mess
of symbolic links and apparently mixed up files.
Symbolic links don't work on Windows.
Try to salvage one of the tests.
|
|
83c6aeef
|
2023-12-18T21:12:29
|
|
relaxng: Improve error handling
Pass RelaxNG structured error handler to XML parser.
Handle malloc failure from xmlRaiseError.
Remove argument from memory error handler.
Use xmlRaiseMemoryError.
Don't use xmlGenericError.
Remove TODO macro.
|
|
01411e7c
|
2021-02-08T20:58:32
|
|
Check for invalid redeclarations of predefined entities
Implement section "4.6 Predefined Entities" of the XML 1.0 spec and
check whether redeclarations of predefined entities match the original
definitions.
Note that some test cases declared
<!ENTITY lt "<">
But the XML spec clearly states that this is illegal:
> If the entities lt or amp are declared, they MUST be declared as
> internal entities whose replacement text is a character reference to
> the respective character (less-than sign or ampersand) being escaped;
> the double escaping is REQUIRED for these entities so that references
> to them produce a well-formed result.
Also fixes #217 but the connection is only tangential. The integer
overflow discovered by fuzzing was more related to the fact that various
parts of the parser disagreed on whether to prefer predefined entities
over their redeclarations. The whole situation is a mess and even
depends on legacy parser options. But now that redeclarations are
validated, it shouldn't make a difference.
As noted in the added comment, this is also one of the cases where
overly defensive checks can hide interesting logic bugs from fuzzers.
|
|
2a350ee9
|
2019-09-30T17:04:54
|
|
Large batch of typo fixes
Closes #109.
|
|
ea695ac0
|
2019-08-09T15:09:22
|
|
Fix unability to RelaxNG-validate grammar with choice-based name class
Previously, test/relaxng/ambig_name-class2.xml would fail to validate
against test/relaxng/ambig_name-class2.rng:
> test/relaxng/ambig_name-class2.rng:4:
> element attribute: Relax-NG parser error :
> Found anyName attribute without oneOrMore ancestor
> Relax-NG schema test/relaxng/ambig_name-class2.rng failed to compile
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
8074b881
|
2019-08-08T23:33:48
|
|
Fix unability to validate ambiguously constructed interleave for RelaxNG
Previously, test/relaxng/ambig_name-class.xml would fail to validate
for a simple reason -- interleave within "open-name-class" context
is supposed to be fine with whatever else is pending the consumption,
since effectively, it's unrelated from a higher parsing perspective.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
c64d4efb
|
2018-10-13T00:12:12
|
|
Remove redefined starts and defines inside include elements
When including a grammar from another grammar, we need to make sure that any
redefines of starts and includes that that grammar does inside any of its
include elements are also removed.
|
|
46da8fc5
|
2018-10-12T23:46:24
|
|
Allow choice within choice in nameClass in RELAX NG
The pattern nameClass allows for nested choice elements, for example
<name>
<choice>
<choice>
<name>a</name>
<name>b</name>
</choice>
<name>c</name>
</choice>
</name>
which is semantically equivalent to
<name>
<choice>
<name>a</name>
<name>b</name>
<name>c</name>
</choice>
</name>
The old code didn’t handle this correctly, as it never expected a choice inside
another choice. This patch fixes this by flattening any nested choices.
This pattern of nested choice elements comes up in RELAX NG simplification,
where all choice elements are rewritten in this nested manner, see section 4.12
of the RELAX NG specification.
|
|
4338c310
|
2018-10-12T22:30:26
|
|
Look inside divs for starts and defines inside include
RELAX NG allows for div elements inside of include elements. We need to look
inside those div elements for start and define elements that may be redefining
start and define elements in the included grammar.
|
|
cad102b8
|
2016-04-15T22:41:24
|
|
Do normalize string-based datatype value in RelaxNG facet checking
Original patch is from Jan Pokorný <jpokorny redhat com>
https://mail.gnome.org/archives/xml/2013-November/msg00028.html
Improve it according to reviews and add test files.
|
|
2fab235d
|
2015-03-16T08:38:36
|
|
Fix support for except in nameclasses
For https://bugzilla.gnome.org/show_bug.cgi?id=565219
The code was imply missing even if simple, added a few regression
tests.
|
|
6473a41a
|
2013-10-23T14:51:33
|
|
Implement choice for name classes on attributes
https://bugzilla.gnome.org/show_bug.cgi?id=710744
|
|
aa422d92
|
2009-09-24T11:31:48
|
|
595792 fixing a RelaxNG bug introduced in 2.7.4
* relaxng.c: refs definitions added from inported schemas should not
be processed as refs from the main schemas
* test/relaxng/595792* result/relaxng/595792*: add the test to the
regression suite
|
|
9332b48f
|
2009-09-23T18:28:43
|
|
Fix a Relaxng bug raised by libvirt test suite
* xmlregexp.c: other fixes in 2.7.4 raised this internal error
when comparing ranges, this affects among others detection of
the determinism
* test/relaxng/libvirt* result/relaxng/libvirt*: add a test case
based on libvirt schemas and tests
|
|
1ba2aca3
|
2009-08-31T16:47:39
|
|
492317 Fix Relax-NG validation problems
* relaxng.c xmlregexp.c: a subtle problem when checking for compileable
content model, if using the same elements in cases of choices. Handled
by adding a special flag to the regexp compilation to detect
transitions with different atoms using same strings.
* test/relaxng/492317* result/relaxng/492317*: add the test to the
regression suite
|
|
ec18c960
|
2009-08-26T18:37:43
|
|
558452 fight with reg test and error report
* relaxng.c: tiny fix and provide more context on some errors
* result/relaxng/558452_0* test/relaxng/558452*: add some regression
tests for the bugs
* Makefile.am runtest.c: fight with the fact streaming error messages
can differ due to missing node context
|
|
e96b47fd
|
2007-01-04T17:28:35
|
|
fix xmlTextReaderSetup() description tests which were apparently never
* xmlreader.c: fix xmlTextReaderSetup() description
* test/relaxng/empty1.rng test/relaxng/comps_0.xml
test/relaxng/empty1_0.xml test/relaxng/comps.rng
test/relaxng/empty0.rng test/relaxng/empty0_0.xml
test/relaxng/empty1_1.xml: tests which were apparently
never commited to CVS
Daniel
svn path=/trunk/; revision=3572
|
|
be58a0a3
|
2006-10-13T16:39:14
|
|
Adding test file, Daniel
|
|
79338009
|
2006-02-19T15:32:29
|
|
Added new regression tests for #331062, daniel
|
|
60faf528
|
2005-08-10T16:23:57
|
|
fixed bug #307377 about validation of choices in list values. added
* relaxng.c: fixed bug #307377 about validation of choices in
list values.
* test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c:
added examples to the regression tests, problem is that streaming
version gives slightly more informations.
Daniel
|
|
336a8e13
|
2005-08-07T10:46:19
|
|
get rid of the dependancy on a locally installed DTD try to cleanup the
* test/relaxng/docbook_0.xml: get rid of the dependancy on a locally
installed DTD
* uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to
cleanup the Path/URI conversion mess, needed fixing in various
layers and a new API to the uri module which also fixes #306861
* runtest.c: integrated a regression test specific to check the
URI conversions done before calling the I/O handlers.
Daniel
|
|
cdc82737
|
2005-07-08T15:04:06
|
|
added the missing entity to the document internal subset to avoid errors
* test/relaxng/docbook_0.xml: added the missing entity to the
document internal subset to avoid errors if the DocBook catalogs
are not there
* xmlschemas.c: first cut at implementing xmlSchemaValidateStream()
untested yet
Daniel
|
|
f4644039
|
2005-06-13T11:41:31
|
|
fixed a bug exposed by Rob Richards in the mailing-list added the
* relaxng.c: fixed a bug exposed by Rob Richards in the mailing-list
* result//compare0* test//compare0*: added the regression test in
the suite as this went unnoticed !
Daniel
|
|
63d68a37
|
2005-03-31T13:50:00
|
|
fixed a problem in Relax-NG validation #159968 added the test to the
* relaxng.c: fixed a problem in Relax-NG validation #159968
* test/relaxng/list.* result/relaxng/list_*: added the test
to the regression suite
Daniel
|
|
9186a1fd
|
2005-01-15T12:38:10
|
|
fixed bug #157633 in relaxng choice optimization added regression tests
* relaxng.c: fixed bug #157633 in relaxng choice optimization
* result/relaxng/choice0* test/relaxng/choice0*: added regression
tests about it.
* doc/*: rebuilt
* testdso.c: removed a warning due to a missing void in signature.
Daniel
|
|
236c8c09
|
2004-03-20T11:32:36
|
|
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
|
|
ce192eb8
|
2003-04-16T15:58:05
|
|
more work on RelaxNG streaming validation trying to improve the subset
* relaxng.c xmllint.c: more work on RelaxNG streaming validation
trying to improve the subset compiled, and more testing.
* doc/downloads.html doc/xml.html doc/xmlmem.html: some updates on the
documentation
* test/relaxng/tutor11_1_3.xml: fixes the DTD path
* result/relaxng/*.err: fix some of the outputs
Daniel
|
|
0e3d3ce2
|
2003-03-21T12:43:18
|
|
fixed xmlRelaxNGNodeMatchesList augmented the test suite this fixes some
* relaxng.c: fixed xmlRelaxNGNodeMatchesList
* test/relaxng/testsuite.xml: augmented the test suite
* result/relaxng/spec1* result/relaxng/tutor12_1*: this fixes
some schemas validation tests in the presence of foreign
namespaces.
Daniel
|
|
249d7bbe
|
2003-03-19T21:02:29
|
|
attempt to cope with ID/IDREF(S) declared both in the DTD and in the
* valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S)
declared both in the DTD and in the Schemas <grin/>
* relaxng.c: more debug, added a big optimization for <mixed>
* test/relaxng/testsuite.xml: augmented the testsuite
* test/relaxng/ result/relaxng: added the RelaxNG spec and a
DocBook example to the regression tests
Daniel
|
|
a1a9d041
|
2003-03-18T16:53:17
|
|
removed a warning more cleanup, added ENTITY and ENTITIES support
* tree.c: removed a warning
* xmlschemastypes.c: more cleanup, added ENTITY and ENTITIES
support
* check-relaxng-test-suite.py check-xsddata-test-suite.py:
cleanup/improvements of the regression tests batch
* test/relaxng/testsuite.xml: augmented libxml2 own testsuite
Daniel
|
|
c3da18a1
|
2003-03-18T00:31:04
|
|
added Datatype ID and IDREF, usable from RelaxNG now need to add a new
* relaxng.c valid.c xmlschemastypes.c: added Datatype ID
and IDREF, usable from RelaxNG now
* include/libxml/xmlschemastypes.h: need to add a new interface
because the validation modifies the infoset
* test/relaxng/testsuite.xml: extended the testsuite
Daniel
|
|
952379b7
|
2003-03-17T15:37:12
|
|
fixed the last core RelaxNG bug known #107083, shemas datatype ID/IDREF
* relaxng.c: fixed the last core RelaxNG bug known #107083,
shemas datatype ID/IDREF support still missing though.
* xmlreader.c: fix a crashing bug with prefix raised by
Merijn Broeren
* test/relaxng/testsuite.xml: augmented the testsuite with
complex inheritance tests
Daniel
|
|
fd573f18
|
2003-03-16T17:52:32
|
|
switched back to the previous Relax-NG code base, the derivation algorithm
* relaxng.c: switched back to the previous Relax-NG code base,
the derivation algorithm need severe constraining code to avoid
combinatorial explosion. Fixed the problem with Sebastian Rahtz
TEI based example and other bugs
* result/relaxng/*err: updated the results
* test/relaxng/testsuite.xml: started a new test suite
Daniel
|
|
5add868b
|
2003-03-10T13:13:58
|
|
stop generating wrong result file with * in name fixing the include bug
* Makefile.am: stop generating wrong result file with * in name
* relaxng.c: fixing the include bug raised by Sebastian Rahtz
* result/relaxng/demo* test/relaxng/demo: added the tests from
Sebastian reproducing the problem.
Daniel
|
|
1703c5fc
|
2003-02-10T14:28:44
|
|
OASIS RelaxNG testsuite python script to run regression against OASIS
* test/relaxng/OASIS/spectest.xml: OASIS RelaxNG testsuite
* check-relaxng-test-suite.py: python script to run regression
against OASIS RelaxNG testsuite
* relaxng.c: some cleanup tweaks
* HTMLparser.c globals.c: cleanups in comments
* doc/libxml2-api.xml: updated the API
* result/relaxng/*: errors moved files, so large diffs but
no changes at the semantic level.
Daniel
|
|
231d791f
|
2003-02-09T14:22:17
|
|
fixes a libtool problem on AMD 64bits builds found the validation problem
* libxml.spec.in: fixes a libtool problem on AMD 64bits builds
* relaxng.c: found the validation problem I had with interleave
when not covering all remaining siblings
* Makefile.am test.relaxng/* result/relaxng/*: augmented the
testsuite and check the RNG schemas against the RNG schemas
given in appendix A
Daniel
|
|
419a7688
|
2003-02-03T23:22:49
|
|
more work on grammars and refs/defs augmented/updated the regression tests
* relaxng: more work on grammars and refs/defs
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
144fae16
|
2003-02-03T13:17:57
|
|
more work on name classes, except support augmented/updated the regression
* relaxng: more work on name classes, except support
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
1ed7f364
|
2003-02-03T10:57:45
|
|
more work on name classes, the "validate all" schemas seems to work now.
* relaxng: more work on name classes, the "validate all" schemas
seems to work now.
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
fc1a4503
|
2003-02-02T16:02:55
|
|
check all the namespace support was actually correct based on tutorial
* test/relaxng/* result/relaxng/*: check all the namespace support
was actually correct based on tutorial section 10.
Daniel
|
|
e2a5a08b
|
2003-02-02T14:35:17
|
|
include seems to work okay now augmented/updated the regression tests
* relaxng: include seems to work okay now
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
a9d912de
|
2003-02-01T17:43:10
|
|
a bit of work done in the train back. added one of the include tests
* relaxng.c: a bit of work done in the train back.
* test/relaxng/*: added one of the include tests
Daniel
|
|
80ec90ac
|
2003-01-30T14:12:27
|
|
More tests from section 9 of the tutorial, Daniel
|
|
0fb01065
|
2003-01-30T13:41:41
|
|
Combine with interleave on attributes worked without chnages, daniel
|
|
154877e5
|
2003-01-30T12:17:05
|
|
more work done in the train augmented/updated the regression tests Daniel
* relaxng: more work done in the train
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
b711312c
|
2003-01-30T05:49:40
|
|
oops forgot two external rngs, Daniel
|
|
e431a27d
|
2003-01-29T23:02:33
|
|
debugging of externalRef augmented/updated the regression tests Daniel
* relaxng.c: debugging of externalRef
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
d41f4f48
|
2003-01-29T21:07:52
|
|
more work on Relax-NG, implementing externalRef augmented/updated the
* relaxng.c: more work on Relax-NG, implementing externalRef
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
* Makefile.am: cleanup to Relaxtests target
Daniel
|
|
b08c9815
|
2003-01-28T23:09:49
|
|
more work on Relax-NG, implementing interleave augmented/updated the
* relaxng.c: more work on Relax-NG, implementing interleave
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
76fc5eda
|
2003-01-28T20:58:15
|
|
more work on Relax-NG, implementing interleave augmented/updated the
* relaxng.c: more work on Relax-NG, implementing interleave
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
c6e997c9
|
2003-01-27T12:35:42
|
|
more work on Relax-NG augmented/updated the regression tests added a
* relaxng.c: more work on Relax-NG
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
* xmlschemastypes.c: added a number of base type definition but not
the associated checks, those are still TODOs
Daniel
|
|
ea3f398c
|
2003-01-26T19:45:18
|
|
more work on Relax-NG augmented/updated the regression tests Daniel
* relaxng.c: more work on Relax-NG
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
edc91928
|
2003-01-26T00:52:04
|
|
more work on Relax-NG augmented/updated the regression tests Daniel
* relaxng.c: more work on Relax-NG
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
dd1655c5
|
2003-01-25T18:01:32
|
|
updated the policy on private mail answers more work on Relax-NG
* README: updated the policy on private mail answers
* relaxng.c: more work on Relax-NG
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
|
|
276be4a6
|
2003-01-24T01:03:34
|
|
more work on Relax-NG regenerated the docs updated and augmented the
* relaxng.c: more work on Relax-NG
* doc/*: regenerated the docs
* test/relaxng/* result/relaxng/*: updated and augmented the
Relax-NG regression tests and results
Daniel
|
|
6eadf63c
|
2003-01-23T18:29:16
|
|
First commit of the new Relax-NG validation code, not generally useful
* Makefile.am configure.in relaxng.c include/libxml/relaxng.h:
First commit of the new Relax-NG validation code, not generally
useful yet.
* test/relaxng/* result/relaxng/*: current state of the regression
tests
Daniel
|