1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-29 21:46:59 +03:00

692 Commits

Author SHA1 Message Date
Kasimier T. Buchcik
478d693fa2 Hopefully finished validation against facets to use the normalized value
* xmlschemas.c xmlschemastypes.c include/libxml/xmlschemastypes.h:
  Hopefully finished validation against facets to use the normalized
  value of both, the facets and instance values. Added
  xmlSchemaValidateLengthFacetWhtsp(), xmlSchemaValidateFacetWhtsp()
  and xmlSchemaGetValType() to the schema API.
2005-03-16 16:29:18 +00:00
Kasimier T. Buchcik
6c81d0ea8d In preparation to use normalized values of facets during validation:
* xmlschemastypes.c xmlschemastypes.h: In preparation to use
  normalized values of facets during validation: changed the
  arguments of some string comparison functions; added a static
  xmlSchemaValidateFacetInternal() with more arguments to be
  more flexible. Prepared XML_SCHEMA_FACET_ENUMERATION validation
  to use the comparison functions. Fixed some assignments in
  xmlSchemaValAtomicType(): total digit count, lo, mi, hi.
2005-03-15 14:58:11 +00:00
Daniel Veillard
c0c6ce2918 some gcc4 portability patches, including a serious aliasing bug exposed in
* include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability
  patches, including a serious aliasing bug exposed in s390
  when trying to convert data pointer to code pointer.
Daniel
2005-03-10 09:22:07 +00:00
Kasimier T. Buchcik
285ebabb07 Enabled IDC parsing and validation. Added xmlSchemaCopyValue to the API;
* xmlschemas.c: Enabled IDC parsing and validation.
* xmlschemastypes.c include/libxml/xmlschemastypes.h:
  Added xmlSchemaCopyValue to the API; this was done due to
  validation of default attributes against IDCs: since IDC keys
  consume the precomputed value, one needs a copy.
* pattern.c: Enabled IDC support; this is currently done
  via calling xmlPatterncompile with a flag arg of 1.
2005-03-04 18:04:59 +00:00
Daniel Veillard
5e094143e4 applied patch from Aron Stansvik to add xmlTextReaderByteConsumed() added
* xmlreader.c include/libxml/xmlreader.h: applied patch from
  Aron Stansvik to add xmlTextReaderByteConsumed()
* testReader.c: added a test option
* xmlschemastypes.c: fix a lack of pointer checking in APIs
Daniel
2005-02-18 19:36:12 +00:00
Kasimier T. Buchcik
2a0fdd9101 Some experimental addition for parsing of expressions and streamable
* pattern.c pattern.h: Some experimental addition for parsing
  of expressions and streamable validation.
  Added xmlStreamPushAttr to the API.
2005-02-17 21:34:45 +00:00
Kasimier T. Buchcik
b06b4dede2 Added validation for the attribute "id" in the schemata; doing this needed
* xmlschemas.c: Added validation for the attribute "id" in the
  schemata; doing this needed error report fixes for notations,
  facets and group. Changed NOTATION validation to work with the
  declared NOTATIONs in the schema; this does have no impact on
  the validation via the relaxng module.
* xmlschemastypes.c include/libxml/xmlschemastypes.h:
  Added xmlSchemaNewNOTATIONValue to the API to be able to do
  the NOTATION validation described above.
* test/schemas/element-err_0.xsd test/schemas/annot-err_0.xsd:
  Fixed the values of the "id" attributes, which were not validated
  previously.
2005-02-17 19:00:23 +00:00
Kasimier T. Buchcik
6e224f1272 Fixed comparison for default/fixed attribute values, if the type was
* xmlschemas.c: Fixed comparison for default/fixed attribute
  values, if the type was 'xsd:string'. Changed the comparison
  for IDCs to use the whitespace aware comparison function.
* xmlschemastypes.c include/libxml/xmlschemastypes.h:
  Added xmlSchemaGetCanonValue, xmlSchemaNewStringValue and
  xmlSchemaCompareValuesWhtsp to the API. Added functions
  to compare strings with whitespace combinations of "preserve",
  "replace" and "collapse".
2005-02-17 11:10:44 +00:00
Daniel Veillard
56de87ee0d fix the comment to describe the real return values lot of work on the
* encoding.c: fix the comment to describe the real return values
* pattern.c xpath.c include/libxml/pattern.h: lot of work on
  the patterns, pluggin in the XPath default evaluation, but
  disabled right now because it's not yet good enough for XSLT.
  pattern.h streaming API are likely to be changed to handle
  relative and absolute paths in the same expression.
Daniel
2005-02-16 00:22:29 +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
William M. Brack
015ccb2c74 This change started out as a simple desire to speed up the
execution time of testapi.c, which was being delayed by
nameserver requests for non-existent URL's.  From there it
just sort of grew, and grew....
* nanohttp.c, nanoftp.c: changed the processing of URL's
  to use the uri.c routines instead of custom code.
* include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX
* uri.c: added accepting ipV6 addresses, in accordance with
  RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6)
* gentest.py, testapi.c: fixed a few problems with the
  testing of the nanoftp and nanohttp routines.
* include/libxml/xmlversion.h: minor change to fix a
  warning on the docs generation
* regenerated the docs
2005-02-13 08:18:52 +00:00
Daniel Veillard
2fc6df95cc added a streaming pattern detector for a subset of XPath, should help
* pattern.c include/libxml/pattern.h xmllint.c: added a
  streaming pattern detector for a subset of XPath, should
  help Kasimier for identity constraints
* python/generator.py: applied Stephane Bidoul patch to find
  paths without breaking.
Daniel
2005-01-30 18:42:55 +00:00
Kasimier T. Buchcik
e8a550b392 Added an initial skeleton for indentity-constraints. This is all defined
* xmlschemas.c include/libxml/schemasInternals.h:
  Added an initial skeleton for indentity-constraints. This is all
  defined out, since not complete, plus it needs support from other
  modules.
  Added machanism to store element information for the
  ancestor-or-self axis; this is needed for identity-constraints
  and should be helpfull for a future streamable validation.
* include/libxml/xmlerror.h: Added an error code for
  identity-constraints.
2005-01-27 12:49:31 +00:00
Daniel Veillard
cee2b3a5f1 warning patches from Peter Breitenlohner serious DTD parsing speedups,
* testdso.c xmlregexp.c: warning patches from Peter Breitenlohner
* include/libxml/valid.h valid.c parser.c: serious DTD parsing
  speedups, start to deprecate 3 ElementDef related entry point
  and replace them with better ones.
Daniel
2005-01-25 00:22:52 +00:00
Daniel Veillard
316a5c3989 added xmlHashCreateDict where the hash reuses the dictionnary for internal
* hash.c include/libxml/hash.h: added xmlHashCreateDict where
  the hash reuses the dictionnary for internal strings
* entities.c valid.c parser.c: reuse that new API, leads to a decent
  speedup when parsing for example DocBook documents.
Daniel
2005-01-23 22:56:39 +00:00
Daniel Veillard
1441251f85 a single lock version mostly avoid the cost penalty of the lock in case of
* dict.c parser.c include/libxml/dict.h: a single lock version
  mostly avoid the cost penalty of the lock in case of low
  parallelism, so applying that version instead.
Daniel
2005-01-21 23:53:26 +00:00
Daniel Veillard
6fc5db0090 trying to fix at least the message from bug #158628 added first xmlsave
* xmlschemastypes.c: trying to fix at least the message from
  bug #158628
* include/libxml/xmlsave.h xmlsave.c: added first xmlsave option
  for format, c.f. bug #159997
Daniel
2005-01-16 00:05:58 +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
Daniel Veillard
cc026dc6b0 extended xmlRegExecErrInfo() and xmlRegExecNextValues() to return error
* include/libxml/xmlregexp.h xmlregexp.c: extended xmlRegExecErrInfo()
  and xmlRegExecNextValues() to return error transition strings too,
  and sink state detection and handling.
Daniel
2005-01-12 13:21:17 +00:00
Daniel Veillard
fc0b6f6ada William noticed I forgot to add special support for xmlmodules.c define
* gentest.py testapi.c: William noticed I forgot to add special
  support for xmlmodules.c define
* xmlregexp.c include/libxml/xmlregexp.h: added terminal to
  xmlRegExecErrInfo() API, adding new xmlRegExecNextValues()
  entry point and refactored to use both code.
Daniel
2005-01-09 17:48:02 +00:00
Aleksey Sanin
8fdc32abfe fixing col information in xmlParserInput and propagating column into xmlError 2005-01-05 15:37:55 +00:00
Daniel Veillard
48df9613ba fixed namespace bug in push mode reported by Rob Richards added it to the
* parser.c: fixed namespace bug in push mode reported by
  Rob Richards
* test/ns6 result//ns6*: added it to the regression tests
* xmlmodule.c testModule.c include/libxml/xmlmodule.h:
  added an extra option argument to module opening and defined
  a couple of flags to the API.
Daniel
2005-01-04 21:50:05 +00:00
Daniel Veillard
be076e9b06 applied patch from Bjorn Reese, plus some cleanups fixed the stylesheet to
* xmlmodule.c include/libxml/xmlmodule.h: applied patch from
  Bjorn Reese, plus some cleanups
* elfgcchack.h doc/elfgcchack.xsl: fixed the stylesheet to
  add the new header
* doc/* testapi.c: regenerated the API
Daniel
2005-01-04 20:18:14 +00:00
Daniel Veillard
f6b71bd176 making DSO support an option code and documentation cleanups regenerated
* configure.in: making DSO support an option
* xmlmodule.c xmlreader.c include/libxml/xmlmodule.h: code
  and documentation cleanups
* elfgcchack.h testapi.c doc/*: regenerated the docs and
  checks for new module
* test/valid/REC-xml-19980210.xml: fix a small change introduced
  previously
Daniel
2005-01-04 17:50:14 +00:00
Daniel Veillard
ce1648b124 applied DSO support patch 2 from Joel Reed Daniel
* Makefile.am config.h.in configure.in error.c libxml-2.0.pc.in
  testModule.c testdso.c xml2-config.in xmllint.c xmlmodule.c
  include/libxml/Makefile.am include/libxml/xmlerror.h
  include/libxml/xmlmodule.h include/libxml/xmlversion.h.in
  include/libxml/xmlwin32version.h.in: applied DSO support
  patch 2 from Joel Reed
Daniel
2005-01-04 15:10:22 +00:00
Aleksey Sanin
d671e2863e GetLineNumber and GetColumnNumber functions for xmlReader 2005-01-03 21:58:59 +00:00
William M. Brack
21e4ef20f6 Re-examined the problems of configuring a "minimal" library.
Synchronized the header files with the library code in order
to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
were the same in both.  Modified the API database content to more
accurately reflect the conditionals.  Enhanced the generation
of that database.  Although there was no substantial change to
any of the library code's logic, a large number of files were
modified to achieve the above, and the configuration script
was enhanced to do some automatic enabling of features (e.g.
--with-xinclude forces --with-xpath).  Additionally, all the format
errors discovered by apibuild.py were corrected.
* configure.in: enhanced cross-checking of options
* doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
  doc/libxml2-api.xml, gentest.py: changed the usage of the
  <cond> element in module descriptions
* elfgcchack.h, testapi.c: regenerated with proper conditionals
* HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
  testSAX.c: cleaned up conditionals
* include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
  hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
  valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
  synchronized the conditionals with the corresponding module code
* doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
  added additional conditions required for compilation
* doc/*.html, doc/html/*.html: rebuilt the docs
2005-01-02 09:53:13 +00:00
William M. Brack
ad0e67c57f fixed up some gcc warnings, no change to logic. New macro XML_CAST_FPTR to
* dict.c, xpath.c, include/libxml/hash.h: fixed up some gcc warnings,
  no change to logic.  New macro XML_CAST_FPTR to circumvent gcc
  warnings on function pointer <-> object pointer (a hack).
2004-12-01 14:35:10 +00:00
Daniel Veillard
6bb3e86d2c added xmlDictExists() to the dictionnary interface. applying
* dict.c include/libxml/dict.h: added xmlDictExists() to the
  dictionnary interface.
* xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces
  from Rob Richards
Daniel
2004-11-24 12:39:00 +00:00
Kasimier T. Buchcik
91feaf8477 Correct symbol space for 'all' and 'choice'. Added 'replace' normalization
* xmlschemas.c: Correct symbol space for 'all' and 'choice'.
* xmlschemastypes.c include/xmlschemastypes.h: Added 'replace'
  normalization for 'normalizedString'.
  Added xmlSchemaWhiteSpaceReplace to the API.
2004-11-12 14:04:58 +00:00
Daniel Veillard
d0cf7f6eea integrated in "make tests" added -q option, and more conditional features
* Makefile.am gentest.py testapi.c: integrated in "make tests"
  added -q option, and more conditional features fixes
* catalog.c debugXML.c parser.c testThreads.c xmllint.c
  xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h
  include/libxml/debugXML.h: various compilation and conditional
  cleanups.
* doc/*: regenerated
Daniel
2004-11-09 16:17:02 +00:00
Daniel Veillard
a82b182655 more coverage more fixes Daniel
* gentest.py testapi.c: more coverage
* debugXML.c parser.c xmlregexp.c xpath.c: more fixes
Daniel
2004-11-08 16:24:57 +00:00
Daniel Veillard
57b2516af5 augmented type autogeneration for enums removed direct error reporting.
* gentest.py testapi.c: augmented type autogeneration for enums
* xpath.c include/libxml/xpath.h: removed direct error reporting.
Daniel
2004-11-06 14:50:18 +00:00
Daniel Veillard
34099b4031 changing the way the .c is generated, extending the tests coverage fixing
* gentest.py testapi.c: changing the way the .c is generated,
  extending the tests coverage
* include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some
  function signatures, regenerating stuff
* SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening
Daniel
2004-11-04 17:34:35 +00:00
Daniel Veillard
dd6d300896 more fixes and extending the tests coverage adding a type init interface
* gentest.py testapi.c: more fixes and extending the tests coverage
* relaxng.c include/libxml/relaxng.h: adding a type init interface
* include/libxml/xmlerror.h parser.c xmlreader.c xmlwriter.c: more
  cleanups and bug fixes raised by the regression tests
Daniel
2004-11-03 14:20:29 +00:00
Daniel Veillard
8a32fe4839 more testing and coverage more cleanups rebuilt Daniel
* gentest.py testapi.c: more testing and coverage
* elfgcchack.h xmlstring.c include/libxml/xmlstring.h: more cleanups
* doc/*: rebuilt
Daniel
2004-11-02 22:10:16 +00:00
Daniel Veillard
36e5cd5064 adding xmlMemBlocks() work on generator of an automatic API regression
* xmlmemory.c include/libxml/xmlmemory.h: adding xmlMemBlocks()
* Makefile.am gentest.py testapi.c: work on generator of an
  automatic API regression test tool.
* SAX2.c nanoftp.c parser.c parserInternals.c tree.c xmlIO.c
  xmlstring.c: various API hardeing changes as a result of running
  teh first set of automatic API regression tests.
* test/slashdot16.xml: apparently missing from CVS, commited it
Daniel
2004-11-02 14:52:23 +00:00
Daniel Veillard
eff45a92da register xmlSchemaSetValidErrors, patch from Brent Hendricks in the
* python/libxml.c: register xmlSchemaSetValidErrors, patch from
  Brent Hendricks in the mailing-list
* include/libxml/valid.h HTMLparser.c SAX2.c valid.c
  parserInternals.c: fix #156626 and more generally how to find out
  if a validation contect is part of a parsing context or not. This
  can probably be improved to make 100% sure that vctxt->userData
  is the parser context too. It's a bit hairy because we can't
  change the xmlValidCtxt structure without breaking the ABI since
  this change xmlParserCtxt information indexes.
Daniel
2004-10-29 12:10:55 +00:00
Daniel Veillard
03a53c34db added checking for names values and dictionnaries generates a tons of
* debugXML.c include/libxml/xmlerror.h: added checking for names
  values and dictionnaries generates a tons of errors
* SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
  include/libxml/tree.h: fixing the errors in the regression tests
Daniel
2004-10-26 16:06:51 +00:00
Daniel Veillard
e2811270e8 applied patch from Graham Bennett adding 4 convenience functions to the
* include/libxml/xmlreader.h xmlreader.c: applied patch from
  Graham Bennett adding 4 convenience functions to the reader API.
Daniel
2004-10-19 09:04:23 +00:00
Daniel Veillard
c6095788c4 added UTF-8 string checking, raise a problem, need debug Daniel
* debugXML.c include/libxml/xmlerror.h: added UTF-8 string checking,
  raise a problem, need debug
Daniel
2004-10-15 14:50:10 +00:00
Daniel Veillard
0d24b11c34 added namespace checking daniel
* debugXML.c include/libxml/xmlerror.h: added namespace checking
daniel
2004-10-11 12:28:34 +00:00
Daniel Veillard
8de5c0bd79 adding the tree debug mode fixing various problems reported by the debug
* debugXML.c include/libxml/debugXML.h include/libxml/xmlerror.h:
  adding the tree debug mode
* parser.c relaxng.c tree.c xpath.c: fixing various problems reported
  by the debug mode.
* SAX2.c: another tree fix from Rob Richards
Daniel
2004-10-07 13:14:19 +00:00
Daniel Veillard
22cdb842fd revamped the XML debugging module and prepare for a new checking mode
* configure.in debugXML.c include/libxml/xmlversion.h.in
  include/libxml/xmlwin32version.h.in: revamped the XML debugging
  module and prepare for a new checking mode
Daniel
2004-10-04 14:09:17 +00:00
William M. Brack
d1757abcb8 added two new macros IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
* include/libxml/parserInternals.h: added two new macros
  IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
  parsing and xpath for testing data not necessarily
  unicode.
* HTMLparser.c, xpath.c: changed use of IS_LETTER_CH and
  IS_DIGIT_CH macros to ascii versions (bug 153936).
2004-10-02 22:07:48 +00:00
Kasimier T. Buchcik
87876407ce Parsing of <complexContent> - handle attribute 'mixed', catch illegal
* xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h
  include/libxml/schemasInternals.h: Parsing of <complexContent>
  - handle attribute 'mixed', catch illegal attributes.
  Parsing of <complexType> - handle attributes 'abstract',
  'final' and 'block', catch illegal attributes.
  Validation of complex types - handle abstract types.
  Added handling of default/fixed attributes and element values.
  Per validation option attribute nodes/text nodes are created
  on the instance.
  Added the corresponding constraints for fixed/default.
  Added xmlSchemaSetValidOptions, xmlSchemaGetValidOptions
  to the external API.
  Extended element declaration constraints.
  Got rid of perseverative creation of temporery validation/parser
  contexts.
  Added handling of xsi:schemaLocation and
  xsi:noNamespaceSchemaLocation.
  Fixed xsi:type component resolution if using non-prefixed
  QNames.
* xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h:
  Enabled namespace awareness of the content model if using the
  model group "all".
* test/schemas/bug152470_1.xsd: Removed an "abstract" attribute,
  which broke the test.
* xstc/xstc.py:  Workaround to accomodate case insensitive
  test definitions in ms-test.def.xml (was missing in a previous
  commit).
2004-09-29 13:29:03 +00:00
William M. Brack
13dfa87e91 added the routine xmlNanoHTTPContentLength to the external API
* nanohttp.c, include/libxml/nanohttp.h: added the routine
  xmlNanoHTTPContentLength to the external API (bug151968).
* parser.c: fixed unnecessary internal error message (bug152060);
  also changed call to strncmp over to xmlStrncmp.
* encoding.c: fixed compilation warning (bug152307).
* tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed
  a couple of compilation warnings.
* HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation
  warnings; no change to logic.
2004-09-18 04:52:08 +00:00
Kasimier T. Buchcik
876a6db193 Simpified attribute wildcard creation and assignment to get rid of memory
* xmlschemas.c include/libxml/schemasInternals.h
  test/schemas/bug152470_1.* result/schemas/bug152470_1_1*:
  Simpified attribute wildcard creation and assignment to get rid
  of memory leaks.
  Restructured the validation process.
  Restructured and expanded parsing of <attributeGroup>.
  Added initial handing of xsi:type.
  Advanced handling of xsi:nil (should work now for simple types).
  Added construction of schemata using xsi:schemaLocation and
  xsi:noNamespaceSchemaLocation; this is not enabled, since
  no corresponding API exists yet.
  Moved the content model to complex type components.
  Resolution of types for attributes will look for simple types
  only (incl. all the built-in simple types).
  Extended parsing of 'anyAttribute'.
  Fixed content-type type for complex types if derived from
  'anyType' using the short-hand form (see bug # 152470,
  submitted by Thilo Jeremias).
* include/libxml/xmlschematypes.h: Cleaned up some comments.
* xstc/xstc.py: Workaround to accomodate case insensitive
  test definitions in ms-test.def.xml.
* result/schemas/deter0_0_0.err result/schemas/ns0_0_2.err
  result/schemas/ns0_1_2.err: Adapted.
2004-09-16 11:31:52 +00:00
Kasimier T. Buchcik
5eba91f2d9 Added the function xmlSchemaValidateOneElement to the XML Schema
* xmlschemas.c include/libxml/xmlschemas.h: Added the function
  xmlSchemaValidateOneElement to the XML Schema validation API,
  as proposed by Jeffrey Fink - see bug # 152073.
2004-09-08 09:17:27 +00:00
Kasimier T. Buchcik
383434b2f7 Fixed a seg fault in xmlGetQNameProp: a format argument was missing. Fixed
* xmlschemas.c include/libxml/schemasInternals.h
  include/libxml/xmlerror.h: Fixed a seg fault in xmlGetQNameProp:
  a format argument was missing.
  Fixed wrong assignment of the owner of a wildcard in
  xmlSchemaBuildAttributeValidation (in the shorthandform of
  <complexType>; this caused a seg fault, due to a double-free
  of the wildcard.
  Added a check for circular attribute group references.
  Added a check for circular model group definition references.
  Fixed a dublicate xmlParserErrors enum value - see bug #151738.
2004-09-03 18:55:35 +00:00