1
0
mirror of https://github.com/GNOME/libxml2.git synced 2025-05-31 21:23:22 +08:00

271 Commits

Author SHA1 Message Date
Kasimier T. Buchcik
570faa57c4 Initial implementation for redefinitions; this still misses checks for
* xmlschemas.c include/libxml/schemasInternals.h
  include/libxml/xmlerror.h: Initial implementation for
  redefinitions; this still misses checks for restrictions
  of the content model of complex types.
  Fixed default/fixed values for attributes (looks like they
  did not work in the last  releases).
  Completed constraints for attribute uses.
  Seperated attribute derivation from attribute constraints.
  Completed constraints for attribute group definitions.
  Disallowing <import>s of schemas in no target namespace if the
  importing schema is a chameleon schema. This contradicts
  the way Saxon, Xerces-J, XSV and IBM's SQC works, but the
  W3C XML Schema WG, thinks it is correct to dissalow such
  imports.
  Added cos-all-limited constraints.
  Restructured reference resolution to model groups and element
  declarations.
  Misc cleanup.
2005-10-10 13:18:40 +00:00
Daniel Veillard
33b20b70e2 release of 2.6.22 updated doc and rebuild. added XML_SAVE_NO_XHTML
* NEWS configure.in doc//*: release of 2.6.22 updated doc and
  rebuild.
* xmlsave.c include/libxml/xmlsave.h: added XML_SAVE_NO_XHTML
  xmlSaveOption
* xmlschemas.c: minor cleanups
Daniel
2005-09-12 21:43:20 +00:00
Kasimier T. Buchcik
22c0c46515 Completion of the schema graph. Centralisation, more robustness of the
* xmlschemas.c include/libxml/schemasInternals.h
  include/libxml/xmlerror.h: Completion of the schema graph.
  Centralisation, more robustness of the schema document
  aquisition story. Centralised and restructured component fixup.
  Fixed attribute derivation when 'prohibiting' attribute uses.
  Added warnings: when schema documents cannot be localized
  during imports; when we get duplicate and pointless attribute
  prohibitions. Changed error reports for IDCs to report
  the relevant IDC designation as well (requested by GUY Fabrice).
  Misc code-cleanup.
2005-09-12 19:09:46 +00:00
Kasimier T. Buchcik
630215baf8 Some preparation for the creation of a graph of
* xmlschemas.c: Some preparation for the creation of a graph
  of imported/included/redefined schemas; this is needed for
  at least the redefinitions.
  Centralized the creation of the parser context in one function.
2005-08-22 10:15:39 +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
Daniel Veillard
210536bd32 fix for bug #312945 as pointed by Dean Hill, the context type was not
* xmlschemas.c: fix for bug #312945 as pointed by Dean Hill, the
  context type was not always properly initialized.
Daniel
2005-08-10 21:40:02 +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
Kasimier T. Buchcik
004b5463eb Fixed a memory leak: xmlSchemaFreeAnnot() was only freeing the first
* xmlschemas.c: Fixed a memory leak: xmlSchemaFreeAnnot() was
  only freeing the first annotation in the list.
2005-08-08 12:43:09 +00:00
Daniel Veillard
24505b0f5c a lot of small cleanups based on Linus' sparse check output. Daniel
* HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c
  runsuite.c runtest.c schematron.c testHTML.c testReader.c
  testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c
  xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of
  small cleanups based on Linus' sparse check output.
Daniel
2005-07-28 23:49:35 +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
Kasimier T. Buchcik
5da6dd3428 Removed the workaround code in xmlSchemaValidateElemWildcard() for the
* xmlschemas.c: Removed the workaround code in
  xmlSchemaValidateElemWildcard() for the <any> wildcard
  with namespace == ##other. Support for such wildcards was
  implemented by Daniel at the automaton level recently, and
  the workaround code iterfered with it.
2005-07-23 21:12:30 +00:00
Kasimier T. Buchcik
041c5ffa5c Removed an "internal error" message from xmlSchemaBuildAContentModel()
* xmlschemas.c: Removed an "internal error" message from
  xmlSchemaBuildAContentModel() when an empty model group
  definition is hit.
2005-07-23 14:42:34 +00:00
Kasimier T. Buchcik
2c9aac03dc Fixed xmlSchemaPSimpleTypeErr(), which did not output the given string
* xmlschemas.c: Fixed xmlSchemaPSimpleTypeErr(), which did not
  output the given string arguments correctly.
2005-07-21 22:14:12 +00:00
Daniel Veillard
ffa3c74933 applied a patch from Marcus Boerger to fix problems with calling
* error.c globals.c parser.c runtest.c testHTML.c testSAX.c
  threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c
  xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h
  include/libxml/valid.h include/libxml/xmlIO.h
  include/libxml/xmlerror.h include/libxml/xmlexports.h
  include/libxml/xmlschemas.h: applied a patch from Marcus Boerger
  to fix problems with calling conventions on Windows this should
  fix #309757
Daniel
2005-07-21 13:24:09 +00:00
Daniel Veillard
0a119ebe61 an optimization of the char data inner loop, can gain up to 10% in pure
* parser.c: an optimization of the char data inner loop,
  can gain up to 10% in pure SAX2 parsing speed
* xmlschemas.c: applied patch from Kupriyanov Anatolij fixing
  a bug in XML Schemas facet comparison #310893
Daniel
2005-07-20 13:46:00 +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
Daniel Veillard
afc05b6871 fixed bug #307508, a bad automata was built but this showed as an
* xmlschemas.c: fixed bug #307508, a bad automata was built but
  this showed as an indeterminist result
Daniel
2005-07-17 06:11:19 +00:00
Daniel Veillard
da0aa4cfdb applied patch from Marcus Boerger to route relaxng and schemas error
* error.c relaxng.c xmlreader.c xmlschemas.c include/libxml/relaxng.h
  include/libxml/xmlschemas.h: applied patch from Marcus Boerger
  to route relaxng and schemas error messages when using the reader
  through the structured interface if activated.
* elfgcchack.h doc/* testapi.c: rebuilt since this add  new APIs
  to test.
Daniel
2005-07-13 23:07:49 +00:00
Daniel Veillard
1f33c4d61f preparing to make testsuite releases along with code source releases fixed
* xstc/Makefile.am README README.tests Makefile.tests Makefile.am:
  preparing to make testsuite releases along with code source releases
* gentest.py testapi.c: fixed a couple of problem introduced by
  the new Schemas support for Readers
* xpath.c: fixed the XPath attribute:: bug #309580, #309864 in a crude
  but simple way.
* xmlschemas.c include/libxml/tree.h: fixed a couple of problems
  raised by the doc builder.
* doc/*: made rebuild
Daniel
2005-07-10 21:38:31 +00:00
Daniel Veillard
df4223ece4 fixed a bug introduced on last commit daniel
* xmlschemas.c: fixed a bug introduced on last commit
daniel
2005-07-10 19:52:06 +00:00
Daniel Veillard
f10ae12cb8 fixed a typo pointed by Jeroen Ruigrok increased the APIs for xmlReader
* doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: fixed a typo
  pointed by Jeroen Ruigrok
* include/libxml/xmlreader.h include/libxml/xmlschemas.h: increased
  the APIs for xmlReader schemas validation support
* xmllint.c xmlreader.c xmlschemas.c: xmlReader schemas validation
  implementation and testing as xmllint --stream --schema ...
Daniel
2005-07-10 19:03:16 +00:00
Daniel Veillard
971771ef5a fix for #309761 from Dylan Shell added xmlSchemaSAXPlug and
* parser.c: fix for #309761 from Dylan Shell
* xmlschemas.c include/libxml/xmlschemas.h: added xmlSchemaSAXPlug
  and xmlSchemaSAXUnplug generic APIs for SAX Schemas validation.
* xmllint.c: couple of fixes plus added descriptions for --sax and
  --sax1
Daniel
2005-07-09 17:32:57 +00:00
Kasimier T. Buchcik
c306d904c6 Added c-props-correct constraint to check for equal cardinality of
* xmlschemas.c: Added c-props-correct constraint to check
  for equal cardinality of keyref/key.
* include/libxml/xmlerror.h: Added an error code.
2005-07-08 21:37:44 +00:00
Kasimier T. Buchcik
85aed6d010 tiny fix in xmlSchemaValidateStream() if a user-provided SAX handler is
* xmlschemas.c: tiny fix in xmlSchemaValidateStream() if a
  user-provided SAX handler is given.
2005-07-08 18:06:18 +00:00
Daniel Veillard
f0af8ec616 fix some potential leaks in error cases. added --sax, to allow testing of
* parser.c: fix some potential leaks in error cases.
* xmllint.c: added --sax, to allow testing of --schemas --sax and
  various other combinations.
* xmlschemas.c: fix a couple of tiny problems in
  xmlSchemaValidateStream()
Daniel
2005-07-08 17:27:33 +00:00
Kasimier T. Buchcik
72d3adc42f Changed xmlSchemaValidateFile() to use xmlSchemaValidateStream()
* xmlschemas.c: Changed xmlSchemaValidateFile() to use
  xmlSchemaValidateStream() internally.
2005-07-08 16:43:37 +00:00
Daniel Veillard
cdc82737e2 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
2005-07-08 15:04:06 +00:00
Daniel Veillard
39e5c89016 fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing
* testapi.c tree.c: fixing a leak detected by testapi in
  xmlDOMWrapAdoptNode, and fixing another side effect in testapi
  seems to pass tests fine now.
* include/libxml/parser.h parser.c: xmlStopParser() is no more limited
  to push mode
* error.c: remove a warning
* runtest.c xmllint.c: avoid compilation errors if only some parts
  of the library are compiled in.
Daniel
2005-07-03 22:48:50 +00:00
Kasimier T. Buchcik
9c215eb384 Fixed NULL values to be validated as empty string values (reported by
* xmlschemas.c: Fixed NULL values to be validated as empty
  string values (reported by Dhyanesh to the mailing list).
  Adjusted text concatenation of mixed content.
2005-06-21 08:38:49 +00:00
Kasimier T. Buchcik
84a56e313d Fixed SAX2 validation: grow of internal namespace list, appending of
* xmlschemas.c: Fixed SAX2 validation: grow of internal
  namespace list, appending of element character content.
* xstc/xstc.py: Added "--sax" option for SAX2 validation.
2005-06-16 12:44:35 +00:00
Daniel Veillard
81562d2d66 if sax1 is used and input is a file use the old API xmlParseFile()
* xmllint.c: if sax1 is used and input is a file use the old
  API xmlParseFile()
* xmlschemas.c: cleanups
* doc/* testapi.c elfgcchack.h: rebuilt to add python bindings
  for the new functions in Schemas.
Daniel
2005-06-15 13:27:56 +00:00
Kasimier T. Buchcik
c63fbbff72 Added xmlSchemaValidateFile() to the public API. This will use SAX2-driven
* xmlschemas.c include/libxml/xmlschemas.h: Added
  xmlSchemaValidateFile() to the public API. This will use
  SAX2-driven validation.
2005-06-15 12:54:05 +00:00
Kasimier T. Buchcik
9ca11bfc3d Some changes/fixes to the streaming evaluation. A bit of support for
* pattern.c: Some changes/fixes to the streaming evaluation.
* xmlschemas.c: A bit of support for parsing the schema for
  schema. Fixed attribute derivation when the use is
  "prohibited" and was "optional". Fixed an attribute construction
  bug, a left-over from the time, where <complexContent>,
  <extension>, etc. where created as structs.
2005-06-14 19:24:47 +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
4efd90d9c3 Changed the validation process to be able to work in streaming mode. Some
* xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h
  include/libxml/xmlschemastypes.h: Changed the validation process
  to be able to work in streaming mode. Some datatype fixes,
  especially for list and union types. Due to the changes the
  error report output has changed in most cases. Initial migration to
  functions usable by both, the parser and the validator. This should
  ease a yet-to-come XS construction API in the long term as well.
2005-06-09 10:32:53 +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
c0e833f002 Removed 5 unnecessary dereferences (reported by Andriy, bug #301074).
* xmlschemas.c xmlregexp.c: Removed 5 unnecessary
  dereferences (reported by Andriy, bug #301074).
2005-04-19 15:02:20 +00:00
Kasimier T. Buchcik
187ea5f657 Removed workaround for bug #172215, since it does more harm in some
* xmlschemas.c: Removed workaround for bug #172215, since it
  does more harm in some scenarios. Added some of the
  "Particle Restriction OK" constraints - not yet enabled.
2005-04-19 11:25:43 +00:00
Kasimier T. Buchcik
c872afbd82 Added output of canonical values in identity-constraint error messages.
* xmlschemas.c: Added output of canonical values in
  identity-constraint error messages.
* xmlschemastypes.c include/libxml/xmlschemastypes.h:
  Added xmlSchemaGetCanonValueWhtsp() to the API.
  Further enhancement of the canonical value
  conversion.
* test/schemas/changelog093_0.*: Added test with an XSD
  submitted by Randy J. Ray.
2005-04-18 10:57:04 +00:00
Kasimier T. Buchcik
016d92e30b Added substitution group constraints; changed the build of the
* xmlschemas.c: Added substitution group constraints; changed
  the build of the pre-computed substitution groups. Channeled
  errors during xsi assembling of schemas to the validation
  context. Fixed a big memory leak, which occured when using
  IDCs: the precomputed value of attributes was not freed if
  the attribute did not resolve to an IDC field (discovered
  with the help of Randy J. Ray's schema, posted to the
  xmlschema-dev maling list).
2005-04-08 20:08:40 +00:00
Kasimier T. Buchcik
1a99a39745 Added "Particle correct 2" to parsing of model groups. Added handling
* xmlschemas.c: Added "Particle correct 2" to parsing of model groups.
  Added handling substitution groups inside <choice> and <sequence>;
  for <all> this is not supported yet. Changed circular checks for
  model groups definitions. "memberTypes" are processed at different
  levels now: component resolution first, construction later; this
  goes hand in hand with a global change to handle component
  resolution in a distinct phase. Fixed invalid default values for
  elements to mark the schema as invalid; this just resulted in an
  error report previously, but the schema was handled as valid.
  Separated the assignment of the model groups to referencing
  model group definition references (i.e. particles); this was
  needed to perform the circularity check for model group definitions.
  Added "Element Declaration Properties Correct (e-props-correct)"
  constraints. Separated component resolution for simple/complex
  types.
* include/libxml/schemasInternals.h: Added a flag for substitution
  group heads.
2005-04-08 11:23:56 +00:00
Kasimier T. Buchcik
5e371a048c Added "Type Derivation OK (Complex)" constraints and anchored them in the
* xmlschemas.c: Added "Type Derivation OK (Complex)" constraints
  and anchored them in the "Element Locally Valid (Element)"
  constraints. This restricts the type substitution via "xsi:type".
2005-04-05 15:08:05 +00:00
Daniel Veillard
f35984584e patch from Matthew Burgess to improve some schemas facets validation
* xmlschemas.c: patch from Matthew Burgess to improve some schemas
  facets validation messages.
Daniel
2005-04-05 11:10:45 +00:00
Kasimier T. Buchcik
aba15f7670 Corrected 'length' facet validation for QNames and notations. Corrected
* xmlschemastypes.c: Corrected 'length' facet validation for
  QNames and notations. Corrected xmlSchemaGetCanonValue: some
  data types did not return a value if already in normalized
  form.
* xmlschemas.c include/libxml/schemasInternals.h:
  Eliminated creation of structs for <restriction>, <extension>,
  <simpleContent>, <complexContent>, <list> and <union>: the
  information is now set directly on the corresponding simple/
  complex type. Added some more complex type constraints.
  Added facet derivation constraints. Introduced "particle"
  components, which seem to be really needed if applying
  constraints. Corrected/change some of the parsing functions.
  This is all a bit scary, since a significant change to the code.
* result/schemas/src-element2-*.err result/schemas/element-*.err:
  Adapted regression test results.
2005-04-01 15:17:27 +00:00
Daniel Veillard
5d4644ef6e revamped the elfgcchack.h format to cope with gcc4 change of aliasing
* doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
  format to cope with gcc4 change of aliasing allowed scopes, had
  to add extra informations to doc/libxml2-api.xml to separate
  the header from the c module source.
* *.c: updated all c library files to add a #define bottom_xxx
  and reimport elfgcchack.h thereafter, and a bit of cleanups.
* doc//* testapi.c: regenerated when rebuilding the API
Daniel
2005-04-01 13:11:58 +00:00
Daniel Veillard
0e460da346 another patch from Brent Hendricks to add new handlers with the various
* python/generator.py python/libxml.py: another patch from Brent
  Hendricks to add new handlers with the various validity contexts
* python/tests/Makefile.am python/tests/validDTD.py
  python/tests/validRNG.py python/tests/validSchemas.py: also
  added the regression tests he provided
Daniel
2005-03-30 22:47:10 +00:00
Kasimier T. Buchcik
53b5e0526f Fixed call to a facet error report: the type of the error was wrong,
* xmlschemas.c: Fixed call to a facet error report: the type of
  the error was wrong, resulting in a segfault (bug #171220, reported
  by GUY Fabrice).
2005-03-24 11:05:13 +00:00