IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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.
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.
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>
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>
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.
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.
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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* relaxng.c: added check for external reference in
xmlRelaxNGGetElements (bug 137718)
* test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added
regression test for above
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* relaxng: more work on name classes, the "validate all" schemas
seems to work now.
* test/relaxng/* result/relaxng/*: augmented/updated the
regression tests
Daniel
* 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
* 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