1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 04:55:04 +03:00
Commit Graph

95 Commits

Author SHA1 Message Date
Nick Wellnhofer
eee1dd5acf Fix expected output of test/schemas/any4
libxml2 correctly rejects any4_0.xsd as invalid schema. I can't figure
out what the intent behind this test case was. Simply adjust the
expected output to match the current behavior.

Closes #92.
2019-09-16 15:36:44 +02:00
Nick Wellnhofer
e8c9cd5c7a Fix Schema determinism check of ##other namespaces
Non-compound (##local) and compound string atoms are always disjoint
regardless of whether the compound atom is negated (##other).

Closes #40.
2019-09-16 15:36:02 +02:00
bettermanzzy
01d8cf07d9 Misleading error message with xs:{min|max}Inclusive
Closes #53.
2019-08-25 14:12:34 +02:00
David Kilzer
5be1a6e8e0 Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd <https://bugzilla.gnome.org/show_bug.cgi?id=760861>
Add missing test results to fix the following errors when
running "make Schemastests":

    ## Schemas regression tests
    diff: ./result/schemas/regexp-char-ref_0_0.err: No such file or directory
    diff: ./result/schemas/regexp-char-ref_1_0.err: No such file or directory

* result/schemas/regexp-char-ref_0_0.err: Added.
* result/schemas/regexp-char-ref_1_0.err: Added.
2016-04-08 10:33:09 +08:00
Remi Gacogne
4609e6c980 XSD: optional element in complex type extension
For https://bugzilla.gnome.org/show_bug.cgi?id=609796
Libxml2 fails to validate an instance document against a schema if an element
whose type is a complex extension of some base type with an optional child
element and that child element is not specified in the instance document.  For
example, suppose I have some complex type BaseType that is defined to have one
child element in a sequence group that has minOccurs set to 0
2012-05-11 15:31:05 +08:00
Daniel Veillard
4013e83e84 579746 XSD validation not correct / nilable groups
* xmlschemas.c: when a particle need to be processed via counted
  transition, if the group is nillable, the counting won't work, so
  keep track of nillable subset as they are built and generate the
  appropriate epsilon transitions as needed
* test/schemas/579746* result/schemas/579746*: add related test cases
  based on the bug report
2009-08-26 17:24:31 +02:00
Daniel Veillard
d80d0728bf 559410 - Regexp bug on (...)? constructs
* xmlregexp.c: fix a regexp bug on some (...)? constructs
* test/schemas/nvdcve* result/schemas/nvdcve*: add the tests to the
  regression suite
2009-08-22 18:56:01 +02:00
Daniel Veillard
bd56c44349 571271 fix semantic of xsd:all with minOccurs=0
* xmlschemas.c: apparently we though it allowed any of the sub elements
  to be missing, and probably not what's expected from the spec, though
  it used to forbid it c.f.:
  http://lists.xml.org/archives/xml-dev/200109/msg00512.html
  asking HT for confirmation but it's likely that we were wrong on the
  semantic
* result/schemas/all_1_[367]*: this changes the output of soem of our
  internal regression tests
2009-08-12 15:39:23 +02:00
Daniel Veillard
be390ed0a1 Test case for 570702 2009-08-12 12:40:39 +02:00
Jason Childs
edc68aadf8 582906 XSD validating multiple imports of the same schema
* xmlschemas.c: When validating a schema that includes the same file
  that has no targetNamespace defined an internal erro was thrown,
  depending on the orig namespace that should be allowed though
* test/schemas/582906-* result/schemas/582906-*: 2 tests case, one
  where this is allowed, and one where this is forbidden
2009-08-07 20:29:33 +02:00
Jason Childs
d996072077 Bug 582887 – problems validating complex schemas
* xmlschemas.c: fixes the problem faced when importing the same schemas
  multiple times but from different places which is allowed
* test/schemas/582887* result/schemas/582887*: adding the specific test
  to the regressions
2009-08-07 19:01:32 +02:00
Daniel Veillard
bf9c1dad3a add the testchar to 'make check' Volker Grabsch pointed out a typo
* Makefile.am: add the testchar to 'make check'
* xmlschemas.c: Volker Grabsch pointed out a typo
* xmlregexp.c: production [19] from XML Schemas regexps were a
  mistake removed in version REC-xmlschema-2-20041028, Volker Grabsch
  provided a patch to remove it
* test/schemas/regexp-char-ref_0.xml test/schemas/regexp-char-ref_0.xsd
  test/schemas/regexp-char-ref_1.xsd result/schemas/regexp-char-ref_0_0
  result/schemas/regexp-char-ref_1_0: Volker Grabsch also provided
  regession tests for this
Daniel

svn path=/trunk/; revision=3776
2008-08-26 07:46:42 +00:00
Daniel Veillard
041b687e93 apply patch from Andrew Tosh to fix behaviour when '.' is used in a
* xmlregexp.c: apply patch from Andrew Tosh to fix behaviour
  when '.' is used in a posCharGroup
* test/schemas/poschargrp0_0.* result/schemas/poschargrp0_0_0*:
  added the test to the regression suite
Daniel

svn path=/trunk/; revision=3687
2008-02-08 10:37:18 +00:00
Daniel Veillard
3888f47263 applied patch from Frank Gross fixing Schemas IDC import bug #455953 and
* xmlschemas.c test/schemas/*455953* result/schemas/bug455953*:
  applied patch from Frank Gross fixing Schemas IDC import bug
  #455953 and also add the test to the regression suite
Daniel

svn path=/trunk/; revision=3652
2007-08-23 09:29:03 +00:00
Daniel Veillard
dcec672439 fix the patch for unreproductable #343000 but also fix a line/column
* parser.c: fix the patch for unreproductable #343000 but
  also fix a line/column keeping error
* result/errors/attr1.xml.err result/errors/attr2.xml.err
  result/errors/name.xml.err result/errors/name2.xml.err
  result/schemas/anyAttr-processContents-err1_0_0.err
  result/schemas/bug312957_1_0.err: affected lines in error output
  of the regression tests
Daniel
2006-10-15 20:32:53 +00:00
Kasimier T. Buchcik
92b394fcf3 Fixed bug #341150, reported by Michael Romer. In
* xmlschemas.c: Fixed bug #341150, reported by Michael Romer.
  In xmlSchemaBuildContentModelForSubstGroup(),
  xmlAutomataNewOnceTrans2() was incorrectly used instead of
  xmlAutomataNewTransition2() to mimic a xs:choice for
  substitution-groups.
* test/schemas/subst-group-1_1.xsd
  test/schemas/subst-group-1_0.xml
  result/schemas/subst-group-1_0_1
  result/schemas/subst-group-1_0_1.err: Added regression test
  supplied by Michael Romer for bug #341150.
2006-05-09 19:59:54 +00:00
Kasimier T. Buchcik
b63d2fab2d Fixed incorrect validation of restricted enumerations. Added related
* xmlschemas.c test/schemas/restriction-enum-1*
  result/schemas/restriction-enum-1*: Fixed incorrect
  validation of restricted enumerations. Added related
  regression tests.
2006-04-19 11:20:49 +00:00
Kasimier T. Buchcik
b0d74c661a Added regression test for bug #321475 (reported by Gabor Nagy). Fixing of
* test/schemas/bug321475* result/schemas/bug321475*:
  Added regression test for bug #321475 (reported by
  Gabor Nagy). Fixing of bug #323510 seemed to have
  fixed this bug as well.
2005-12-13 11:52:35 +00:00
Kasimier T. Buchcik
183fa3e79a Added regression test for bug #323510.
* test/schemas/bug323510* result/schemas/bug323510*:
  Added regression test for bug #323510.
2005-12-12 15:20:28 +00:00
Kasimier T. Buchcik
7c78215b14 Added missing regression test results for the latest IDC and xs:decimal
* result/schemas/decimal* result/schemas/bug322411*:
  Added missing regression test results for the latest IDC
  and xs:decimal bugs.
2005-12-02 12:52:47 +00:00
Kasimier T. Buchcik
77e76829b6 Changed xmlSchemaFormatIDCKeySequence() to use
* xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence()
  to use xmlSchemaGetCanonValueWhtspExt() in order to
  correctly report values for xs:anySimpleType.
* test/schemas/idc-keyref-err1*
  result/schemas/idc-keyref-err1*: Added a test for this change.
2005-11-11 12:52:32 +00:00
Kasimier T. Buchcik
95c3adf57a Adapted regression test results.
* result/schemas/*.err: Adapted regression test results.
2005-10-14 14:41:35 +00:00
Kasimier T. Buchcik
748cebc25f Adapted regression test results 2005-10-10 13:36:27 +00:00
Kasimier T. Buchcik
56cbbf2d82 Adapted result.
* result/schemas/derivation-ok-extension_0_0: Adapted result.
2005-09-12 19:31:53 +00:00
Kasimier T. Buchcik
cf0123d352 Adapted regression results.
* result/schemas/allsg_0_3.err result/schemas/allsg_0_4.err
  result/schemas/changelog093_1_0.err
  result/schemas/derivation-ok-extension_0_0.err
  result/schemas/import1_0_0.err
  result/schemas/derivation-ok-restriction-2-1-1_0_0.err:
  Adapted regression results.
2005-09-12 19:24:59 +00:00
Daniel Veillard
4f917e2416 applied patch from Kuba Nowakowski fixing bug #313982 also added the test
* xmlschemastypes.c: applied patch from Kuba Nowakowski fixing bug
  #313982
* result/schemas/bug313982* test/schemas/bug313982*: also added
  the test case to the regression suite.
Daniel
2005-08-22 16:01:43 +00:00
Kasimier T. Buchcik
764b3d61c3 Changed output for keyref-match errors; the target-node will be now
* xmlschemas.c include/libxml/xmlerror.h:
  Changed output for keyref-match errors; the target-node will
  be now reported rather than the scope-node of the keyref
  definition - allowing easier chasing of instance errors.
  This was reported by Guy Fabrice to the mailing list.
  Some initial parsing code for schema redefinitions.
* result/schemas/bug303566_1_1.err
  result/schemas/bug312957_1_0.err: Adapted test results due
  to the keyref changes.
2005-08-12 12:25:23 +00:00
Kasimier T. Buchcik
ea7e4798c4 Added missing test results.
* result/schemas/any6_1_0*: Added missing test results.
2005-08-10 10:37:47 +00:00
Daniel Veillard
4f82c8a161 fixed a determinism detection problem exposed by ##other tests commited by
* xmlregexp.c: fixed a determinism detection problem exposed by
  ##other tests commited by Kasimier, also added a small speedup
  of determinism detection.
* test/results/any6_2_0* any8_1_0* any7_1_2* any7_2_2*: added
  the results to the regression tests now
Daniel
2005-08-09 21:40:08 +00:00
Kasimier T. Buchcik
800cbac34e Fixed #312957 reported by Carol Hunter: streaming XPath states were not
* xmlschemas.c: Fixed #312957 reported by Carol Hunter:
  streaming XPath states were not popped in every case,
  thus failed to resolve correctly for subsequent input.
* test/schemas/bug312957* result/schemas/bug312957*:
  Added the test submitted by Carol Hunter.
2005-08-09 12:31:55 +00:00
Daniel Veillard
6e65e15777 trying to nail down the remaining ##other issues completed the tests and
* xmlregexp.c xmlschemas.c: trying to nail down the remaining
  ##other issues
* result/schemas/any7* test/schemas/any7: completed the tests
  and added the results
* result/schemas/any3_0_0.err result/schemas/any5_0_0.err
  result/schemas/any5_1_0.err: this slightly chnages the output
  from 3 existing tests
Daniel
2005-08-09 11:09:52 +00:00
Daniel Veillard
10752284e3 fixed bug #310264, basically it's about reentrancy of count based
* xmlregexp.c: fixed bug #310264, basically it's about reentrancy
  of count based transition, when going though the counter must
  be reset to 0
* test/schemas/bug310264* result/schemas/bug310264*: added the
  regression test.
Daniel
2005-08-08 13:05:13 +00:00
Kasimier T. Buchcik
11162b7ce7 Added creation of the content type of xs:anyType. This is needed when
* xmlschemastypes.c: Added creation of the content type of
  xs:anyType. This is needed when trying to extend xs:anyType
  (although it makes no sense to extend it; IMHO the schema
  people should have ruled this out). This was reported
  by Yong Chen to the mailing list.
* xmlschemas.c: Fixed handling of xs:anyType in
  xmlSchemaCheckCOSCTExtends() (reported by Young Chen). Tiny
  adjustment to an error report output.
* test/schemas/extension2* result/schemas/extension2*:
  Added a test case provided by Young Chen.
2005-07-28 00:50:22 +00:00
Daniel Veillard
77005e6ff0 fixed the error reporting for not transitions fixed output Daniel
* xmlregexp.c xmlschemas.c: fixed the error reporting for
  not transitions
* result/schemas/any5_0_0* result/schemas/any5_0_2*
  result/schemas/any5_1_0*: fixed output
Daniel
2005-07-19 16:26:18 +00:00
Daniel Veillard
9efc476bb6 fixing bug #172215 about foreign namespaces by adding support for negated
* xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: fixing
  bug #172215 about foreign namespaces by adding support for
  negated string transitions. Error messages still need to be
  improved.
* test/schemas/any5* result/schemas/any5*: adding regression
  tests for this.
Daniel
2005-07-19 14:33:55 +00:00
Daniel Veillard
a980befc8f fixed xsd:all when used in conjunction with substitution groups adding
* xmlschemas.c: fixed xsd:all when used in conjunction with
  substitution groups
* test/schemas/allsg_* result/schemas/allsg_*: adding specific
  regression tests, strangely missing from NIST/Sun/Microsoft
  testsuites
Daniel
2005-07-18 21:34:03 +00:00
Kasimier T. Buchcik
6d30ff2c08 Fixed bug #309338, reported by Kupriyanov Anotolij. Added a regression
* xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov
  Anotolij.
* test/schemas/bug309338* result/schemas/bug309338*:
  Added a regression test for the above bug.
2005-07-06 11:44:51 +00:00
Kasimier T. Buchcik
21edf9b42c Added regression tests (from Dhyanesh).
* test/schemas/empty-value* result/schemas/empty-value*:
  Added regression tests (from Dhyanesh).
2005-06-21 08:46:25 +00:00
Kasimier T. Buchcik
ef1b6676f6 Added schema test results (Tom Browder, bug #306806).
* result/schemas/bug306806_1_0 result/schemas/bug306806_1_0.err:
  Added schema test results (Tom Browder, bug #306806).
2005-06-15 09:15:11 +00:00
Kasimier T. Buchcik
828f654769 Fixed an attribute fixed/default value constraint error.
* xmlschemas.c result/schemas/include1_0_0.err:
  Fixed an attribute fixed/default value constraint error.
2005-06-09 11:23:39 +00:00
Kasimier T. Buchcik
21f63b0347 Adapted regression test results 2005-06-09 10:48:40 +00:00
Kasimier T. Buchcik
bd6c3f7df8 Fixed facet errors to be channelled back for union type members;
* xmlschemas.c: Fixed facet errors to be channelled back for
  union type members; facet-validation will stop now on the
  first error. Reported by GUY Fabrice to the mailing-list.
* xmlschemastypes.c: Changed to ignore lengh-related facet
  validation for QNames and NOTATIONs as proposed by the
  schema people.
* test/schemas/union2* result/schemas/union2*: Added
  regression tests for union types (by GUY Fabrice).
2005-05-25 17:29:36 +00:00
Kasimier T. Buchcik
3eec790cdc Added regression a test provided by Heiko Oberdiek (bug #303566).
* test/schemas/bug303566_1* result/schemas/bug303566_1_1*:
  Added regression a test provided by Heiko Oberdiek (bug #303566).

  level for XML Schema IDCs (bug #303566 reported by Heiko Oberdiek).
  This should not affect pattern-like resolution on every level.
2005-05-10 09:16:19 +00:00
Kasimier T. Buchcik
eabc1d6558 Added test results.
* result/schemas/changelog093*: Added test results.
2005-04-18 11:04:28 +00:00
Kasimier T. Buchcik
256401b2bd Committing again, since the CVS server aborted.
* xmlschemas.c include/libxml/schemasInternals.h
  result/schemas/src-element2-*.err result/schemas/element-*.err:
  Committing again, since the CVS server aborted.
2005-04-01 15:36:42 +00:00
Kasimier T. Buchcik
b474fa409c The schema parser will stop if components could not be resolved. This is
* xmlschemas.c: The schema parser will stop if components could
  not be resolved. This is not conforming to the spec but for now
  will avoid internal errors during type fixup and content model
  creation. Restructured inclusion/import of schemata: this avoids
  duplicate, self and circular inclusion. Chameleon includes are
  still workarounded. Added restriction to disallow references to
  non-imported namespaces. Corrected parsing of <group>.
* result/schemas/bug167754_0_0*: Added a missing test result.
2005-03-11 12:34:42 +00:00
Kasimier T. Buchcik
25799cee8d Added IDC evaluation for attribute nodes. Made 'nil'ed elements work.
* xmlschemas.c: Added IDC evaluation for attribute nodes.
  Made 'nil'ed elements work. Added a specific error message
  for 'strict' attribute wildcards.
* include/libxml/xmlerror.h: Added an error code for
  wildcards.
* result/schemas/anyAttr-processContents-err1_0_0.err: Adapted.
2005-02-15 14:39:48 +00:00
Kasimier T. Buchcik
31113c7e86 Exposed targetNamespace for simple/complex types, model groups, attribute
* include/libxml/schemasInternals.h xmlschemas.c:
  Exposed targetNamespace for simple/complex types, model groups,
  attribute groups and notations (reported by Michael Hewarth
  to the mailing list). Added targetNamespace to xmlSchemaType,
  xmlSchemaAttributeGroup and xmlSchemaNotation.
  Tiny cosmetic change to the content model error report output.
* result//all_*.err result//any3_0_0.err result//choice_*.err
  result//list0_0_1.err result//list0_1_1.err: Adapted output
  of regression tests.
2005-01-13 16:57:20 +00:00
Kasimier T. Buchcik
c3af19d1f7 Integrated xmlRegExecErrInfo and xmlRegExecNextValues from xmlregexp.c to
* xmlschemas.c: Integrated xmlRegExecErrInfo and xmlRegExecNextValues
  from xmlregexp.c to report expected elements on content model errors.
* all_*.err any3_0_0.err choice_*.err list0_0_1.err list0_1_1.err:
  Adapted output of regression tests.
2005-01-13 12:10:11 +00:00
Kasimier T. Buchcik
8b41817d58 tiny enhancement for content model error reports (#157190, #143948).
* xmlschemas.c: tiny enhancement for content model error reports (#157190, #143948).
  Removed abbreviations: CT, ST and WC (#157190, reported by Frans  Englich).
  Initial: no report of local components.
* result/schemas/all* result/schemas/any3_0_0.err result/schemas/choice*
  result/schemas/cos-st-restricts-1-2-err_0_0.err result/schemas/derivation-ok-extension-err_0_0.err
  result/schemas/derivation-ok-extension_0_0.err result/schemas/derivation-ok-restriction-2-1-1_0_0.err
  result/schemas/derivation-ok-restriction-4-1-err_0_0.err result/schemas/deter0_0_0.err
  result/schemas/extension1_0_2.err result/schemas/facet-unionST-err1_0_0.err
  result/schemas/hexbinary_0_1.err result/schemas/list* result/schemas/restriction-attr1_0_0.err
  result/schemas/vdv-first4_0_1.err result/schemas/vdv-first4_0_2.err: Adapted output.
2004-11-17 13:14:27 +00:00