summaryrefslogtreecommitdiff
path: root/xmlschemas.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix -Wmisleading-indentation warningsNick Wellnhofer2017-11-271-4/+4
|
* Fix misc callback signaturesNick Wellnhofer2017-11-091-7/+6
| | | | | Fix parameter and return types for xmlC14NIsVisibleCallback and xmlRegExecCallbacks.
* Fix hash callback signaturesNick Wellnhofer2017-11-091-18/+40
| | | | | | | | | Make sure that all parameters and return values of hash callback functions exactly match the callback function type. This is required to pass clang's Control Flow Integrity checks and to allow compilation to asm.js with Emscripten. Fixes bug 784861.
* Fix -Wimplicit-fallthrough warningsJ. Peter Mugaas2017-10-211-0/+1
| | | | | Add "falls through" comments to quench implicit-fallthrough warnings which are enabled by -Wextra under GCC 7.
* Porting libxml2 on zOS encoding of codeStéphane Michaut2017-08-281-0/+6
| | | | | | | | | | First set of patches for zOS - entities.c parser.c tree.c xmlschemas.c xmlschemastypes.c xpath.c xpointer.c: ask conversion of code to ISO Latin 1 to avoid having the compiler assume EBCDIC codepoint for characters. - xmlmodule.c: make sure we have support for modules - xmlIO.c: zOS path names are special avoid dsome of the expectstions from Unix/Windows
* Fix signature of xmlSchemaAugmentImportedIDCDaniel Veillard2017-07-271-1/+1
| | | | | | | | this is used in a callback which will pass a name, the name is ignored but it's best to have the signature of the function match, pointed out by Claude Petit * xmlschemas.c: fix xmlSchemaAugmentImportedIDC() signature no functional change
* Spelling and grammar fixesNick Wellnhofer2017-06-171-17/+17
| | | | | Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other misspellings.
* Fix cast-align warningsNick Wellnhofer2017-06-171-1/+3
| | | | | | | | | | | | | - Suppress warnings in xmlmemory.c by casting to 'void *'. - Remove unneeded cast in xmlschemas.c that caused a macro precedence error. - Add dummy fields to short structs in xmlschemas.c. This increases the size of the structs, but I can't see a better solution without using C11's _Alignof operator. There are still a couple of cast-align warnings in encoding.c. These are legitimate portability issues that can't be fixed without reworking the conversion functions.
* Fix attribute decoding during XML schema validationAlex Henrie2016-08-291-5/+25
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=766834 vctxt->parserCtxt is always NULL in xmlSchemaSAXHandleStartElementNs, so this function can't call xmlStringLenDecodeEntities to decode the entities.
* relaxng.c, xmlschemas.c: Fix build on pre-C99 compilersChun-wei Fan2016-06-231-1/+1
| | | | | | Make sure that the variables are declared at the top of the block. https://bugzilla.gnome.org/show_bug.cgi?id=767063
* More format string warnings with possible format string vulnerabilityDavid Kilzer2016-05-231-13/+26
| | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
* Fix some format string warnings with possible format string vulnerabilityDavid Kilzer2016-05-231-33/+33
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
* Fix XSD validation of URIs with ampersandsAlex Henrie2016-05-031-3/+10
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=709171 This makes xmlSchemaSAXHandleStartElementNs pass attributes through xmlStringDecodeEntities, similar to how xmlSchemaVDocWalk passes them through xmlNodeListGetString.
* Fix typos: dictio{ nn -> n }ar{y,ies}Jan Pokorný2016-04-151-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Correct spelling of "calling"Alex Henrie2015-10-261-1/+1
|
* Fix a self assignment issue raised by clangScott Graham2015-06-301-3/+3
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=751679 Also added a few newline cleanups
* no error column in structured error handler for xml schema validation errorsJuergen Keil2014-08-071-1/+3
| | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=734363 When using xml schema validation, structured error callbacks do not get passed a valid column number in xmlError field "int2". $ ./xmlsaxparse colbug5.xml colbug5.xsd colbug5.xml:3:0: Element '{urn:colbug5}bx': This element is not expected. Expected is ( {urn:colbug5}b ). The schema error is reported for line 3, column 0 (= N/A). I'd like to have the column number of the error passed in the xmlError structure. With this test case: line 3, column 9.
* Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.cJan Pokorný2013-11-301-274/+274
| | | | | | | | | Middle dot pairs (as in [1]) turned to grave accents/backticks, section signs to dollars (for compatibility with ASCII). [1] http://www.w3.org/TR/xmlschema-1/ Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Fix typos in xmlschemas{,types}.cJan Pokorný2013-11-301-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Type mismatch in xmlschemas.cGaurav2013-11-281-1/+1
| | | | For https://bugzilla.gnome.org/show_bug.cgi?id=715152
* Fix an old bug in xmlSchemaValidateOneElementCsaba László2013-03-181-1/+4
| | | | | | | | | | | | | | | | | Recently I have run into the very same problem Tiberius Duluman did back in Wed, 13 May 2009 15:56:55 +0300 ([xml] Bug in xmlSchemaValidateOneElement function). Now I can proof now that his problem is a valid problem. I checked the latest available version of xmlschemas.c (2.9.0.) and the problem is still there! I think I have found a solution to the problem which I'd like proof with you: My quick solution to the problem is to replace line 27849 in xmlschemas.c (v2.9.0.) in function xmlSchemaVDocWalk valRoot = xmlDocGetRootElement(vctxt->doc); with this one: valRoot = vctxt->validationRoot ? vctxt->validationRoot : xmlDocGetRootElement(vctxt->doc); Currently I'm using version 2.7.8. in Windows and this change seems to solve the problem.
* fix schema validation in combination with xsi:nilDaniel Veillard2013-02-281-0/+17
| | | | | | | | | Based on Thomas Gamper <icicle@cg.tuwien.ac.at> findings and initial patch There is no point doing a regexp validation of further content if there actually is no further content because the element is nilled.
* Big space and tab cleanupDaniel Veillard2012-09-111-69/+69
| | | | Remove all space before tabs and space and tabs at end of lines.
* Fix an XSD error when generating internal automataDaniel Veillard2012-08-231-0/+9
| | | | | | When generating a sequence add an extra epsilon transition to avoid further constructs from entering via the last state Bug reported by Johan Corveleyn <jcorvel@gmail.com>
* Fix a variable name in commentDaniel Veillard2012-08-151-1/+1
|
* Fix file and line report for XSD SAX and reader streaming validationDaniel Veillard2012-08-141-1/+105
| | | | | | | | | | | | | | | | | | | | | | | Things now work correctly at the xmllint level: thinkpad:~/XML -> xmllint --sax --noout --schema test_schema.xsd test_xml.xml test_xml.xml:72721: Schemas validity error : Element 'level1': Missing child element(s). Expected is ( level2 ). test_xml.xml fails to validate thinkpad:~/XML -> xmllint --stream --schema test_schema.xsd test_xml.xml test_xml.xml:72721: Schemas validity error : Element 'level1': Missing child element(s). Expected is ( level2 ). test_xml.xml fails to validate thinkpad:~/XML -> * error.c: fix a corner case of not reporting lines when we should * include/libxml/xmlschemas.h doc/symbols.xml: had to add new entry points to set the filename on a validation context and a locator callback used to fetch the line and file from the context * xmlschemas.c: add the new entry points xmlSchemaValidateSetFilename() and xmlSchemaValidateSetLocator(), plus make sure the error reporting routine gets the information if available. Add a locator for SAX. * xmlreader.c: add and plug a locator for readers.
* XSD: optional element in complex type extensionRemi Gacogne2012-05-111-2/+2
| | | | | | | | | 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
* Fix a logic error in Schemas Component ConstraintsRyan Sleevi2012-02-291-1/+1
|
* Fix XSD validation bug #630130Toyoda Eizi2011-08-041-3/+4
| | | | | This bug in xmlschemas made validation with the GML Schemas fail Test cases to be commited separately
* 627987 Fix XSD IDC errors in imported schemasJim Panetta2010-11-031-0/+5
| | | | | Fix XSD IDC references when xsi:schemalocation is used for referencing the validation schemas
* Fix memory leak when doc is NULLRob Richards2009-09-241-2/+2
| | | | * xmlschemas.c: fix memory leak when doc is NULL
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-1/+0
| | | | | | | | * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
* A few more safety cleanup raised by scanDaniel Veillard2009-09-071-1/+2
| | | | | * SAX2.c encoding.c parser.c xmlschemas.c: a few more safety checks * relaxng.c: remove an unused intitialization
* Fixing assorted potential problems raised by scanDaniel Veillard2009-09-071-7/+9
| | | | | * encoding.c parser.c relaxng.c runsuite.c tree.c xmlreader.c xmlschemas.c: nothing really serious but better safe than sorry
* 579746 XSD validation not correct / nilable groupsDaniel Veillard2009-08-261-204/+255
| | | | | | | | | * 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
* 571271 fix semantic of xsd:all with minOccurs=0Daniel Veillard2009-08-121-5/+9
| | | | | | | | | | | * 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
* 585505 – Document ids and refs populated by XSDWayne Jensen2009-08-071-2/+2
| | | | | * xmlschemas.c: simple patch allowing document ids and refs to be asserted when XSD validation is done.
* 582906 XSD validating multiple imports of the same schemaJason Childs2009-08-071-8/+9
| | | | | | | | * 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
* Bug 582887 – problems validating complex schemasJason Childs2009-08-071-15/+27
| | | | | | | * 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
* Bug 579729 – fix XSD schemas parsing crashMiroslav Bajtos2009-08-071-1/+1
| | | | | * xmlschemas.c: a typo in XSD schema validation, where inherited bfminlen rewrote blength and caused SIGSEGV
* Fix an XSD validation crashDaniel Veillard2009-07-271-10/+12
| | | | * xmlschemas.c: fix a crash reported by Daniel Albeseder #589895
* * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.cDaniel Veillard2009-06-041-1/+1
| | | | | valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string patch by Christian Persch, fixes #581612
* preparing 2.7.0 release remove some testing traces remove some warningsLIBXML2.7.0Daniel Veillard2008-08-301-1/+5
| | | | | | | | | * configure.in, doc/*: preparing 2.7.0 release * tree.c: remove some testing traces * parser.c xmlIO.c xmlschemas.c: remove some warnings Daniel svn path=/trunk/; revision=3788
* add the testchar to 'make check' Volker Grabsch pointed out a typoDaniel Veillard2008-08-261-1/+1
| | | | | | | | | | | | | | | * 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
* fix crash with invalid whitespace facetRob Richards2008-06-291-274/+274
| | | | | | * xmlschemas.c: fix crash with invalid whitespace facet svn path=/trunk/; revision=3750
* fx compilation when configured without the reader should fix #513110Daniel Veillard2008-05-121-1/+1
| | | | | | | | | | * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h python/types.c python/libxml_wrap.h python/libxml.c: fx compilation when configured without the reader should fix #513110 * doc/*: regenerated Daniel svn path=/trunk/; revision=3743
* added new function xmlSchemaValidCtxtGetParserCtxt based on HolgerDaniel Veillard2008-04-111-830/+847
| | | | | | | | | | | | | | | | * include/libxml/xmlschemas.h xmlschemas.c: added new function xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch * doc/apibuild.py doc/*: regenerated the doc, chased why the new function didn't got any documentation, added more checking in the generator * include/libxml/relaxng.h include/libxml/schematron.h include/libxml/xmlschemas.h include/libxml/c14n.h include/libxml/xmlregexp.h include/libxml/globals.h include/libxml/xmlreader.h threads.c xmlschemas.c: various changes and cleanups following the new reports Daniel svn path=/trunk/; revision=3738
* extend the cleanup rule space cleanup DanielDaniel Veillard2008-04-101-1/+1
| | | | | | | | * Makefile.am: extend the cleanup rule * xmlschemas.c: space cleanup Daniel svn path=/trunk/; revision=3737
* fix a problem in externalSubsetSplit with a patch from Ashwin DanielDaniel Veillard2008-03-261-2/+2
| | | | | | | | * xmlschemas.c: fix a problem in externalSubsetSplit with a patch from Ashwin Daniel svn path=/trunk/; revision=3716
* fix an XML Schemas crash raised by Stefan Behnel when testing with W3CDaniel Veillard2008-03-241-3/+3
| | | | | | | | * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel when testing with W3C test suite Daniel svn path=/trunk/; revision=3712