diff options
224 files changed, 16465 insertions, 9786 deletions
@@ -1,3 +1,543 @@ +Thu Jan 5 16:25:06 CET 2006 Daniel Veillard <daniel@veillard.com> + + * NEWS configure.in libxml.spec.in testapi.c doc/*: upated the news + regenerated the docs, preparing for release of 2.6.23 + * pattern.c xmlschemas.c: fixed some comments + +Thu Jan 5 15:48:27 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * test/XPath/docs/nodes test/XPath/tests/nodespat + result/XPath/tests/nodespat: Added regression tests for + the latest XPath/pattern fixes. + +Thu Jan 5 15:43:38 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * pattern.c: Another fix to handle "foo//.": "foo" was not + included in the resulting node-set. + +Thu Jan 5 13:22:29 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * pattern.c xpath.c include/libxml/pattern.h: + Fixed bug #322928, reported by Erich Schubert: The bug was + in pattern.c, which is used for a tiny subset of xpath + expression which can be evaluated in an optimized way. + The doc-node was never considered when evaluating "//" + expressions. Additionally, we fixed resolution + to nodes of any type in pattern.c; i.e. a "//." didn't work + yet, as it did select only element-nodes. Due to this + issue the pushing of nodes in xpath.c needed to be adjusted + as well. + +Wed Jan 4 18:07:47 CET 2006 Daniel Veillard <daniel@veillard.com> + + * parser.c: tiny refactoring patch from Bjorn Reese + +Wed Jan 4 15:00:51 CET 2006 Daniel Veillard <daniel@veillard.com> + + * SAX2.c: fix bug #324432 with <xml:foo/> + * test/ns7 resul//ns7*: added to the regression tests + +Wed Jan 4 10:53:56 CET 2006 Daniel Veillard <daniel@veillard.com> + + * include/wsockcompat.h: applied patch from Mark Junker, fixing a + MinGW compilation problem, should close bug #324943 + +Tue Jan 3 11:49:54 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Removed last dependency on the obsolete enum + xmlSchemaValidError. + +Mon Jan 2 11:20:00 CET 2006 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation + and doc build fixes from Michael Day + +Wed Dec 28 22:12:34 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlregexp.c: bug in xmlRegExecPushString2() pointed out by + Sreeni Nair. + +Tue Dec 20 16:55:31 CET 2005 Rob Richards <rrichards@ctindustries.net> + + * tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is + a child of an element (fix by Oleksandr Kononenko). + * HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat. + +Tue Dec 20 11:43:06 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c xmlstring.c: Fixed a segfault during + text concatenation when validating a node tree: + xmlStrncat was called with a @len of -1; but unlike + xmlStrncatNew, it does not calculate the length + automatically in such a case (reported by Judy Hay + on the mailing list). + Updated the descriptions of the involved string + functions to note this. + +Thu Dec 15 12:11:07 CET 2005 Daniel Veillard <daniel@veillard.com> + + * nanohttp.c: applied patch from Gary Coady to accept gzipped + http resources. + +Wed Dec 14 18:41:26 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * win32/configure.js: Added enable/disable of runtime + debugging (LIBXML_DEBUG_RUNTIME). + +Wed Dec 14 18:11:50 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * include/libxml/xmlversion.h.in: Fixed to define + LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@. + +Tue Dec 13 12:49:23 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * 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. + +Mon Dec 12 16:19:16 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * test/schemas/bug323510* result/schemas/bug323510*: + Added regression test for bug #323510. + +Mon Dec 12 16:11:13 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Workaround for bug #323510 (reported by + Jonathan Filiatrault): substituted the epsilon transition + for a labelled transition, in order to avoid a bug in + xmlregexp.c which eliminated the epsilon transition and + marked the initial state as final. + +Mon Dec 12 14:25:46 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c: Gary Coady pointed a memory leak in + xmlTextReaderReadInnerXml() applied patch fixing #323864 + +Sat Dec 10 12:08:28 CET 2005 Daniel Veillard <daniel@veillard.com> + + * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c + testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number + of warnings shown by HP-UX compiler and reported by Rick Jones + +Fri Dec 9 18:57:31 CET 2005 Rob Richards <rrichards@ctindustries.net> + + * xmlwriter.c: Insert space between pubid and sysid when both + passed to xmlTextWriterStartDTD and indenting not being used. + Remove no longer used Mem callbacks. + +Fri Dec 9 11:01:16 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * runsuite.c: Changed to instantly mark instance-tests as + failed if the corresponding schema was invalid. This + reflects the side of the Python code for the XML Schema test + suite. We now get the same number of failed tests on both + sides. + +Wed Dec 7 14:59:01 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlreader.c include/libxml/xmlreader.h: Added + xmlTextReaderSchemaValidateCtxt() to the API. + +Wed Dec 7 12:59:56 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed a segfault: the instance document was + still tried to be validated, if the schema, dynamically + acquired using XSI was invalid, thus mangled. The + validation will stop (or rather won't validate) now in + such a case. The schema parser error code will be set + on the validion context now; this is somehow not nice, + but it assures that the validation context indicates an + error in there was a parser error. + +Tue Dec 6 18:57:23 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c: small doc patch from Aron Stansvik + * legacy.c: another doc patch for a deprecated API + +Mon Dec 5 16:23:49 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * Makefile.am: Tiny change for 'make tests': raised + the number of expected failures for James Clark's + XML Schema datatype tests from 10 to 11. The additional + reported error was agreed to be correct long time ago, + but we missed to adjust the message reported by + the testing script. + +Fri Dec 2 13:51:14 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * result/schemas/decimal* result/schemas/bug322411*: + Added missing regression test results for the latest IDC + and xs:decimal bugs. + +Wed Nov 30 12:22:23 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * test/schemas/decimal* test/schemas/bug322411*: Added + regression tests for the latest IDC and xs:decimal bugs. + +Wed Nov 30 11:57:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed bubbling of duplicate IDC nodes: the + parent's list of duplicates was filled with NULLs instead + of the nodes under certain conditions. This lead to a + segfault when the list's entries were accessed. + +Mon Nov 28 17:28:53 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemastypes.c: Fixed parsing of xs:decimal to + allow/deny special lexical forms. Fixed the totalDigits + for values in the range (x < 1) && (x > -1) && (x != 0); + E.g "0.123" has now a totalDigits of 3 (was 4 previously). + Adjusted the comparison function for decimals due to this + change. As a side effect comparison against zeroes was + optimized. + +Mon Nov 28 13:25:11 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: An assignment to a local variable, which was + used to access the IDC node list, was missing after the + reallocation of the list (reported by Fabrice GUY + bug #322411). Renamed the define ENABLE_IDC_NODE_TABLES + to ENABLE_IDC_NODE_TABLES_TEST and *disabled* it, since + it is used to force bubbling of IDC node tables even + if not necessary; this was intended to be used for test + purposes, but I obviously missed to disable it (although + it apparently helped finding the bug). + +Wed Nov 23 17:34:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: In xmlSchemaAssembleByXSI() the return value + of xmlSchemaGetMetaAttrInfo() was not assigned to anything; + this caused XSI-driven-dynamic schema acquisition to fail + with @noNamespaceSchemaLocation (reported by Julien Lamy + on the mailing list). + +Tue Nov 22 18:31:34 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed a bug in xmlSchemaFindRedefCompInGraph() + which caused the search for components to stop at the + first encountered attribute group component. + Fixed error report in xmlSchemaCheckSRCRedefineFirst(): the + designation of a not-found component was not reported. + +Mon Nov 21 12:23:28 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlschemastypes.c: Albert Chin found another signed/unsigned problem + in the date and time code raised on IRIX 6.5 + +Fri Nov 18 18:13:38 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c include/libxml/xmlschemas.h: + Added xmlSchemaSetParserStructuredErrors() to the API. + Fixed channeling of error relevant information to + subsequent parser/validation contexts. + +Thu Nov 17 14:11:43 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parserInternals.c: removed unreachable code pointed out by + Oleksandr Kononenko, fixes bug #321695 + +Thu Nov 17 08:24:31 CET 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: use ctxt->standalone = -2 to indicate that the + XMLDecl was parsed but no standalone attribute was found, + suggested by Michael Day to detect if an XMLDecl was found. + +Tue Nov 15 09:49:24 CET 2005 Daniel Veillard <daniel@veillard.com> + + * runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests + were not properly reported. + +Sun Nov 13 13:42:41 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlIO.c: applied patch from Geert Jansen to remove xmlBufferClose() + which is not needed. + +Fri Nov 11 13:48:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * 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. + +Wed Nov 9 13:07:24 EST 2005 Rob Richards <rrichards@ctindustries.net> + + * xmlIO.c xmlwriter.c: function consolidation when writing to xmlBuffer. + Return error condition not len if xmlwriter fails writing to buffer. + +Wed Nov 9 09:54:54 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlsave.c xmlIO.c include/libxml/xmlIO.h include/libxml/xmlsave.h: + applied patch from Geert Jansen to implement the save function to + a xmlBuffer, and a bit of cleanup. + +Mon Nov 7 14:58:39 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c xmlschemastypes.c: Fixed the type of the + totalDigits value to be positiveInteger. + Fixed crash in an error report function when we gave it + the document node; only element and attribute nodes are + processed now (reported by Rob Richards). + +Tue Nov 1 16:22:29 CET 2005 Daniel Veillard <daniel@veillard.com> + + * xmlregexp.c: fix bug #319897, problem with counted atoms + when the transition itself is counted too + * result/regexp/hard test/regexp/hard: augmented the regression + tests with the problem exposed. + +Tue Nov 1 11:54:39 CET 2005 Daniel Veillard <daniel@veillard.com> + + * win32/Makefile.mingw include/win32config.h: applied patch from + Mark Junker to fix compilation with MinGW + +Fri Oct 28 18:36:08 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * libxml.3: tiny fix from Albert Chin + * runsuite.c runtest.c testapi.c: portability cleanup for arch + needing trio for *printf + +Fri Oct 28 12:21:39 EDT 2005 Rob Richards <rrichards@ctindustries.net> + + * tree.c: add additional checks to prevent tree corruption. fix problem + copying attribute using xmlDocCopyNode from one document to another. + +Fri Oct 28 17:58:13 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * config.h.in configure.in vms/config.vms macos/src/config-mac.h: + cleanup from Albert Chin + * doc/Makefile.am: html/index.sgml doesn't exist anymore + +Fri Oct 28 16:53:51 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlIO.c xmlmodule.c: more portability patches from Albert Chin for + HP-UX and AIX + +Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlmodule.c configure.in: applied 2 patches from Albert Chin for + module portability + +Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * error.c: fixing a portability problem on some old Unices with + patch from Albert Chin + +2005-10-27 Aleksey Sanin <aleksey@aleksey.com> + + * c14n.c result/c14n/exc-without-comments/test-2 + test/c14n/exc-without-comments/test-2.xml + test/c14n/exc-without-comments/test-2.xpath: fixing + bug in exc-c14n namespace visibility + test case (bug #319367) + +Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * python/libxml.py: remove warnings to stdout patch from Nic Ferrier + +Thu Oct 27 13:54:52 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * valid.c xmlregexp.c include/libxml/valid.h + include/libxml/xmlregexp.h: avoid function parameters names 'list' + as this seems to give troubles with VC6 and stl as reported by + Samuel Diaz Garcia. + +Wed Oct 26 10:59:21 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * parserInternals.c: fix a problem in some error case on Solaris + when passed a NULL filename, pointed by Albert Chin. + +Tue Oct 25 14:34:58 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * HTMLparser.c: script HTML parser error fix, corrects bug #319715 + * result/HTML/53867* test/HTML/53867.html: added test from Michael Day + to the regression suite + +Tue Oct 25 14:21:11 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * HTMLparser.c: typo fix from Michael Day + +Mon Oct 24 20:16:23 EDT 2005 Rob Richards <rrichards@ctindustries.net> + + * tree.c: fix issue adding non-namespaced attributes in xmlAddChild(), + xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1. + +Sat Oct 22 10:00:41 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * parser.c: fixed second spot where CRLF split between chunks + could cause trouble (bug #319279) + * gentest.py, testapi.c: fixed two problems involved with + --with-minimum compilation (compilation errors with schematron + and formal expressions tests) + +Fri Oct 21 10:50:14 EDT 2005 Rob Richards <rrichards@ctindustries.net> + + * xmlsave.c: prevent output of fragment tags when serializing XHTML. + +Wed Oct 19 16:53:47 BST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlregexp.c: commiting a some fixes and debug done yesterday in + the London airport. + +Thu Oct 20 12:54:23 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Removed creation of a temporary parser context + during validation when processing xsi:type; this previously + added a string to the dict of the schema - to assure thread + safety, we don't want to modify a given schema during + validation. + +Thu Oct 20 17:05:29 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * xmlwriter.c: fixed problem in xmlTextWriterVSprintf caused by + misuse of vsnprintf + * configure.in, config.h.in: added a configuration check for + va_copy and added a define for VA_COPY for xmlwriter.c fix + * parser.c: fixed problem with CRLF split between chunks (bug + #319279) (fix provided by Brion Vibber) + +Wed Oct 19 18:49:52 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed a potential memory leak in + xmlSchemaCheckCSelectorXPath() when an internal error occurs. + Fixed setting of ctxt->err to the given error code in + the parsing error functions. + * pattern.c: Added internal xmlCompileIDCXPathPath() as a + starting point for IDC XPath compilation; this and some other + tiny changes fixes issues regarding whitespace in the + expressions and IDC selector/field relevant restrictions of + the subset of XPath. Fixed a missing blocking of attributes + in xmlStreamPushInternal(). + +Mon Oct 17 15:06:05 EDT 2005 Daniel Veillard <daniel@veillard.com> + + * runtest.c: removed the error message + * relaxng.c xmlschemas.c: removed 2 instability warnings from function + documentation + * include/libxml/schemasInternals.h: changed warning about API stability + * xmlregexp.c: trying to improve runtime execution of non-deterministic + regexps and automata. Not fully finished but should be way better. + +Mon Oct 17 16:12:02 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed a memory leak in + xmlSchemaContentModelDump(). Added output of local types + in xmlSchemaElementDump(). Tiny cosmetical changes to the + dump output. + +Mon Oct 17 14:29:08 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * tree.c pattern.c: Silenced intel compiler warnings (reported + by Kjartan Maraas, bug #318517). + * xmlschemas.c: The above changes in pattern.c revealed an + inconsistency wrt IDCs: we now _only_ pop XPath states, if + we really pushed them beforehand; this was previously not + checked for the case when we discover an element node to be + invalid wrt the content model. + Fixed segfault in xmlSchemaGetEffectiveValueConstraint(). + +Fri Oct 14 16:40:18 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * result/schemas/*.err: Adapted regression test results. + +Fri Oct 14 16:21:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * xmlschemas.c: Fixed some identity-constraint issues: + Restructured IDC node-tables + Allowed IDCs to resolve also to nodes of complex type with + simple content. + Added check for keyrefs with references to keyrefs. + IDC target-nodes were interferring with IDC node-tables, + since they used one list of entries only. I separated this + one big list into 3 lists: 1 for IDC node-table entries, + 1 for _duplicates_ of IDC node-table entries and 1 for + IDC target-nodes. More code, but cleaner and it works at last. + Keyrefs will fail to resolve to duplicate key/unique entries. + I thought this was already working this way, but it didn't. + The wording of the definition for [node table] in the spec + can lead to a scenario, where keyrefs resolve perfectly, even + if the relevant key-sequences of the referenced key/unique have + duplicates in the subtree. Currently only Saxon 8.5.1 is + dissallowing resolution to duplicate entries correctly - we + will follow Saxon here. + Removed some intel compiler warnings (reported by + Kjartan Maraas, bug #318517). + * pattern.c: Fixed an IDC-XPath problem when resolving to + attributes. + +Mon Oct 14 01:15:14 CEST 2005 Rob Richards <rrichards@ctindustries.net> + * nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak + to use getaddrinfo() if supported in Windows build (bug# 317431). + +Mon Oct 10 15:33:48 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * result/schemas/*: Adapted regression test results. + +Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * 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. + +Fri Oct 7 04:34:12 CEST 2005 Rob Richards <rrichards@ctindustries.net> + + * schematron.c xmlregexp.c: remove warnings under Windows. + +Wed Sep 28 23:42:14 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * parser.c: applied patch from Massimo Morara fixing bug #317447 + about risk of invalid write in xmlStringLenDecodeEntities + +Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * error.c: Adrian Mouat pointed out redundancies in xmlReportError() + +Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlregexp.c: seems a test to avoid duplicate transition is + really needed at all times. Luka Por gave an example hitting + this. Changed back the internal API. + +Thu Sep 22 13:14:07 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlreader.c: fixing leak in xmlTextReaderReadString() #316924 + +Thu Sep 15 16:12:44 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * uri.c: more fixes to the behaviour of xmlBuildRelativeURI + +Thu Sep 15 15:08:21 CEST 2005 Daniel Veillard <daniel@veillard.com> + + * xmlregexp.c: detect combinatory explosion and return with + a runtime error in those case, c.f. #316338 though maybe we + should not see such an explosion with that specific regexp, + more checking needs to be done. + +Wed Sep 14 19:52:18 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net> + + * include/libxml/schemasInternals.h: Added some comments for the + struct fields. + +Wed Sep 14 13:24:27 HKT 2005 William Brack <wbrack@mmm.com.hk> + + * uri.c: fixed problem when xmlBuildRelativeURI was given a + blank path (bug 316224) + Mon Sep 12 23:41:40 CEST 2005 Daniel Veillard <daniel@veillard.com> * NEWS configure.in doc//*: release of 2.6.22 updated doc and diff --git a/HTMLparser.c b/HTMLparser.c index d11ae08..12afdd8 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -2678,7 +2678,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { break; /* while */ } else { htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH, - "Element %s embbeds close tag\n", + "Element %s embeds close tag\n", ctxt->name, NULL); } } else { @@ -2701,6 +2701,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { } nbchar = 0; } + GROW; NEXTL(l); cur = CUR_CHAR(l); } @@ -4778,7 +4779,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { } break; case XML_PARSER_START_TAG: { - const xmlChar *name, *oldname; + const xmlChar *name; int failed; const htmlElemDesc * info; @@ -4831,7 +4832,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { SKIP(2); if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -4852,7 +4853,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { */ if (xmlStrEqual(name, ctxt->name)) { nodePop(ctxt); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); } ctxt->instate = XML_PARSER_CONTENT; @@ -4869,7 +4870,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((info != NULL) && (info->empty)) { if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); - oldname = htmlnamePop(ctxt); + htmlnamePop(ctxt); } ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH @@ -506,16 +506,17 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) { } /** - * htmlDocDumpMemory: + * htmlDocDumpMemoryFormat: * @cur: the document * @mem: OUT: the memory pointer * @size: OUT: the memory length + * @format: should formatting spaces been added * * Dump an HTML document in memory and return the xmlChar * and it's size. * It's up to the caller to free the memory. */ void -htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { +htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { xmlOutputBufferPtr buf; xmlCharEncodingHandlerPtr handler = NULL; const char *encoding; @@ -572,7 +573,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { return; } - htmlDocContentDumpOutput(buf, cur, NULL); + htmlDocContentDumpFormatOutput(buf, cur, NULL, format); + xmlOutputBufferFlush(buf); if (buf->conv != NULL) { *size = buf->conv->use; @@ -584,6 +586,20 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { (void)xmlOutputBufferClose(buf); } +/** + * htmlDocDumpMemory: + * @cur: the document + * @mem: OUT: the memory pointer + * @size: OUT: the memory length + * + * Dump an HTML document in memory and return the xmlChar * and it's size. + * It's up to the caller to free the memory. + */ +void +htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { + htmlDocDumpMemoryFormat(cur, mem, size, 1); +} + /************************************************************************ * * diff --git a/Makefile.am b/Makefile.am index ee09a7b..5ef9d90 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1070,7 +1070,7 @@ SchemasPythonTests: LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ - echo "## It is normal to see 10 errors reported" ; \ + echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) diff --git a/Makefile.in b/Makefile.in index dc27ba0..a0805b2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2341,7 +2341,7 @@ SchemasPythonTests: LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \ export LD_LIBRARY_PATH; \ echo "## XML Schemas datatypes Python based test suite" ; \ - echo "## It is normal to see 10 errors reported" ; \ + echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) @@ -15,176 +15,216 @@ ChangeLog.html to the CVS at http://cvs.gnome.org/viewcvs/libxml2/ code base.There is the list of public releases: +2.6.23: Jan 5 2006: + - portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), + + - code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese) + - bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath + pattern based evaluation fixes (Kasimier) + - improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards), + - documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), + + + 2.6.22: Sep 12 2005: - build fixes: compile without schematron (Stéphane Bidoul) - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) - - - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik). + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) + - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik). - documentation: generation of gtk-doc like docs, integration with - devhelp. + devhelp. 2.6.21: Sep 4 2005: - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS, - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs. + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs. - improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation. + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation. - documentation: xmllint man page had --nonet duplicated 2.6.20: Jul 10 2005: - - build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. - - - bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). - - - improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. - + - build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution. + - bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William). + - improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support. 2.6.19: Apr 02 2005: - - build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4 - - bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time - - improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling. + - build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4 + - bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time + - improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling. - 2.6.18: Mar 13 2005: - - build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones). - - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer). - - improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik), - - Documentation: Wiki support (Joel Reed) - + - build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones). + - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer). + - improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik), + - Documentation: Wiki support (Joel Reed) 2.6.17: Jan 16 2005: - - build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol) + - build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol) - bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. - - - improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). - - - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer) - - documentation: site improvement (John Fleck), FAQ entries (William). + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing. + - improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize(). + - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer) + - documentation: site improvement (John Fleck), FAQ entries + (William). 2.6.16: Nov 10 2004: @@ -197,7 +237,7 @@ http://cvs.gnome.org/viewcvs/libxml2/ - documentation: fix to xmllint man page, some API function descritpion were updated. - improvements: DTD validation APIs provided at the Python level (Brent - Hendricks) + Hendricks) 2.6.15: Oct 27 2004: @@ -2233,9 +2233,13 @@ xmlSAX2StartElementNs(void *ctx, */ if ((URI != NULL) && (ret->ns == NULL)) { ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix); + if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) { + ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix); + } if (ret->ns == NULL) { ns = xmlNewNs(ret, NULL, prefix); if (ns == NULL) { + xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; } @@ -13,8 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 47 AC_PROG_LIBTOOL -# Debian $Rev: 214 $ +# serial 48 Debian 1.5.22-1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -124,7 +123,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. @@ -144,7 +143,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -164,6 +163,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -183,15 +183,17 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +_LT_CC_BASENAME([$compiler]) + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) @@ -232,11 +234,56 @@ AC_DEFUN([_LT_AC_SYS_COMPILER], # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable @@ -309,15 +356,15 @@ fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -486,7 +533,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -537,6 +584,22 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) @@ -568,7 +631,7 @@ AC_CACHE_CHECK([$1], [$2], # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -578,8 +641,10 @@ AC_CACHE_CHECK([$1], [$2], echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi @@ -605,11 +670,16 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi else $2=yes fi @@ -668,11 +738,55 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - *) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && @@ -698,7 +812,7 @@ fi # _LT_AC_CHECK_DLFCN -# -------------------- +# ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN @@ -706,7 +820,7 @@ AC_DEFUN([_LT_AC_CHECK_DLFCN], # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ------------------------------------------------------------------ +# --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : @@ -772,17 +886,19 @@ int main () else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; - x$lt_unknown|x*) $3 ;; + x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed @@ -794,7 +910,7 @@ rm -fr conftest* # AC_LIBTOOL_DLOPEN_SELF -# ------------------- +# ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then @@ -865,7 +981,7 @@ else test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -878,7 +994,7 @@ else ]) if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( @@ -926,7 +1042,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -938,11 +1054,13 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -1006,8 +1124,8 @@ AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && @@ -1174,7 +1292,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -1202,7 +1320,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -1232,7 +1351,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -1255,7 +1374,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -1290,8 +1409,17 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -1309,14 +1437,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.[01]* | freebsdelf3.[01]*) + freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -1336,7 +1469,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -1376,6 +1509,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -1435,7 +1580,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1509,8 +1654,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=yes + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -1548,13 +1698,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -1580,7 +1723,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -1613,6 +1756,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -1626,6 +1792,11 @@ uts4*) esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER @@ -1650,6 +1821,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -1676,7 +1850,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" @@ -1738,7 +1914,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN], # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -1776,7 +1952,7 @@ AC_ARG_ENABLE([shared], # AC_DISABLE_SHARED # ----------------- -#- set the default shared flag to --disable-shared +# set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) @@ -1912,7 +2088,7 @@ dnl not every word. This closes a longstanding sh security hole. if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -2022,7 +2198,7 @@ AC_CACHE_VAL(lt_cv_path_LD, if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -2054,7 +2230,7 @@ AC_PROG_LD_GNU AC_DEFUN([AC_PROG_LD_GNU], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +[# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -2081,6 +2257,15 @@ case $reload_flag in *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac ])# AC_PROG_LD_RELOAD_FLAG @@ -2114,7 +2299,7 @@ beos*) lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) +bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so @@ -2137,13 +2322,13 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -2159,7 +2344,7 @@ gnu*) hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -2175,6 +2360,11 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -2209,12 +2399,10 @@ nto-qnx*) ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; @@ -2222,15 +2410,11 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' @@ -2251,10 +2435,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -2274,36 +2461,43 @@ AC_DEFUN([AC_PROG_NM], # Let the user override the test. lt_cv_path_NM="$NM" else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" @@ -2335,13 +2529,13 @@ esac # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in @@ -2360,13 +2554,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE], # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided and an installed libltdl is not found, it is -# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single -# quotes!). If your package is not flat and you're not using automake, -# define top_builddir and top_srcdir appropriately in the Makefiles. +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl @@ -2404,10 +2598,21 @@ AC_DEFUN([AC_LIBTOOL_CXX], # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- @@ -2447,7 +2652,7 @@ _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) # AC_LIBTOOL_RC -# -------------- +# ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) @@ -2480,36 +2685,9 @@ lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER -# -# Check for any special shared library compilation flags. -# -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' - ;; - esac -fi -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then - AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : - else - AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) - _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) - +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) @@ -2519,9 +2697,9 @@ AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) +AC_LIBTOOL_DLOPEN_SELF -# Report which librarie types wil actually be built +# Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -2530,7 +2708,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -2543,43 +2721,6 @@ aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi - ;; - darwin* | rhapsody*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi ;; esac AC_MSG_RESULT([$enable_shared]) @@ -2605,7 +2746,7 @@ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= @@ -2617,6 +2758,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= @@ -2634,7 +2776,7 @@ _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -2644,11 +2786,15 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -2659,18 +2805,18 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -2759,6 +2905,7 @@ case $host_os in ;; esac done + ;; esac exp_sym_flag='-bexport' @@ -2777,7 +2924,7 @@ case $host_os in _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -2796,8 +2943,12 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -2824,12 +2975,12 @@ case $host_os in _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -2838,16 +2989,26 @@ case $host_os in # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + chorus*) case $cc_basename in *) @@ -2866,7 +3027,7 @@ case $host_os in _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -2875,70 +3036,81 @@ case $host_os in echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - darwin* | rhapsody*) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; + ;; dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -2949,14 +3121,14 @@ case $host_os in ;; esac ;; - freebsd[12]*) + freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -2973,11 +3145,11 @@ case $host_os in # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) + aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -2987,7 +3159,7 @@ case $host_os in # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -3001,33 +3173,22 @@ case $host_os in ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - ia64*) + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -3038,14 +3199,17 @@ case $host_os in esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3064,9 +3228,12 @@ case $host_os in *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -3080,11 +3247,25 @@ case $host_os in ;; esac ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -3095,7 +3276,7 @@ case $host_os in *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -3108,7 +3289,7 @@ case $host_os in ;; linux*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3133,17 +3314,41 @@ case $host_os in # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - cxx) + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -3174,7 +3379,7 @@ case $host_os in ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; @@ -3195,9 +3400,25 @@ case $host_os in # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3213,14 +3434,14 @@ case $host_os in _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3238,7 +3459,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3257,7 +3478,7 @@ case $host_os in ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -3272,17 +3493,17 @@ case $host_os in # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - cxx) + cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -3301,7 +3522,7 @@ case $host_os in *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: @@ -3322,27 +3543,14 @@ case $host_os in # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - sco*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3355,36 +3563,33 @@ case $host_os in ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -3392,7 +3597,7 @@ case $host_os in # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -3430,12 +3635,63 @@ case $host_os in ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -3468,8 +3724,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3487,7 +3741,7 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------ +# ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary @@ -3541,7 +3795,7 @@ if AC_TRY_EVAL(ac_compile); then # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -3617,13 +3871,37 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + ;; + esac + ;; +esac +]) + case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG -# ------------------------ +# -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3667,12 +3945,16 @@ lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +_LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -3682,7 +3964,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -3691,7 +3973,9 @@ aix3*) fi ;; aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac AC_MSG_RESULT([$enable_shared]) @@ -3701,8 +3985,6 @@ AC_MSG_CHECKING([whether to build static libraries]) test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" @@ -3712,8 +3994,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP - AC_LIBTOOL_CONFIG($1) @@ -3742,20 +4022,27 @@ _LT_AC_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) @@ -3763,8 +4050,6 @@ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3774,7 +4059,7 @@ CC="$lt_save_CC" # AC_LIBTOOL_LANG_RC_CONFIG -# -------------------------- +# ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. @@ -3798,11 +4083,16 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) @@ -3832,7 +4122,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -3938,7 +4228,7 @@ ifelse([$1], [], # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -3949,11 +4239,11 @@ ifelse([$1], [], SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= @@ -3984,6 +4274,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -3995,6 +4291,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) @@ -4060,7 +4359,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -4334,9 +4633,6 @@ symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -4358,15 +4654,31 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; -solaris* | sysv5*) +solaris*) symcode='[[BDRT]]' ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; sysv4) symcode='[[DFNSTU]]' ;; @@ -4389,8 +4701,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -4546,6 +4861,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic @@ -4554,7 +4873,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -4579,18 +4898,28 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; dgux*) case $cc_basename in - ec++) + ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4598,22 +4927,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; - aCC) + aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4626,9 +4955,13 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. @@ -4639,18 +4972,24 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; linux*) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - cxx) + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -4667,7 +5006,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; mvs*) case $cc_basename in - cxx) + cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) @@ -4678,14 +5017,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -4699,24 +5038,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; psos*) ;; - sco*) - case $cc_basename in - CC) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; @@ -4726,12 +5056,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - lcc) + lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; @@ -4741,7 +5071,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; @@ -4749,7 +5079,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -4796,6 +5133,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -4812,7 +5154,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4838,6 +5180,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -4849,7 +5201,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4873,12 +5225,19 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. @@ -4893,15 +5252,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - sco3.2v5*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' - ;; - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac ;; sunos4*) @@ -4910,7 +5269,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -4923,6 +5282,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -4950,7 +5320,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= @@ -4959,6 +5329,16 @@ case "$host_os" in _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) @@ -4983,7 +5363,10 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + kfreebsd*-gnu) + _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; linux*) _LT_AC_TAGVAR(link_all_deplibs, $1)=no @@ -5029,7 +5412,8 @@ ifelse([$1],[CXX],[ # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= - + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time @@ -5039,6 +5423,10 @@ ifelse([$1],[CXX],[ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -5049,6 +5437,27 @@ ifelse([$1],[CXX],[ # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -5099,10 +5508,10 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -5111,9 +5520,56 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=no else - ld_shlibs=no + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -5127,7 +5583,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<EOF 1>&2 @@ -5148,6 +5604,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -5155,32 +5638,6 @@ EOF _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -5191,16 +5648,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -5212,7 +5664,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5246,6 +5698,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -5264,7 +5717,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) + case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -5283,8 +5736,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -5292,11 +5749,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -5310,12 +5767,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX @@ -5324,13 +5781,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -5343,7 +5798,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - bsdi4*) + bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; @@ -5364,57 +5819,57 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - case "$host_os" in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' - ;; - esac - fi - ;; + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - _LT_AC_TAGVAR(ld_shlibs, $1)=no + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac fi ;; @@ -5448,11 +5903,20 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; hpux9*) @@ -5471,47 +5935,62 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; *) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' @@ -5559,6 +6038,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else @@ -5604,7 +6084,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5612,21 +6092,15 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - sco3.2v5*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -5635,8 +6109,18 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -5693,36 +6177,45 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ fi ;; - sysv4.2uw2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - sysv5*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -5740,11 +6233,6 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -5772,6 +6260,7 @@ x|xyes) libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= @@ -5897,7 +6386,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -5922,8 +6411,8 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do fi done done -SED=$lt_cv_path_SED ]) +SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) @@ -802,7 +802,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) if(xmlStrlen(attr->ns->prefix) == 0) { has_empty_ns = 1; } - } else if(attr->ns == NULL) { + } else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) { has_visibly_utilized_empty_ns = 1; } } diff --git a/config.h.in b/config.h.in index 8484193..1dafc10 100644 --- a/config.h.in +++ b/config.h.in @@ -97,24 +97,12 @@ /* Define if history library is there (-lhistory) */ #undef HAVE_LIBHISTORY -/* Define to 1 if you have the `inet' library (-linet). */ -#undef HAVE_LIBINET - -/* Define to 1 if you have the `net' library (-lnet). */ -#undef HAVE_LIBNET - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - /* Define if pthread library is there (-lpthread) */ #undef HAVE_LIBPTHREAD /* Define if readline library is there (-lreadline) */ #undef HAVE_LIBREADLINE -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Have compression library */ #undef HAVE_LIBZ @@ -237,6 +225,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Whether va_copy() is available */ +#undef HAVE_VA_COPY + /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF @@ -252,6 +243,9 @@ /* Define to 1 if you have the `_stat' function. */ #undef HAVE__STAT +/* Whether __va_copy() is available */ +#undef HAVE___VA_COPY + /* Name of package */ #undef PACKAGE @@ -278,15 +278,15 @@ fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -1620,7 +1620,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=6 -LIBXML_MICRO_VERSION=22 +LIBXML_MICRO_VERSION=23 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -4244,7 +4244,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break + test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -4269,10 +4269,10 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do fi done done -SED=$lt_cv_path_SED fi +SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4334,7 +4334,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -4368,7 +4368,7 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -4398,6 +4398,15 @@ case $reload_flag in *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 @@ -4408,36 +4417,43 @@ else # Let the user override the test. lt_cv_path_NM="$NM" else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" break ;; *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac ;; esac - esac - fi + fi + done + IFS="$lt_save_ifs" done - IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi @@ -4484,7 +4500,7 @@ beos*) lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) +bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so @@ -4507,13 +4523,13 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -4529,7 +4545,7 @@ gnu*) hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -4545,6 +4561,11 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -4579,12 +4600,10 @@ nto-qnx*) ;; openbsd*) - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else - lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; @@ -4592,15 +4611,11 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' @@ -4621,10 +4636,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) siemens) lt_cv_deplibs_check_method=pass_all ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac @@ -4642,6 +4660,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC @@ -4676,7 +4697,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4679 "configure"' > conftest.$ac_ext + echo '#line 4700 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4719,7 +4740,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -4831,6 +4852,26 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 CFLAGS="$SAVE_CFLAGS" fi ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. @@ -5688,7 +5729,12 @@ else fi -ac_ext=cc + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5918,6 +5964,8 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi + ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' @@ -6011,7 +6059,7 @@ fi # Provide some information about the compiler. -echo "$as_me:6014:" \ +echo "$as_me:6062:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -6199,11 +6247,55 @@ else lt_cv_sys_max_cmd_len=8192; ;; - *) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && @@ -6249,9 +6341,6 @@ symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" @@ -6273,15 +6362,31 @@ hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; -solaris* | sysv5*) +solaris*) symcode='[BDRT]' ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; sysv4) symcode='[DFNSTU]' ;; @@ -6304,8 +6409,11 @@ esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no @@ -6467,7 +6575,7 @@ esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' +Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. @@ -6487,7 +6595,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -6744,6 +6852,7 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" @@ -6763,15 +6872,26 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) @@ -6797,7 +6917,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6859,7 +6979,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6954,68 +7074,25 @@ lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC -# -# Check for any special shared library compilation flags. -# -lt_prog_cc_shlib= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - lt_prog_cc_shlib='-belf' - ;; - esac -fi -if test -n "$lt_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no - fi -fi - - -# -# Check to make sure the static flag actually works. -# -echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_prog_compiler_static" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* @@ -7040,18 +7117,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7046: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7123: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7050: \$? = $ac_status" >&5 + echo "$as_me:7127: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -7112,6 +7191,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -7128,7 +7212,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7154,6 +7238,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -7165,7 +7259,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7189,12 +7283,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. @@ -7209,15 +7310,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' - ;; - solaris*) - lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac ;; sunos4*) @@ -7226,7 +7327,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -7239,6 +7340,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' @@ -7273,18 +7385,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7279: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7391: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7283: \$? = $ac_status" >&5 + echo "$as_me:7395: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi @@ -7305,7 +7419,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -7315,6 +7429,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then @@ -7333,23 +7489,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7339: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7495: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7343: \$? = $ac_status" >&5 + echo "$as_me:7499: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -7425,6 +7583,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -7435,6 +7603,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -7445,6 +7617,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -7495,10 +7688,10 @@ EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -7507,7 +7700,54 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs=no else ld_shlibs=no fi @@ -7523,7 +7763,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<EOF 1>&2 @@ -7544,6 +7784,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -7551,32 +7818,6 @@ EOF hardcode_shlibpath_var=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds="$tmp_archive_cmds" - fi - link_all_deplibs=no - else - ld_shlibs=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -7587,16 +7828,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -7608,7 +7844,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -7642,6 +7878,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -7660,7 +7897,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -7679,8 +7916,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -7688,11 +7929,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -7756,12 +7997,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -7820,13 +8061,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' + whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -7839,7 +8078,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; @@ -7865,52 +8104,52 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag='-undefined dynamic_lookup' - ;; - esac - fi - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='-all_load $convenience' + whole_archive_flag_spec='' link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs=no + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac fi ;; @@ -7944,13 +8183,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + link_all_deplibs=no + ;; + hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' @@ -7967,47 +8215,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' @@ -8055,6 +8318,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else @@ -8100,7 +8364,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -8108,21 +8372,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator=: ;; - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -8131,8 +8389,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs=yes ;; @@ -8189,36 +8457,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ;; - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -8237,11 +8514,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -8274,6 +8546,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= @@ -8406,7 +8679,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -8434,7 +8707,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -8464,7 +8738,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -8487,7 +8761,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -8522,8 +8796,17 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -8541,14 +8824,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -8568,7 +8856,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -8608,6 +8896,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -8667,7 +8967,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -8741,8 +9041,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=yes + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -8780,13 +9085,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -8812,7 +9110,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -8845,6 +9143,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -8860,12 +9181,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var " || \ - test "X$hardcode_automatic"="Xyes" ; then + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && @@ -9508,7 +9834,7 @@ fi test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" @@ -9524,7 +9850,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9527 "configure" +#line 9853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9581,6 +9907,8 @@ int main () else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); } @@ -9590,12 +9918,12 @@ EOF ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed @@ -9610,7 +9938,7 @@ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then @@ -9622,7 +9950,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9625 "configure" +#line 9953 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9679,6 +10007,8 @@ int main () else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } + else + puts (dlerror ()); exit (status); } @@ -9688,12 +10018,12 @@ EOF ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed @@ -9726,7 +10056,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi -# Report which librarie types wil actually be built +# Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 @@ -9738,7 +10068,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -9751,43 +10081,6 @@ aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi - ;; - darwin* | rhapsody*) - if test "$GCC" = yes; then - archive_cmds_need_lc=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag='-undefined dynamic_lookup' - ;; - esac - fi - ;; - esac - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='-all_load $convenience' - link_all_deplibs=yes - else - ld_shlibs=no - fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 @@ -9813,7 +10106,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -9917,7 +10210,7 @@ echo "$as_me: creating $ofile" >&6;} # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -9928,11 +10221,11 @@ echo "$as_me: creating $ofile" >&6;} SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= @@ -9962,6 +10255,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -9973,6 +10272,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler @@ -10038,7 +10340,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -10303,6 +10605,9 @@ echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. @@ -10333,7 +10638,9 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10353,6 +10660,7 @@ hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= @@ -10370,7 +10678,7 @@ postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -10380,17 +10688,34 @@ objext_CXX=$objext lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD @@ -10401,18 +10726,27 @@ lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - unset lt_cv_prog_gnu_ld + $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else - unset lt_cv_path_LD + $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -10483,7 +10817,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -10517,7 +10851,7 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -10608,6 +10942,7 @@ case $host_os in ;; esac done + ;; esac exp_sym_flag='-bexport' @@ -10626,7 +10961,7 @@ case $host_os in link_all_deplibs_CXX=yes if test "$GXX" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -10645,8 +10980,12 @@ case $host_os in hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -10723,12 +11062,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -10787,16 +11126,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' + whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + chorus*) case $cc_basename in *) @@ -10815,7 +11164,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -10824,70 +11173,81 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes - darwin* | rhapsody*) - if test "$GXX" = yes; then - archive_cmds_need_lc_CXX=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_CXX='-undefined dynamic_lookup' - ;; - esac + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac fi - ;; - esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='-all_load $convenience' - link_all_deplibs_CXX=yes - else - ld_shlibs_CXX=no - fi - ;; + ;; dgux*) case $cc_basename in - ec++) + ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - ghcx) + ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -10898,14 +11258,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - freebsd12*) + freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -10922,11 +11282,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # location of the library. case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) + aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -10936,7 +11296,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then @@ -10950,33 +11310,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: - ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi - case "$host_cpu" in - hppa*64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - ia64*) + case $host_cpu in + hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. ;; *) hardcode_direct_CXX=yes @@ -10987,14 +11336,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac case $cc_basename in - CC) + CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -11013,9 +11365,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' @@ -11029,11 +11384,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; irix5* | irix6*) case $cc_basename in - CC) + CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -11044,7 +11413,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi @@ -11057,7 +11426,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; linux*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11082,17 +11451,41 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - icpc) + icpc*) # Intel C++ with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac archive_cmds_need_lc_CXX=no - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - cxx) + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' @@ -11123,7 +11516,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; mvs*) case $cc_basename in - cxx) + cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; @@ -11144,9 +11537,25 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11162,14 +11571,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -11187,7 +11596,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -11206,7 +11615,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; osf4* | osf5*) case $cc_basename in - KCC) + KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file @@ -11221,17 +11630,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - RCC) + RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - cxx) + cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -11250,7 +11659,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -11271,27 +11680,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - lcc) + lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -11304,36 +11700,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in - solaris2.0-5 | solaris2.0-5.*) ;; + solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system - # linker. + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -11341,7 +11734,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; - gcx) + gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' @@ -11379,12 +11772,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -11437,7 +11881,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -11513,6 +11957,29 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -11560,6 +12027,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic @@ -11568,7 +12039,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -11593,18 +12064,28 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; chorus*) case $cc_basename in - cxch68) + cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; dgux*) case $cc_basename in - ec++) + ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; - ghcx) + ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; @@ -11612,22 +12093,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - freebsd* | kfreebsd*-gnu) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; - aCC) + aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -11640,9 +12121,13 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; irix5* | irix6* | nonstopux*) case $cc_basename in - CC) + CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. @@ -11653,18 +12138,24 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) case $cc_basename in - KCC) + KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; - icpc) + icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - cxx) + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. @@ -11681,7 +12172,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; mvs*) case $cc_basename in - cxx) + cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) @@ -11692,14 +12183,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; osf3* | osf4* | osf5*) case $cc_basename in - KCC) + KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; - RCC) + RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; - cxx) + cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha @@ -11713,24 +12204,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; psos*) ;; - sco*) - case $cc_basename in - CC) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; solaris*) case $cc_basename in - CC) + CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; - gcx) + gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; @@ -11740,12 +12222,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; sunos4*) case $cc_basename in - CC) + CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; - lcc) + lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; @@ -11755,7 +12237,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; tandem*) case $cc_basename in - NCC) + NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; @@ -11763,7 +12245,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; esac ;; - unixware*) + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac ;; vxworks*) ;; @@ -11796,18 +12285,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11802: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12291: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11806: \$? = $ac_status" >&5 + echo "$as_me:12295: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi @@ -11828,7 +12319,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -11838,6 +12329,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then @@ -11856,23 +12389,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11862: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12395: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11866: \$? = $ac_status" >&5 + echo "$as_me:12399: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -11927,7 +12462,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + kfreebsd*-gnu) + link_all_deplibs_CXX=no ;; linux*) link_all_deplibs_CXX=no @@ -11941,11 +12479,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -11978,6 +12511,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= @@ -12110,7 +12644,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12138,7 +12672,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -12168,7 +12703,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -12191,7 +12726,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -12226,8 +12761,17 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -12245,14 +12789,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -12272,7 +12821,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -12312,6 +12861,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -12371,7 +12932,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -12445,8 +13006,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=yes + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -12484,13 +13050,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -12516,7 +13075,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -12549,6 +13108,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12564,12 +13146,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var CXX" || \ - test "X$hardcode_automatic_CXX"="Xyes" ; then + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && @@ -12601,834 +13188,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -#line 13231 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -#line 13329 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -13443,7 +13202,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -13544,6 +13303,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -13555,6 +13320,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_CXX @@ -13620,7 +13388,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -13897,16 +13665,42 @@ lt_simple_link_test_code=" program t\n end\n" # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 @@ -13919,7 +13713,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -13928,7 +13722,9 @@ aix3*) fi ;; aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 @@ -13941,8 +13737,6 @@ test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no - GCC_F77="$G77" LD_F77="$LD" @@ -13989,6 +13783,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_F77='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -14005,7 +13804,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14031,6 +13830,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -14042,7 +13851,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14066,12 +13875,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. @@ -14086,15 +13902,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' - ;; - solaris*) - lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac ;; sunos4*) @@ -14103,7 +13919,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_F77='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -14116,6 +13932,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' @@ -14150,18 +13977,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14156: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13983: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14160: \$? = $ac_status" >&5 + echo "$as_me:13987: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi @@ -14182,7 +14011,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= @@ -14192,6 +14021,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then @@ -14210,23 +14081,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14216: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14087: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14220: \$? = $ac_status" >&5 + echo "$as_me:14091: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -14302,6 +14175,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -14312,6 +14195,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -14322,6 +14209,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -14372,10 +14280,10 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -14384,9 +14292,56 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_F77=no + else + ld_shlibs_F77=no fi ;; @@ -14400,7 +14355,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <<EOF 1>&2 @@ -14421,6 +14376,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -14428,32 +14410,6 @@ EOF hardcode_shlibpath_var_F77=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_F77="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_F77="$tmp_archive_cmds" - fi - link_all_deplibs_F77=no - else - ld_shlibs_F77=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -14464,16 +14420,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs_F77" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -14485,7 +14436,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported @@ -14519,6 +14470,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -14537,7 +14489,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_F77=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -14556,8 +14508,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -14565,11 +14521,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -14623,12 +14579,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -14677,13 +14633,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' + whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -14696,7 +14650,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_F77=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; @@ -14717,57 +14671,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc_F77=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_F77='-undefined dynamic_lookup' - ;; - esac - fi - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='-all_load $convenience' + whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs_F77=no + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac fi ;; @@ -14801,13 +14755,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + link_all_deplibs_F77=no + ;; + hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' @@ -14824,47 +14787,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_F77='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' @@ -14912,6 +14890,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else @@ -14957,7 +14936,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -14965,21 +14944,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_F77=: ;; - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -14988,8 +14961,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_F77=yes ;; @@ -15046,36 +15029,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no ;; - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -15094,11 +15086,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -15131,6 +15118,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= @@ -15263,7 +15251,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -15291,7 +15279,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -15321,7 +15310,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -15344,7 +15333,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -15379,8 +15368,17 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -15398,14 +15396,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -15425,7 +15428,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -15465,6 +15468,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -15524,7 +15539,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -15598,8 +15613,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=yes + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -15637,13 +15657,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -15669,7 +15682,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -15702,6 +15715,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -15717,12 +15753,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var F77" || \ - test "X$hardcode_automatic_F77"="Xyes" ; then + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && @@ -15754,36 +15795,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -15798,7 +15809,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -15899,6 +15910,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -15910,6 +15927,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_F77 @@ -15975,7 +15995,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -16213,26 +16233,55 @@ objext_GCJ=$objext lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no +old_archive_cmds_GCJ=$old_archive_cmds + lt_prog_compiler_no_builtin_flag_GCJ= @@ -16255,18 +16304,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16261: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16310: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16265: \$? = $ac_status" >&5 + echo "$as_me:16314: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi @@ -16327,6 +16378,11 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_GCJ='-fno-common' ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. @@ -16343,7 +16399,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -16369,6 +16425,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being @@ -16380,7 +16446,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -16404,12 +16470,19 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 ;; linux*) - case $CC in + case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. @@ -16424,15 +16497,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-non_shared' ;; - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; - solaris*) - lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac ;; sunos4*) @@ -16441,7 +16514,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static_GCJ='-Bstatic' ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -16454,6 +16527,17 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 fi ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' @@ -16488,18 +16572,20 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16494: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16578: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16498: \$? = $ac_status" >&5 + echo "$as_me:16582: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi @@ -16520,7 +16606,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -16530,6 +16616,48 @@ case "$host_os" in ;; esac +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then @@ -16548,23 +16676,25 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16554: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16682: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16558: \$? = $ac_status" >&5 + echo "$as_me:16686: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - if test ! -s out/conftest.err; then + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -16640,6 +16770,16 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -16650,6 +16790,10 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -16660,6 +16804,27 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -16710,10 +16875,10 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then @@ -16722,9 +16887,56 @@ EOF echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else - ld_shlibs=no + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + link_all_deplibs_GCJ=no + else + ld_shlibs_GCJ=no fi ;; @@ -16738,7 +16950,7 @@ EOF fi ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <<EOF 1>&2 @@ -16759,6 +16971,33 @@ EOF fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= @@ -16766,32 +17005,6 @@ EOF hardcode_shlibpath_var_GCJ=no ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_GCJ="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_GCJ="$tmp_archive_cmds" - fi - link_all_deplibs_GCJ=no - else - ld_shlibs_GCJ=no - fi - ;; - *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -16802,16 +17015,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ ;; esac - if test "$ld_shlibs_GCJ" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) @@ -16823,7 +17031,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported @@ -16857,6 +17065,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ break fi done + ;; esac exp_sym_flag='-bexport' @@ -16875,7 +17084,7 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ link_all_deplibs_GCJ=yes if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) + case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` @@ -16894,8 +17103,12 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi + ;; esac shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi else # not using gcc if test "$host_cpu" = ia64; then @@ -16903,11 +17116,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~ # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then + if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' - fi + fi fi fi @@ -16971,12 +17184,12 @@ rm -f conftest.err conftest.$ac_objext \ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF @@ -17035,13 +17248,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ=' ' + whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -17054,7 +17265,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_GCJ=no ;; - bsdi4*) + bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; @@ -17075,57 +17286,57 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then - archive_cmds_need_lc_GCJ=no - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='-undefined suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='-undefined dynamic_lookup' - ;; - esac - fi - ;; + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; esac - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='-all_load $convenience' + whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else - ld_shlibs_GCJ=no + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac fi ;; @@ -17159,13 +17370,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) + freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; + # GNU/kFreeBSD uses gcc -shared to do shared libraries. + kfreebsd*-gnu) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + link_all_deplibs_GCJ=no + ;; + hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' @@ -17182,47 +17402,62 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_GCJ='${wl}-E' ;; - hpux10* | hpux11*) + hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes ;; *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' @@ -17270,6 +17505,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else @@ -17315,7 +17551,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' @@ -17323,21 +17559,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_GCJ=: ;; - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then + wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else + wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' @@ -17346,8 +17576,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac link_all_deplibs_GCJ=yes ;; @@ -17404,36 +17644,45 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + runpath_var='LD_RUN_PATH' - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no ;; - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi ;; uts4*) @@ -17452,11 +17701,6 @@ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - # # Do we need to explicitly link libc? # @@ -17489,6 +17733,7 @@ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >& libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= @@ -17621,7 +17866,7 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) +bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -17649,7 +17894,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -17679,7 +17925,7 @@ cygwin* | mingw* | pw32*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; @@ -17702,7 +17948,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -17737,8 +17983,17 @@ kfreebsd*-gnu) dynamic_linker='GNU ld.so' ;; -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -17756,14 +18011,19 @@ freebsd*) freebsd2*) shlibpath_overrides_runpath=yes ;; - freebsd3.01* | freebsdelf3.01*) + freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; - *) # from 3.2 on + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; esac ;; @@ -17783,7 +18043,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -17823,6 +18083,18 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; @@ -17882,7 +18154,7 @@ linux*) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17956,8 +18228,13 @@ nto-qnx*) openbsd*) version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - need_version=yes + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH @@ -17995,13 +18272,6 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -18027,7 +18297,7 @@ sunos4*) need_version=yes ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) +sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -18060,6 +18330,29 @@ sysv4*MP*) fi ;; +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -18075,12 +18368,17 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var GCJ" || \ - test "X$hardcode_automatic_GCJ"="Xyes" ; then + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && @@ -18112,834 +18410,6 @@ elif test "$shlibpath_overrides_runpath" = yes || enable_fast_install=needless fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -#line 18742 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -#line 18840 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -18954,7 +18424,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -19055,6 +18525,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -19066,6 +18542,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_GCJ @@ -19131,7 +18610,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -19375,15 +18854,42 @@ lt_simple_link_test_code="$lt_simple_compile_test_code" # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + # Allow CC to be a program name with arguments. compiler=$CC +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the @@ -19399,7 +18905,7 @@ if test -f "$ltmain"; then # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ @@ -19500,6 +19006,12 @@ fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo @@ -19511,6 +19023,9 @@ AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + # A language-specific compiler. CC=$lt_compiler_RC @@ -19576,7 +19091,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -# Must we lock files when doing compilation ? +# Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? @@ -25922,58 +25437,20 @@ fi done -echo "$as_me:$LINENO: checking for gethostent" >&5 -echo $ECHO_N "checking for gethostent... $ECHO_C" >&6 -if test "${ac_cv_func_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +echo "$as_me:$LINENO: checking for va_copy" >&5 +echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define gethostent to an innocuous variant, in case <limits.h> declares gethostent. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define gethostent innocuous_gethostent - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostent (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef gethostent - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostent (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostent) || defined (__stub___gethostent) -choke me -#else -char (*f) () = gethostent; -#endif -#ifdef __cplusplus -} -#endif - +#include <stdarg.h> +va_list ap1,ap2; int main () { -return f != gethostent; +va_copy(ap1,ap2); ; return 0; } @@ -25999,47 +25476,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_gethostent=yes + have_va_copy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostent=no +have_va_copy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostent" >&5 -echo "${ECHO_T}$ac_cv_func_gethostent" >&6 -if test $ac_cv_func_gethostent = yes; then - : -else +echo "$as_me:$LINENO: result: $have_va_copy" >&5 +echo "${ECHO_T}$have_va_copy" >&6 +if test x"$have_va_copy" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VA_COPY 1 +_ACEOF -echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 -echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF + echo "$as_me:$LINENO: checking for __va_copy" >&5 +echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostent (); +#include <stdarg.h> + va_list ap1,ap2; int main () { -gethostent (); +__va_copy(ap1,ap2); ; return 0; } @@ -26065,82 +25533,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostent=yes + have___va_copy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostent=no +have___va_copy=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6 -if test $ac_cv_lib_nsl_gethostent = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" + echo "$as_me:$LINENO: result: $have___va_copy" >&5 +echo "${ECHO_T}$have___va_copy" >&6 + if test x"$have___va_copy" = x"yes"; then -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE___VA_COPY 1 +_ACEOF + fi fi -echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 -if test "${ac_cv_func_setsockopt+set}" = set; then +echo "$as_me:$LINENO: checking for library containing gethostent" >&5 +echo $ECHO_N "checking for library containing gethostent... $ECHO_C" >&6 +if test "${ac_cv_search_gethostent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_gethostent=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define setsockopt innocuous_setsockopt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setsockopt (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef setsockopt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char setsockopt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) -choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} -#endif - +char gethostent (); int main () { -return f != setsockopt; +gethostent (); ; return 0; } @@ -26166,30 +25603,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_setsockopt=yes + ac_cv_search_gethostent="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 -if test $ac_cv_func_setsockopt = yes; then - : -else - -echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_gethostent" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26202,11 +25627,11 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char setsockopt (); +char gethostent (); int main () { -setsockopt (); +gethostent (); ; return 0; } @@ -26232,82 +25657,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_socket_setsockopt=yes + ac_cv_search_gethostent="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 -if test $ac_cv_lib_socket_setsockopt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 +echo "${ECHO_T}$ac_cv_search_gethostent" >&6 +if test "$ac_cv_search_gethostent" != no; then + test "$ac_cv_search_gethostent" = "none required" || LIBS="$ac_cv_search_gethostent $LIBS" fi -echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 -if test "${ac_cv_func_setsockopt+set}" = set; then +echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 +echo $ECHO_N "checking for library containing setsockopt... $ECHO_C" >&6 +if test "${ac_cv_search_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_setsockopt=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define setsockopt innocuous_setsockopt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setsockopt (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef setsockopt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setsockopt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) -choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} -#endif - int main () { -return f != setsockopt; +setsockopt (); ; return 0; } @@ -26333,30 +25727,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_setsockopt=yes + ac_cv_search_setsockopt="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 -if test $ac_cv_func_setsockopt = yes; then - : -else - -echo "$as_me:$LINENO: checking for setsockopt in -lnet" >&5 -echo $ECHO_N "checking for setsockopt in -lnet... $ECHO_C" >&6 -if test "${ac_cv_lib_net_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_setsockopt" = no; then + for ac_lib in socket net; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26399,82 +25781,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_net_setsockopt=yes + ac_cv_search_setsockopt="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_net_setsockopt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_net_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_net_setsockopt" >&6 -if test $ac_cv_lib_net_setsockopt = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNET 1 -_ACEOF - - LIBS="-lnet $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_search_setsockopt" >&6 +if test "$ac_cv_search_setsockopt" != no; then + test "$ac_cv_search_setsockopt" = "none required" || LIBS="$ac_cv_search_setsockopt $LIBS" fi -echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 -if test "${ac_cv_func_connect+set}" = set; then +echo "$as_me:$LINENO: checking for library containing connect" >&5 +echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 +if test "${ac_cv_search_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +ac_cv_search_connect=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define connect to an innocuous variant, in case <limits.h> declares connect. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef connect /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) -choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} -#endif - int main () { -return f != connect; +connect (); ; return 0; } @@ -26500,30 +25851,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_connect=yes + ac_cv_search_connect="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 -if test $ac_cv_func_connect = yes; then - : -else - -echo "$as_me:$LINENO: checking for connect in -linet" >&5 -echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6 -if test "${ac_cv_lib_inet_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test "$ac_cv_search_connect" = no; then + for ac_lib in inet; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -26566,27 +25905,23 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_inet_connect=yes + ac_cv_search_connect="-l$ac_lib" +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + done fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6 -if test $ac_cv_lib_inet_connect = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINET 1 -_ACEOF - - LIBS="-linet $LIBS" - +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 +echo "${ECHO_T}$ac_cv_search_connect" >&6 +if test "$ac_cv_search_connect" != no; then + test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" fi @@ -26594,7 +25929,7 @@ fi echo "$as_me:$LINENO: checking for type of socket length (socklen_t)" >&5 echo $ECHO_N "checking for type of socket length (socklen_t)... $ECHO_C" >&6 cat > conftest.$ac_ext <<EOF -#line 26597 "configure" +#line 25932 "configure" #include "confdefs.h" #include <stddef.h> @@ -26605,7 +25940,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL) ; return 0; } EOF -if { (eval echo configure:26608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:25943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: socklen_t *" >&5 @@ -26617,7 +25952,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 26620 "configure" +#line 25955 "configure" #include "confdefs.h" #include <stddef.h> @@ -26628,7 +25963,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL) ; return 0; } EOF -if { (eval echo configure:26631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:25966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: size_t *" >&5 @@ -26640,7 +25975,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 26643 "configure" +#line 25978 "configure" #include "confdefs.h" #include <stddef.h> @@ -26651,7 +25986,7 @@ int main(void) { (void)getsockopt (1, 1, 1, NULL, (int *)NULL) ; return 0; } EOF -if { (eval echo configure:26654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then +if { (eval echo configure:25989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then rm -rf conftest* echo "$as_me:$LINENO: result: int *" >&5 @@ -27406,7 +26741,7 @@ RDL_LIBS="" if test "${GCC}" != "yes" ; then case "${host}" in - *-*-hpux* ) + hppa*-*-hpux* ) CFLAGS="${CFLAGS} -Wp,-H30000" ;; *-dec-osf* ) @@ -27653,8 +26988,100 @@ fi ;; *) - MODULE_EXTENSION=".so" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + libxml_have_shl_load=yes +else + + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -27719,18 +27146,104 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then - WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldld" + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes +else -cat >>confdefs.h <<\_ACEOF -#define HAVE_SHLLOAD + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dlopen innocuous_dlopen +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ -fi +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif +#undef dlopen - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + libxml_have_dlopen=yes +else + + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -27795,16 +27308,44 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes +fi + +fi + +fi + +fi + + + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldl" cat >>confdefs.h <<\_ACEOF -#define HAVE_DLOPEN +#define HAVE_SHLLOAD _ACEOF + fi -fi + if test "${libxml_have_dlopen}" = "yes"; then + case "${host}" in + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; + esac + + WITH_MODULES=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLOPEN +_ACEOF + fi ;; esac fi @@ -30914,3 +30455,4 @@ fi chmod +x xml2-config python/setup.py +echo Done configuring diff --git a/configure.in b/configure.in index d12183f..c8f4479 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=6 -LIBXML_MICRO_VERSION=22 +LIBXML_MICRO_VERSION=23 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -432,11 +432,31 @@ dnl Checking the standard string functions availability AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, NEED_TRIO=1) +dnl Checking for va_copy availability +AC_MSG_CHECKING([for va_copy]) +AC_TRY_LINK([#include <stdarg.h> +va_list ap1,ap2;], [va_copy(ap1,ap2);], +have_va_copy=yes, +have_va_copy=no) +AC_MSG_RESULT($have_va_copy) +if test x"$have_va_copy" = x"yes"; then + AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) +else + AC_MSG_CHECKING([for __va_copy]) + AC_TRY_LINK([#include <stdarg.h> + va_list ap1,ap2;], [__va_copy(ap1,ap2);], + have___va_copy=yes, + have___va_copy=no) + AC_MSG_RESULT($have___va_copy) + if test x"$have___va_copy" = x"yes"; then + AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) + fi +fi + dnl Checks for inet libraries: -AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(net, setsockopt)) -AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) +AC_SEARCH_LIBS(gethostent, [nsl]) +AC_SEARCH_LIBS(setsockopt, [socket net]) +AC_SEARCH_LIBS(connect, [inet]) dnl Determine what socket length (socklen_t) data type is AC_MSG_CHECKING([for type of socket length (socklen_t)]) @@ -569,7 +589,7 @@ dnl DEC : Enable NaN/Inf dnl if test "${GCC}" != "yes" ; then case "${host}" in - *-*-hpux* ) + hppa*-*-hpux* ) CFLAGS="${CFLAGS} -Wp,-H30000" ;; *-dec-osf* ) @@ -703,18 +723,34 @@ if test "$with_modules" != "no" ; then ]) ;; *) - MODULE_EXTENSION=".so" - AC_CHECK_LIB(dld, shl_load, [ + AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [ + AC_CHECK_LIB(dld, shl_load, [ + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes], [ + AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [ + AC_CHECK_LIB(dl, dlopen, [ + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes])])])]) + + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldld" AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso]) - ]) + fi - AC_CHECK_LIB(dl, dlopen, [ + if test "${libxml_have_dlopen}" = "yes"; then + case "${host}" in + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; + esac + WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldl" AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) - ]) + fi ;; esac fi @@ -1320,3 +1356,4 @@ ln -s Copyright COPYING AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py) chmod +x xml2-config python/setup.py +echo Done configuring diff --git a/debian/changelog b/debian/changelog index df95ba9..80c29ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +libxml2 (2.6.23-1) UNRELEASED; urgency=low + + * (NOT RELEASED YET) New upstream release + + -- Mike Hommey <mh@glandium.org> Fri, 6 Jan 2006 18:29:19 +0100 + +libxml2 (2.6.22-3) UNRELEASED; urgency=low + + * debian/control: + + Added | libreadline-dev for readline dependency. + + Bumped Standards-Version to 3.6.2.1. No changes needed. + + -- Mike Hommey <glandium@debian.org> Tue, 15 Nov 2005 15:10:45 +0100 + libxml2 (2.6.22-2) unstable; urgency=low * autogen.sh: Changed the way we rebuild the examples. diff --git a/debian/control b/debian/control index 25c52e7..d2a1ffd 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Priority: optional Section: libs Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org> Uploaders: Mike Hommey <glandium@debian.org> -Standards-Version: 3.6.1 -Build-Depends: debhelper (>= 4.1.67), zlib1g-dev | libz-dev, python, python2.4-dev, python2.3-dev, python2.2-dev, autotools-dev, libreadline5-dev +Standards-Version: 3.6.2.1 +Build-Depends: debhelper (>= 4.1.67), zlib1g-dev | libz-dev, python, python2.4-dev, python2.3-dev, python2.2-dev, autotools-dev, libreadline5-dev | libreadline-dev Package: libxml2 Architecture: any diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index 36b401b..7763664 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -73,7 +73,9 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Activation</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> +</dd><dt>Actually</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> </dd><dt>Add</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br /> <a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br /> <a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br /> @@ -96,7 +98,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br /> <a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br /> </dd><dt>AegeanNumbers</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a><br /> -</dd><dt>All</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br /> +</dd><dt>All</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> +<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br /> @@ -203,6 +207,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> <a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br /> </dd><dt>Base</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br /> </dd><dt>BaseChar</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br /> <a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br /> @@ -230,6 +235,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Both</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>BoxDrawing</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br /> </dd><dt>BraillePatterns</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br /> </dd><dt>Brzozowski</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br /> diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 668482d..2736de5 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -301,6 +301,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> </dd><dt>Correct</dt><dd><a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br /> <a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br /> +</dd><dt>Could</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>Count</dt><dd><a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br /> </dd><dt>Creates</dt><dd><a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br /> <a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br /> diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 74cea54..c397308 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br /> </dd><dt>above</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> </dd><dt>absent</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br /> @@ -106,6 +107,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>account</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> </dd><dt>act</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>activate</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> </dd><dt>activated</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br /> @@ -119,6 +121,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>activation</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br /> </dd><dt>acts</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br /> @@ -162,6 +165,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br /> @@ -196,6 +200,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> </dd><dt>additional</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> +</dd><dt>additionally</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>address</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br /> <a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br /> </dd><dt>adds</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br /> @@ -362,6 +367,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br /> @@ -415,7 +421,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> <a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br /> <a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br /> <a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br /> @@ -525,11 +530,16 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>atomic</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br /> <a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br /> </dd><dt>attached</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> -</dd><dt>attr</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +</dd><dt>attr</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br /> <a href="html/libxml-tree.html#_xmlID">_xmlID</a><br /> <a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br /> +</dd><dt>attribute-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>attribute-list</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> +</dd><dt>attribute-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +</dd><dt>attribute-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>attributeFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br /> </dd><dt>augmented</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br /> <a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br /> @@ -546,8 +556,11 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>autoclose</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br /> </dd><dt>autoclosed</dt><dd><a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br /> </dd><dt>autogeneration</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> -</dd><dt>automatically</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> +</dd><dt>automatically</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> +<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br /> +</dd><dt>automaton</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>autoreference</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> </dd><dt>avoiding</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br /> diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index 763623f..ce2a617 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -58,10 +58,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br /> <a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br /> <a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br /> @@ -96,6 +92,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> @@ -194,7 +191,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> </dd><dt>bracket</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br /> </dd><dt>branch</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br /> </dd><dt>break</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> @@ -210,6 +206,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -264,7 +261,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> <a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br /> -</dd><dt>built-in</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> +</dd><dt>built-in</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 9d1944e..6db6d0d 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -37,7 +37,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="APIchunk27.html">w-w</a> <a href="APIchunk28.html">x-x</a> <a href="APIchunk29.html">y-z</a> -</h2><h2>Letter c:</h2><dl><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br /> +</h2><h2>Letter c:</h2><dl><dt>calculated</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br /> +</dd><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br /> </dd><dt>calling</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> @@ -51,7 +52,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br /> </dd><dt>calls</dt><dd><a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> <a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br /> </dd><dt>came</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br /> </dd><dt>cannot</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br /> @@ -121,6 +121,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br /> </dd><dt>category</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br /> </dd><dt>cause</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br /> +</dd><dt>cdata-section-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>ceiling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br /> </dd><dt>certainly</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> </dd><dt>chained</dt><dd><a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br /> @@ -128,10 +130,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> -<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> <a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br /> <a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br /> <a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br /> @@ -318,6 +318,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>combining</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br /> </dd><dt>come</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>coment</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br /> </dd><dt>comes</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br /> <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br /> @@ -341,6 +342,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br /> +</dd><dt>comment-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>comments</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br /> @@ -415,6 +418,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br /> <a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br /> <a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br /> <a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br /> <a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br /> @@ -451,6 +457,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br /> </dd><dt>complex</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>complexType</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br /> @@ -459,6 +466,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br /> </dd><dt>complicated</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> +</dd><dt>component</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>components</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> </dd><dt>compound</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br /> <a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br /> @@ -580,7 +588,9 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>consist</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br /> </dd><dt>constant</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br /> <a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br /> -</dd><dt>constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br /> +</dd><dt>constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaWildcardNs">_xmlSchemaWildcardNs</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> <a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br /> @@ -644,7 +654,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br /> -</dd><dt>contains</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> +</dd><dt>contains</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> +<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> <a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> @@ -693,6 +704,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> </dd><dt>continuing</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> +</dd><dt>contraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>contrary</dt><dd><a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br /> <a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br /> </dd><dt>control</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> @@ -743,6 +755,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br /> </dd><dt>converter</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -782,6 +795,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br /> </dd><dt>count</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> @@ -807,7 +821,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br /> <a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br /> <a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br /> -<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br /> <a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br /> </dd><dt>creates</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br /> @@ -850,7 +863,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br /> <a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> </dd><dt>custom</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br /> diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index a44fa80..d286a7a 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -44,6 +44,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>day:minute</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> </dd><dt>de-coupled</dt><dd><a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br /> </dd><dt>deactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>deallocate</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br /> <a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br /> @@ -112,7 +114,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br /> </dd><dt>decimal</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> </dd><dt>decl</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> <a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br /> <a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br /> <a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> @@ -212,6 +213,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br /> +</dd><dt>defs</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>delayed</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br /> @@ -248,18 +251,17 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br /> </dd><dt>des</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>desactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>descendant</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br /> </dd><dt>descendant-or-self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br /> </dd><dt>descendants</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br /> -</dd><dt>described</dt><dd><a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br /> +</dd><dt>described</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> +<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br /> <a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br /> <a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br /> <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br /> @@ -350,7 +352,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br /> </dd><dt>detection</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br /> <a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br /> <a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br /> @@ -378,6 +379,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>dictionnary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> @@ -586,9 +588,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>duplicates</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br /> </dd><dt>duration</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> </dd><dt>during</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> <a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br /> </dd><dt>dynamic</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index 5c7e274..c093285 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -70,9 +70,12 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br /> </dd><dt>elem</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br /> -</dd><dt>element-</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> +</dd><dt>element-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>element-node</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> </dd><dt>element-nodes</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>elementFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br /> </dd><dt>elementdecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br /> @@ -256,6 +259,35 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br /> <a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br /> <a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br /> +</dd><dt>errors</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br /> +<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br /> +<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br /> +<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br /> +<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> +<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br /> +<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br /> +<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> +<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br /> +<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> +<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> +<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> +<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br /> +<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br /> +<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br /> +<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br /> +<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br /> +<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br /> +<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br /> +<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br /> +<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>errror</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br /> </dd><dt>escape</dt><dd><a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br /> <a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br /> @@ -277,7 +309,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br /> </dd><dt>especially</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br /> </dd><dt>established</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br /> -</dd><dt>etc</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br /> +</dd><dt>etc</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> +<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br /> <a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br /> <a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> </dd><dt>evaluate</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br /> @@ -309,11 +342,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br /> -</dd><dt>event</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> </dd><dt>events</dt><dd><a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> </dd><dt>ever</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br /> </dd><dt>everywhere</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br /> <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> @@ -375,6 +404,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>experimental</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index da7f8f7..c6452a2 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>facets</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> </dd><dt>facility</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br /> <a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br /> @@ -102,7 +103,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> </dd><dt>far</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br /> </dd><dt>fashion</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br /> </dd><dt>fast</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br /> </dd><dt>faster</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br /> @@ -118,6 +118,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>fed</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br /> <a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>fetch</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br /> <a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br /> @@ -202,7 +204,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br /> </dd><dt>flagged</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> <a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br /> -</dd><dt>flags</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> +</dd><dt>flags</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> @@ -222,9 +225,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br /> </dd><dt>floor</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br /> </dd><dt>flow</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> </dd><dt>flushes</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br /> </dd><dt>follow</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br /> @@ -285,6 +285,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br /> </dd><dt>formatting</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br /> @@ -307,7 +308,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br /> <a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br /> <a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br /> -</dd><dt>forward</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> </dd><dt>fptr</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br /> </dd><dt>fragment</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> <a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br /> @@ -381,10 +381,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br /> <a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br /> <a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br /> @@ -396,7 +394,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br /> <a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br /> <a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br /> -</dd><dt>future</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> <a href="APIchunk1.html">C-C</a> <a href="APIchunk2.html">D-E</a> diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index d04b049..dcc30f1 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -161,12 +161,13 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> </dd><dt>greater-than</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> -</dd><dt>group</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +</dd><dt>group</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> <a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br /> @@ -275,8 +276,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> </dd><dt>highly</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br /> -<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> </dd><dt>hold</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br /> <a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br /> diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 22d1024..eabec9f 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -40,6 +40,8 @@ A:link, A:visited, A:active { text-decoration: underline } </h2><h2>Letter i:</h2><dl><dt>iconv</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a><br /> <a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br /> </dd><dt>identify</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br /> +</dd><dt>identity-constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>ignorable</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br /> <a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br /> <a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br /> @@ -130,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br /> +</dd><dt>incl</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>include</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br /> @@ -217,6 +220,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>indicates</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br /> @@ -288,7 +292,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>informations</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br /> @@ -313,13 +316,12 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br /> <a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br /> </dd><dt>informative</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br /> </dd><dt>infos</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> </dd><dt>inherited</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br /> <a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br /> @@ -327,6 +329,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>inherits</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> </dd><dt>initial</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br /> <a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br /> <a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br /> @@ -442,8 +445,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br /> <a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br /> <a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br /> -<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br /> </dd><dt>interfaces</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a><br /> @@ -463,7 +464,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br /> <a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br /> <a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> </dd><dt>interned</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br /> </dd><dt>interning</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br /> diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index 8bc0157..51e8c2a 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -73,8 +73,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> </dd><dt>keyword</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> </dd><dt>kill</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br /> -</dd><dt>kind</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> +</dd><dt>kind</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaNotation">_xmlSchemaNotation</a><br /> @@ -134,8 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br /> <a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br /> <a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> </dd><dt>leading</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index cecaf32..c54ee8d 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -51,7 +51,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>main</dt><dd><a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br /> </dd><dt>maintained</dt><dd><a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br /> <a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> </dd><dt>major</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> </dd><dt>make</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br /> <a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br /> @@ -149,12 +148,14 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br /> <a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br /> <a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br /> +</dd><dt>maybe</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>mean</dt><dd><a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br /> </dd><dt>means</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br /> <a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>mechanism</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br /> @@ -177,6 +178,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br /> <a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> +</dd><dt>member-types</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>memo</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br /> </dd><dt>memorylist</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br /> @@ -259,7 +261,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br /> <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> <a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br /> -</dd><dt>model</dt><dd><a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br /> +</dd><dt>model</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> +<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br /> </dd><dt>modified</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br /> <a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br /> <a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br /> diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index 9a0e7ab..85de2bb 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -133,15 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>DefaultDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> </dd><dt>Deletes</dt><dd><a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br /> -</dd><dt>Deprecated</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> -<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br /> -<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br /> -<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br /> -<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br /> -<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br /> -<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br /> -<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br /> -<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br /> </dd><dt>Depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br /> </dd><dt>Dereference</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br /> @@ -155,6 +146,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br /> </dd><dt>Devanagari</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a><br /> +</dd><dt>Different</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>Digit</dt><dd><a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br /> <a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br /> <a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br /> diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 01db33a..9d751f3 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -80,7 +80,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br /> </dd><dt>nearly</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br /> <a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br /> -</dd><dt>necessary</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> +</dd><dt>necessary</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> <a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> <a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br /> </dd><dt>need</dt><dd><a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br /> @@ -101,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> <a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br /> </dd><dt>needed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> @@ -116,7 +118,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br /> <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br /> <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br /> <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br /> @@ -136,6 +137,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br /> </dd><dt>needs</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br /> </dd><dt>negated</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br /> </dd><dt>negative</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> @@ -215,7 +217,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br /> -</dd><dt>none</dt><dd><a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br /> +</dd><dt>none</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> <a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -265,7 +268,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> -<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> <a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br /> </dd><dt>ns-decls</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 6789f9d..13518b1 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -50,11 +50,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br /> </dd><dt>obligated</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> -</dd><dt>obsolete</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> -<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br /> +</dd><dt>obsolete</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br /> </dd><dt>obsolete:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br /> </dd><dt>occupied</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br /> -</dd><dt>occur</dt><dd><a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br /> +</dd><dt>occur</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br /> <a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br /> </dd><dt>occured</dt><dd><a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br /> <a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br /> @@ -152,6 +152,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>onto</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>opaque</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> <a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> </dd><dt>open</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br /> @@ -222,7 +223,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>option</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br /> </dd><dt>optional</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br /> <a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br /> <a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br /> @@ -244,7 +244,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br /> <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br /> <a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br /> @@ -252,12 +251,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> <a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> </dd><dt>ordered</dt><dd><a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br /> <a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br /> @@ -278,14 +276,14 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>oriented</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br /> <a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br /> </dd><dt>origin</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> -</dd><dt>original</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br /> +</dd><dt>original</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> +<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br /> <a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br /> <a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br /> <a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br /> <a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> <a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br /> <a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br /> <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br /> diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 42008e7..fdec580 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -81,8 +81,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>partial</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br /> -</dd><dt>particle</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>particular</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br /> </dd><dt>pass</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br /> @@ -137,7 +135,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> +</dd><dt>patterns</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> </dd><dt>pcdata</dt><dd><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br /> <a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br /> @@ -179,8 +179,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> <a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br /> </dd><dt>points</dt><dd><a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br /> </dd><dt>pop</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br /> @@ -199,8 +197,36 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>positioned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br /> </dd><dt>positionned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br /> </dd><dt>positions</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br /> -</dd><dt>possible</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> -<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br /> +</dd><dt>positive</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br /> +<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br /> +<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br /> +<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br /> +<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br /> +<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br /> +<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br /> +<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br /> +<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br /> +<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br /> +<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br /> +<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br /> +<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> +<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br /> +<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br /> +<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br /> +<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br /> +<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br /> +<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br /> +<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br /> +</dd><dt>possible</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br /> <a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> @@ -210,6 +236,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> <a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br /> </dd><dt>possibly</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br /> @@ -249,7 +276,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> <a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> @@ -403,8 +429,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>processing-instruction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br /> +</dd><dt>processing-instruction-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +</dd><dt>processing-instruction-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>processor</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> @@ -425,6 +454,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>progresses</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br /> </dd><dt>progressive</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -484,7 +514,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br /> <a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br /> <a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br /> <a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br /> </dd><dt>provides</dt><dd><a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br /> @@ -519,6 +548,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br /> </dd><dt>pushed</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br /> </dd><dt>pushing</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br /> </dd><dt>put</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br /> diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index d5a969d..b217f1c 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -116,8 +116,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>read-only</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br /> </dd><dt>readable</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> </dd><dt>reader-</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br /> -</dd><dt>reading</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> -<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br /> +</dd><dt>reading</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br /> </dd><dt>ready</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br /> </dd><dt>realloc</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br /> @@ -212,9 +211,9 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>recursively</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> </dd><dt>redeclared</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> -</dd><dt>redef</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> +</dd><dt>redefined</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br /> </dd><dt>redefinition</dt><dd><a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br /> -</dd><dt>redefinitions</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>redir</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br /> </dd><dt>redirected</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br /> <a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br /> @@ -235,10 +234,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br /> <a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br /> <a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br /> -</dd><dt>referenced</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> -<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br /> +</dd><dt>referenced</dt><dd><a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> -</dd><dt>references</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br /> +</dd><dt>references</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br /> <a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br /> @@ -268,6 +267,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>refs</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br /> <a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> </dd><dt>refuse</dt><dd><a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br /> +</dd><dt>regex</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> </dd><dt>regexp</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br /> <a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> @@ -397,7 +397,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br /> <a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br /> </dd><dt>replacement</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br /> <a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br /> @@ -474,6 +473,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>resides</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br /> </dd><dt>resize</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br /> @@ -504,7 +504,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br /> <a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br /> <a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br /> @@ -516,8 +515,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br /> </dd><dt>responsible</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> <a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br /> -</dd><dt>restored</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> +</dd><dt>restored</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br /> </dd><dt>restrict</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> </dd><dt>restriction</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br /> @@ -586,7 +584,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br /> <a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br /> <a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br /> -<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br /> <a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br /> @@ -595,6 +592,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br /> diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index ed6bc81..63d494b 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -80,6 +80,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>saving</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br /> <a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -89,6 +90,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> @@ -124,13 +126,11 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> </dd><dt>schematron</dt><dd><a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br /> </dd><dt>scheme</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> <a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br /> @@ -186,8 +186,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br /> <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br /> </dd><dt>seq</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> -</dd><dt>sequence</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> -<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> +</dd><dt>sequence</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> <a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br /> @@ -214,6 +213,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> </dd><dt>sequqnce</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br /> </dd><dt>serialization</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> @@ -221,7 +221,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br /> <a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br /> <a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br /> -</dd><dt>serializing</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> +</dd><dt>serializing</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> </dd><dt>server</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br /> @@ -327,6 +328,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>simple</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br /> <a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br /> <a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br /> @@ -348,7 +350,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br /> </dd><dt>simply</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> -</dd><dt>since</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> +</dd><dt>since</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br /> @@ -438,6 +441,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>spaces</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br /> @@ -555,7 +559,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br /> <a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br /> <a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> <a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br /> @@ -646,8 +649,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br /> <a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br /> </dd><dt>streamable</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> </dd><dt>streaming</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>streams</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br /> <a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br /> </dd><dt>strict</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> @@ -669,8 +672,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br /> +<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br /> </dd><dt>stripping</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br /> </dd><dt>strncasecmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br /> @@ -690,7 +695,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>structured</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> </dd><dt>structures</dt><dd><a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br /> <a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br /> @@ -715,8 +720,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br /> </dd><dt>subexpressions</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br /> </dd><dt>subject</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> -<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> </dd><dt>sublanguage</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br /> </dd><dt>submits</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br /> </dd><dt>subsequent</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br /> @@ -763,7 +766,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br /> <a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br /> <a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br /> diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index 98b46a8..594667e 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -101,6 +101,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br /> </dd><dt>tested</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br /> </dd><dt>testing</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br /> +</dd><dt>text-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>text-node</dt><dd><a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br /> </dd><dt>textDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br /> </dd><dt>than</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> @@ -166,6 +168,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br /> +</dd><dt>this?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>those</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> @@ -400,15 +403,17 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br /> <a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br /> </dd><dt>two-character</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br /> -</dd><dt>typ</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaTypeLink">_xmlSchemaTypeLink</a><br /> +</dd><dt>type:</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>typefixed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br /> </dd><dt>types</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>typo</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a> <a href="APIchunk1.html">C-C</a> diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index 8a0befa..0f38063 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -68,6 +68,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br /> </dd><dt>unique</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br /> <a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> @@ -117,7 +118,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br /> -</dd><dt>unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> </dd><dt>unpredictable</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br /> <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br /> <a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br /> @@ -150,7 +150,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> <a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br /> <a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br /> <a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br /> @@ -182,6 +181,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>usage</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br /> <a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br /> </dd><dt>used:</dt><dd><a href="html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a><br /> +</dd><dt>used?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>useful</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br /> <a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br /> <a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br /> diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html index 2db1f05..a5257c9 100644 --- a/doc/APIchunk27.html +++ b/doc/APIchunk27.html @@ -63,9 +63,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> <a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br /> @@ -115,7 +113,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br /> <a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br /> <a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br /> <a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br /> <a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br /> <a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br /> diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html index 232b492..8fb67a9 100644 --- a/doc/APIchunk28.html +++ b/doc/APIchunk28.html @@ -109,7 +109,9 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>xmlBuffer</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br /> <a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br /> <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> </dd><dt>xmlBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> </dd><dt>xmlBuildURI</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br /> </dd><dt>xmlBytesConsumed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br /> </dd><dt>xmlCatalogAllow</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br /> @@ -339,6 +341,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>xmlPatternGetStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br /> </dd><dt>xmlPatterncompile</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>xmlPopInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br /> </dd><dt>xmlPushInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br /> </dd><dt>xmlRFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br /> @@ -385,22 +388,20 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>xmlSAX2StartDocument</dt><dd><a href="html/libxml-SAX.html#startDocument">startDocument</a><br /> </dd><dt>xmlSAX2StartElement</dt><dd><a href="html/libxml-SAX.html#startElement">startElement</a><br /> </dd><dt>xmlSAX2UnparsedEntityDecl</dt><dd><a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br /> -</dd><dt>xmlSAXHandlerPtr</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> </dd><dt>xmlSAXVersion</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br /> -</dd><dt>xmlSaveOptions</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> +</dd><dt>xmlSaveOptions</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> -</dd><dt>xmlSchemaAttributeGroupPtr</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> -</dd><dt>xmlSchemaSAXPlug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> </dd><dt>xmlSchemaValType</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br /> -</dd><dt>xmlSchemaValidOption</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> </dd><dt>xmlSchematronValidOptions</dt><dd><a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br /> </dd><dt>xmlSetExternalEntityLoader</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br /> <a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br /> </dd><dt>xmlSnprintfElementContent</dt><dd><a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br /> -</dd><dt>xmlStrEqual</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> +</dd><dt>xmlStrcmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br /> </dd><dt>xmlStrdup</dt><dd><a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br /> +</dd><dt>xmlStreamPush</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> </dd><dt>xmlStringDecodeEntities</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> </dd><dt>xmlStringGetNodeList</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> </dd><dt>xmlStrncat</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br /> diff --git a/doc/APIchunk29.html b/doc/APIchunk29.html index e9edd2c..3469fca 100644 --- a/doc/APIchunk29.html +++ b/doc/APIchunk29.html @@ -54,6 +54,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> </dd><dt>you</dt><dd><a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br /> <a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br /> <a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br /> diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index e2ac654..7d6d9e0 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -176,6 +176,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>HighSurrogates</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a><br /> </dd><dt>Hiragana</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHiragana">xmlUCSIsHiragana</a><br /> </dd><dt>Hmm</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br /> +</dd><dt>Holds</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>How</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br /> </dd><dt>However</dt><dd><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br /> <a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br /> diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index 858dadd..01c825a 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -86,6 +86,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br /> </dd><dt>Local</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br /> <a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>LocalPart</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br /> <a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br /> <a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br /> @@ -212,6 +213,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br /> </dd><dt>NRK</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>NSDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br /> @@ -275,6 +277,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Non-static</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br /> </dd><dt>Normalization</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br /> </dd><dt>Normalization:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br /> +</dd><dt>Not</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>NotaNumber</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br /> </dd><dt>Notation</dt><dd><a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br /> <a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br /> @@ -311,6 +314,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br /> <a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br /> +<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> <a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br /> </dd><dt>Note:</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br /> diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html index 31e1e79..f54bb37 100644 --- a/doc/APIchunk5.html +++ b/doc/APIchunk5.html @@ -45,12 +45,17 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br /> </dd><dt>OUT:</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br /> <a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br /> </dd><dt>Obsolete</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> </dd><dt>Obtain</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br /> </dd><dt>Ogham</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOgham">xmlUCSIsOgham</a><br /> @@ -65,6 +70,8 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Optional</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br /> </dd><dt>Oriya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOriya">xmlUCSIsOriya</a><br /> </dd><dt>Osmanya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a><br /> +</dd><dt>Otherwise</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> </dd><dt>Output</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br /> @@ -145,7 +152,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>People</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br /> </dd><dt>PhoneticExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br /> </dd><dt>Please</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br /> -</dd><dt>Plug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br /> </dd><dt>Pointer</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br /> </dd><dt>Points</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br /> </dd><dt>Pop</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br /> @@ -235,6 +241,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br /> </dd><dt>Pushes</dt><dd><a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br /> <a href="html/libxml-parserInternals.html#namePush">namePush</a><br /> diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index b6d4741..3f790bb 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -58,6 +58,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Qualified</dt><dd><a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br /> </dd><dt>Query</dt><dd><a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br /> <a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </dd><dt>Question:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br /> </dd></dl><h2>Letter R:</h2><dl><dt>REC</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br /> <a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br /> @@ -88,6 +89,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>Reader</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br /> @@ -109,7 +111,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Recurse</dt><dd><a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br /> </dd><dt>Recursion</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> -</dd><dt>Redefinitions</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br /> </dd><dt>Ref</dt><dd><a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br /> <a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br /> <a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br /> @@ -170,7 +171,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br /> -</dd><dt>RelaxNG</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br /> +</dd><dt>RelaxNG</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> +<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br /> @@ -182,7 +184,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> -<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> </dd><dt>RelaxNGs</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br /> diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index 5c9847c..5b71d96 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -50,7 +50,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br /> <a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> </dd><dt>SAX::substituteEntities</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br /> </dd><dt>SDDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> </dd><dt>SDDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br /> @@ -107,6 +106,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br /> <a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>Schemas</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br /> <a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br /> @@ -118,7 +119,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> </dd><dt>Schematron</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br /> <a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br /> <a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br /> @@ -168,7 +168,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br /> </dd><dt>Sets</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br /> <a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br /> diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 0407e65..8c3b0a4 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -51,7 +51,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br /> </dd><dt>TODO</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br /> -</dd><dt>TODO:</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br /> +</dd><dt>TODO:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> +<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br /> <a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br /> <a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> @@ -161,7 +162,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br /> <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> -</dd><dt>Type</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br /> +</dd><dt>Type</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> +<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br /> <a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br /> <a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br /> <a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br /> @@ -218,7 +220,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br /> <a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br /> </dd><dt>Unlinks</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> -</dd><dt>Unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> </dd><dt>Unregisters</dt><dd><a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br /> <a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br /> </dd><dt>Update</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br /> @@ -245,11 +246,13 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>Used</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br /> <a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br /> +<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br /> <a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br /> <a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br /> <a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br /> diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 91895db..ac0163d 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -41,9 +41,6 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>Validate</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br /> <a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> <a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br /> <a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br /> <a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br /> @@ -74,8 +71,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>VersionNum</dt><dd><a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br /> <a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br /> </dd></dl><h2>Letter W:</h2><dl><dt>W3C</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> -</dd><dt>WARNING</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> -<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> </dd><dt>WARNING:</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br /> <a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br /> @@ -92,6 +88,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br /> <a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br /> </dd><dt>WWW-Authenticate</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br /> +</dd><dt>WXS</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br /> </dd><dt>Walk</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br /> <a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br /> </dd><dt>Warning</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br /> @@ -156,7 +153,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br /> <a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br /> <a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br /> -</dd><dt>XML-Schema</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br /> </dd><dt>XMLDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br /> </dd><dt>XMLDecl?</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br /> </dd><dt>XMLSchema</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br /> @@ -186,6 +182,7 @@ A:link, A:visited, A:active { text-decoration: underline } </dd><dt>XML_ENTITY_DECL</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br /> </dd><dt>XML_ERR_OK</dt><dd><a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br /> </dd><dt>XML_SCHEMAS_ELEM_GLOBAL</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br /> +</dd><dt>XML_SCHEMAS_FACET_PRESERVE</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br /> </dd><dt>XML_SCHEMAS_STRING</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br /> </dd><dt>XML_SUBSTITUTE_PEREF</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> @@ -209,6 +206,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br /> </dd><dt>XSD</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> </dd><dt>XSLT</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br /> <a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br /> diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 9598e49..7029c33 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -430,6 +430,7 @@ A:link, A:visited, A:active { text-decoration: underline } </p><h2>Type xmlOutputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br /> <a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br /> </p><h2>Type xmlOutputBufferPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -481,7 +482,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br /> </p><h2>Type xmlRelaxNGPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br /> </p><h2>Type xmlRelaxNGValidCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br /> -</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> +</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> </p><h2>Type xmlSchemaFacetPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br /> diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 744feb1..4f960e0 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -102,6 +102,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br /> <a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br /> <a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br /> @@ -914,6 +915,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </p><h2><a name="relaxng" id="relaxng">Module relaxng</a>:</h2><p><a href="html/libxml-relaxng.html#XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a><br /> <a href="html/libxml-relaxng.html#XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a><br /> <a href="html/libxml-relaxng.html#XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a><br /> @@ -1000,7 +1003,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br /> @@ -1103,6 +1108,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br /> @@ -1124,6 +1130,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br /> @@ -1142,6 +1149,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br /> @@ -1707,6 +1715,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br /> <a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -2187,13 +2196,18 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a><br /> <a href="html/libxml-xmlerror.html#XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a><br /> <a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br /> @@ -2692,6 +2706,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> @@ -2759,6 +2774,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> @@ -2811,6 +2827,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index 3d660c4..593cc82 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -371,6 +371,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> <a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br /> @@ -557,6 +558,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br /> <a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br /> <a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br /> <a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br /> @@ -839,6 +841,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> @@ -960,6 +963,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br /> <a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br /> <a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> </p><h2>Type xmlC14NIsVisibleCallback:</h2><p><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br /> </p><h2>Type xmlCatalogAllow:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br /> </p><h2>Type xmlCatalogPrefer:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br /> @@ -1003,6 +1008,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br /> <a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br /> </p><h2>Type xmlChar **:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br /> <a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br /> @@ -1042,6 +1048,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br /> <a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br /> </p><h2>Type xmlCharEncodingHandlerPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -1076,6 +1083,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br /> <a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br /> @@ -1865,6 +1873,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> </p><h2>Type xmlSchemaPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br /> @@ -1913,6 +1922,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> </p><h2>Type xmlSchemaValidityErrorFunc:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> </p><h2>Type xmlSchemaValidityErrorFunc *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br /> @@ -1952,7 +1962,10 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> </p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> <a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br /> @@ -2028,6 +2041,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index a335a81..36d294c 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -779,13 +779,18 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br /> <a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br /> <a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br /> +<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br /> <a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br /> @@ -977,7 +982,9 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br /> @@ -1106,6 +1113,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br /> @@ -1211,6 +1219,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br /> @@ -1229,6 +1238,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br /> +<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br /> <a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br /> @@ -1534,6 +1544,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br /> <a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br /> +<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br /> <a href="html/libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a><br /> <a href="html/libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a><br /> <a href="html/libxml-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a><br /> @@ -2331,6 +2342,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-tree.html#xmlNsType">xmlNsType</a><br /> <a href="html/libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br /> +<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br /> <a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br /> @@ -2637,6 +2649,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br /> +<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br /> <a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br /> @@ -2704,6 +2717,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br /> +<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br /> <a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br /> @@ -2819,6 +2833,8 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br /> <a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br /> <a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br /> +<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br /> +<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br /> <a href="html/libxml-parserInternals.html#xmlStringComment">xmlStringComment</a><br /> <a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br /> <a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br /> @@ -2910,6 +2926,7 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br /> +<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br /> <a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br /> diff --git a/doc/FAQ.html b/doc/FAQ.html index 7f68c99..da553fb 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li> +</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li> <li><a href="FAQ.html#Installati">Installation</a></li> <li><a href="FAQ.html#Compilatio">Compilation</a></li> <li><a href="FAQ.html#Developer">Developer corner</a></li> @@ -118,40 +118,47 @@ A:link, A:visited, A:active { text-decoration: underline } <p><code>CFLAGS=`xml2-config --cflags`</code></p> <p><code>LIBS=`xml2-config --libs`</code></p> </li> - <li><em>I want to install my own copy of libxml2 in my home directory and link - my programs against it, but it doesn't work</em> + <li><em>I want to install my own copy of libxml2 in my home directory and + link my programs against it, but it doesn't work</em> <p>There are many different ways to accomplish this. Here is one way to - do this under Linux. Suppose your home directory is <code>/home/user. - </code>Then:</p> + do this under Linux. Suppose your home directory is <code>/home/user. + </code>Then:</p> <ul><li>Create a subdirectory, let's call it <code>myxml</code></li> <li>unpack the libxml2 distribution into that subdirectory</li> - <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2 - </code>)</li> + <li>chdir into the unpacked distribution + (<code>/home/user/myxml/libxml2 </code>)</li> <li>configure the library using the "<code>--prefix</code>" switch, - specifying an installation subdirectory in <code>/home/user/myxml</code>, - e.g. - <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other - configuration options}</p></li> + specifying an installation subdirectory in + <code>/home/user/myxml</code>, e.g. + <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other + configuration options}</p> + </li> <li>now run <code>make</code> followed by <code>make install</code></li> <li>At this point, the installation subdirectory contains the complete - "private" include files, library files and binary program files (e.g. - xmllint), located in - <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include - </code> and <code> /home/user/myxml/xmlinst/bin</code></p> - respectively.</li> - <li>In order to use this "private" library, you should first add it - to the beginning of your default PATH (so that your own private - program files such as xmllint will be used instead of the normal - system ones). To do this, the Bash command would be - <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li> + "private" include files, library files and binary program files (e.g. + xmllint), located in + <p><code>/home/user/myxml/xmlinst/lib, + /home/user/myxml/xmlinst/include </code> and <code> + /home/user/myxml/xmlinst/bin</code></p> + respectively.</li> + <li>In order to use this "private" library, you should first add it to + the beginning of your default PATH (so that your own private program + files such as xmllint will be used instead of the normal system + ones). To do this, the Bash command would be + <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p> + </li> <li>Now suppose you have a program <code>test1.c</code> that you would - like to compile with your "private" library. Simply compile it - using the command <p><code>gcc `xml2-config --cflags --libs` -o test - test.c</code></p> Note that, because your PATH has been set with <code> - /home/user/myxml/xmlinst/bin</code> at the beginning, the - xml2-config program which you just installed will be used instead of - the system default one, and this will <em>automatically</em> get the - correct libraries linked with your program.</li></ul></li><p></p> + like to compile with your "private" library. Simply compile it using + the command + <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p> + Note that, because your PATH has been set with <code> + /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config + program which you just installed will be used instead of the system + default one, and this will <em>automatically</em> get the correct + libraries linked with your program.</li> + </ul></li> + + <p></p> <li><em>xmlDocDump() generates output on one line.</em> <p>Libxml2 will not <strong>invent</strong> spaces in the content of a document since <strong>all spaces in the content of a document are diff --git a/doc/Makefile.am b/doc/Makefile.am index 7332659..55c5ef5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -110,7 +110,6 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial diff --git a/doc/Makefile.in b/doc/Makefile.in index e391881..cb91092 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -746,7 +746,6 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html - -@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \ $(DESTDIR)$(HTML_DIR)/tutorial diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index e89bdad..ad43eff 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for +</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for markup-based structured documents. Here is <a name="example" id="example">an example XML document</a>:</p><pre><?xml version="1.0"?> <EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> diff --git a/doc/XSLT.html b/doc/XSLT.html index 7212cb6..41adf2f 100644 --- a/doc/XSLT.html +++ b/doc/XSLT.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a +</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a language for transforming XML documents into other XML documents (or HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for libxml2. This module "libxslt" too can be found in the Gnome CVS base.</p><p>You can check the progresses on the libxslt <a href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> diff --git a/doc/bugs.html b/doc/bugs.html index cadebe8..f598051 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a +</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug tracking database</a> (make sure to use the "libxml2" module name). I diff --git a/doc/catalog.html b/doc/catalog.html index 9947f90..3750123 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li> +</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="General2">General overview</a></li> <li><a href="#definition">The definition</a></li> <li><a href="#Simple">Using catalogs</a></li> <li><a href="#Some">Some examples</a></li> diff --git a/doc/contribs.html b/doc/contribs.html index 8ea1843..a89c9ea 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of +</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul><li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of patches, Gary Pennington worked on the validation API, threading support and Solaris port.</li> <li>John Fleck helps maintaining the documentation and man pages.</li> @@ -32,9 +32,9 @@ A:link, A:visited, A:active { text-decoration: underline } <li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the <a href="http://www.w3.org/Signature/">XML Canonicalization and XML Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li> - <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> - and contributors maintain <a href="http://tclxml.sourceforge.net/">tcl bindings for libxml2 and - libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for + <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and + contributors maintain <a href="http://tclxml.sourceforge.net/">tcl + bindings for libxml2 and libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a> a GUI for xsltproc.</li> </ul><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> diff --git a/doc/devhelp/libxml2-HTMLtree.html b/doc/devhelp/libxml2-HTMLtree.html index b7c35b4..6430f8b 100644 --- a/doc/devhelp/libxml2-HTMLtree.html +++ b/doc/devhelp/libxml2-HTMLtree.html @@ -51,9 +51,10 @@ int <a href="#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format); void <a href="#htmlDocDumpMemory">htmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size); int <a href="#htmlSaveFile">htmlSaveFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur); -<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID); int <a href="#htmlDocDump">htmlDocDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur); +void <a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format); int <a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); +int <a href="#htmlSaveFileFormat">htmlSaveFileFormat</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format); void <a href="#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format); int <a href="#htmlSetMetaEncoding">htmlSetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding); int <a href="#htmlSaveFileEnc">htmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding); @@ -63,7 +64,7 @@ int <a href="#htmlNodeDump">htmlNodeDump</a> (<a href="libxml2-tree.html#xmlBu const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc); void <a href="#htmlNodeDumpFile">htmlNodeDumpFile</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); void <a href="#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format); -int <a href="#htmlSaveFileFormat">htmlSaveFileFormat</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format); +<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID); void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding); </pre> </div> @@ -109,6 +110,10 @@ void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href=" </pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div> <hr/> + <div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemoryFormat"/>htmlDocDumpMemoryFormat ()</h3><pre class="programlisting">void htmlDocDumpMemoryFormat (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format)<br/> +</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div> + <hr/> <div class="refsect2" lang="en"><h3><a name="htmlGetMetaEncoding"/>htmlGetMetaEncoding ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br/> </pre><p>Encoding definition lookup in the Meta tags</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div></div> diff --git a/doc/devhelp/libxml2-pattern.html b/doc/devhelp/libxml2-pattern.html index 621767e..321bd79 100644 --- a/doc/devhelp/libxml2-pattern.html +++ b/doc/devhelp/libxml2-pattern.html @@ -55,11 +55,13 @@ void <a href="#xmlFreePatternList">xmlFreePatternList</a> (<a href="libxml2-pat int <a href="#xmlPatternStreamable">xmlPatternStreamable</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp); int <a href="#xmlStreamPushAttr">xmlStreamPushAttr</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns); int <a href="#xmlPatternMatch">xmlPatternMatch</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); +int <a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt); int <a href="#xmlStreamPop">xmlStreamPop</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream); void <a href="#xmlFreePattern">xmlFreePattern</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp); int <a href="#xmlStreamPush">xmlStreamPush</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns); int <a href="#xmlPatternMaxDepth">xmlPatternMaxDepth</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp); <a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> <a href="#xmlPatterncompile">xmlPatterncompile</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/> <a href="libxml2-dict.html#xmlDict">xmlDict</a> * dict, <br/> int flags, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces); +int <a href="#xmlStreamPushNode">xmlStreamPushNode</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> int nodeType); void <a href="#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream); </pre> </div> @@ -143,13 +145,21 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStreamPush"/>xmlStreamPush ()</h3><pre class="programlisting">int xmlStreamPush (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/> -</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> +</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStreamPushAttr"/>xmlStreamPushAttr ()</h3><pre class="programlisting">int xmlStreamPushAttr (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/> -</pre><p>Push new <a href="libxml2-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> +</pre><p>Push new <a href="libxml2-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div> <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlStreamPushNode"/>xmlStreamPushNode ()</h3><pre class="programlisting">int xmlStreamPushNode (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> int nodeType)<br/> +</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div> + <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlStreamWantsAnyNode"/>xmlStreamWantsAnyNode ()</h3><pre class="programlisting">int xmlStreamWantsAnyNode (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br/> +</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div></div> + <hr/> </div> </div> </body> diff --git a/doc/devhelp/libxml2-relaxng.html b/doc/devhelp/libxml2-relaxng.html index a10bd11..9dd4bb1 100644 --- a/doc/devhelp/libxml2-relaxng.html +++ b/doc/devhelp/libxml2-relaxng.html @@ -228,7 +228,7 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParse"/>xmlRelaxNGParse ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/> -</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</p> +</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserErrors"/>xmlRelaxNGSetParserErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetParserErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx)<br/> diff --git a/doc/devhelp/libxml2-schemasInternals.html b/doc/devhelp/libxml2-schemasInternals.html index ba7d1c1..2f9cbc9 100644 --- a/doc/devhelp/libxml2-schemasInternals.html +++ b/doc/devhelp/libxml2-schemasInternals.html @@ -39,7 +39,7 @@ <span class="refentrytitle">schemasInternals</span> </h2> <p>schemasInternals - internal interfaces for XML Schemas</p> - <p>internal interfaces for the XML Schemas handling and schema validity checking </p> + <p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p> <p>Author(s): Daniel Veillard </p> <div class="refsynopsisdiv"> <h2>Synopsis</h2> @@ -66,11 +66,12 @@ #define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a>; #define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a>; #define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a>; -#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>; +#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>; #define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a>; #define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a>; #define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a>; #define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a>; +#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>; #define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a>; #define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a>; #define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>; @@ -90,7 +91,9 @@ #define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a>; #define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a>; #define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a>; +#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>; #define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a>; +#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>; #define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a>; #define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a>; #define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>; @@ -99,7 +102,7 @@ #define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>; #define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a>; #define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a>; -#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>; +#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>; #define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a>; #define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a>; #define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a>; @@ -108,7 +111,7 @@ #define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a>; #define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a>; #define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a>; -#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>; +#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>; #define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a>; #define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a>; #define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a>; @@ -189,10 +192,18 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm </pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p> </div> <hr/> + <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS">Macro </a>XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>; +</pre><p>Whether this attr. group contains attr. group references.</p> +</div> + <hr/> <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED">Macro </a>XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a>; </pre><p>Marks the attr group as marked; used for circular checks.</p> </div> <hr/> + <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED">Macro </a>XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>; +</pre><p>The attr group was redefined.</p> +</div> + <hr/> <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">Macro </a>XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>; </pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p> </div> @@ -445,8 +456,12 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm </pre><p>the complexType owns an <a href="libxml2-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p> </div> <hr/> + <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_REDEFINED">Macro </a>XML_SCHEMAS_TYPE_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>; +</pre><p>The type was redefined.</p> +</div> + <hr/> <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>; -</pre><p>the simpleType has a variety of "absent".</p> +</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p> </div> <hr/> <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>; @@ -489,25 +504,25 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm </div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttribute">Structure </a>xmlSchemaAttribute</h3><pre class="programlisting">struct _xmlSchemaAttribute { - <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - struct _xmlSchemaAttribute * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> if in a group ... - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : name of the declaration or empty if particle - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : the local name of the <a href="libxml2-SAX.html#attribute">attribute</a> decl. if a particle - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : the ns URI of the <a href="libxml2-SAX.html#attribute">attribute</a> decl. if a particle + <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type + struct _xmlSchemaAttribute * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> (not used?) + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the declaration + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * typeName : the local name of the type definition const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * typeNs : the ns URI of the type definition <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot - <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : obsolete, not used - int occurs - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defValue + <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : Deprecated; not used + int occurs : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defValue : The initial value of the value constraint <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace int flags - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal - <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value constraint + <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl : Deprecated; not used } xmlSchemaAttribute; </pre><p/> </div> @@ -517,16 +532,17 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm struct _xmlSchemaAttribute * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> if in a group ... const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot - <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes + <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node int flags <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : The referenced <a href="libxml2-SAX.html#attribute">attribute</a> group - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> redef Redefinitions + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace + void * attrUses } xmlSchemaAttributeGroup; </pre><p/> </div> @@ -556,7 +572,7 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <a name="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2 <a name="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3 <a name="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4 - <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 /* obsolete, not used */ + <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 /* Obsolete */ <a name="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6 <a name="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7 }; @@ -565,17 +581,17 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaElement">Structure </a>xmlSchemaElement</h3><pre class="programlisting">struct _xmlSchemaElement { <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - struct _xmlSchemaType * next : the next type if in a sequence ... + struct _xmlSchemaType * next : Not used? const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : the local name of the element declaration if a particle - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : the ns URI of the element declaration if a particle + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namedType @@ -583,13 +599,13 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * substGroup const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * substGroupNs const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * scope - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The original value of the value constraint. struct _xmlSchemaElement * refDecl : This will now be used for the substitution group affiliation - <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel + <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Obsolete for WXS, maybe used for RelaxNG <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal - void * idcs + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value contraint. + void * idcs : The identity-constraint defs } xmlSchemaElement; </pre><p/> </div> @@ -601,14 +617,14 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacet">Structure </a>xmlSchemaFacet</h3><pre class="programlisting">struct _xmlSchemaFacet { <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaFacet * next : the next type if in a sequence ... - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The original value + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node - int fixed + int fixed : XML_SCHEMAS_FACET_PRESERVE, etc. int whitespace - <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val - <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp + <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val : The compiled value + <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp : The regex for patterns } xmlSchemaFacet; </pre><p/> </div> @@ -646,39 +662,40 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaType * next : the next type if in a sequence ... const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes - <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes + <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * baseNs - <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType - <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets - struct _xmlSchemaType * redef : possible redefinitions for the type - int recurse - <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> attributeUses + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : Base type's local name + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * baseNs : Base type's target namespace + <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType : The base type component + <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets : Local facets + struct _xmlSchemaType * redef : Deprecated; not used + int recurse : Obsolete + <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> * attributeUses : Deprecated; not used <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard - int builtInType - <a href="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes - <a href="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef - <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel + int builtInType : Type of built-in types. + <a href="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes : member-types if a union type. + <a href="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet : All facets (incl. inherited) + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef : Used for the simple content of complex types. Could we use @subtypes + <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Holds the automaton of the content model const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace + void * attrUses } xmlSchemaType; </pre><p/> </div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypeLink">Structure </a>xmlSchemaTypeLink</h3><pre class="programlisting">struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink * next : the next type link ... - <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked typ + <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked type } xmlSchemaTypeLink; </pre><p/> </div> @@ -717,6 +734,7 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <a name="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23 <a name="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24 <a name="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25 + <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26 <a name="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000 <a name="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001 <a name="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002 @@ -730,6 +748,7 @@ void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxm <a name="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010 <a name="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011 <a name="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000 + <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001 }; </pre><p/> </div> @@ -798,11 +817,11 @@ The content of this structure is not made public by the API. <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcard">Structure </a>xmlSchemaWildcard</h3><pre class="programlisting">struct _xmlSchemaWildcard { <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int processContents int any : Indicates if the ns constraint is of ##any <a href="libxml2-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> nsSet : The list of allowed namespaces diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html index 9b77b9a..9395f76 100644 --- a/doc/devhelp/libxml2-tree.html +++ b/doc/devhelp/libxml2-tree.html @@ -1225,7 +1225,7 @@ void <a href="#xmlFreeNsList">xmlFreeNsList</a> (<a href="libxml2-tree.html#xm <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlNewGlobalNs"/>xmlNewGlobalNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/> -</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</p> +</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlNewNode"/>xmlNewNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/> diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html index 7832502..3b23e67 100644 --- a/doc/devhelp/libxml2-valid.html +++ b/doc/devhelp/libxml2-valid.html @@ -81,7 +81,7 @@ int <a href="#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a> (<a href="l <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix); <a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> <a href="#xmlCopyNotationTable">xmlCopyNotationTable</a> (<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table); int <a href="#xmlValidateDocument">xmlValidateDocument</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); -int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int * len, <br/> int max); +int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int * len, <br/> int max); <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlAddNotationDecl">xmlAddNotationDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID); int <a href="#xmlValidateElementDecl">xmlValidateElementDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem); <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlAddAttributeDecl">xmlAddAttributeDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/> <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree); @@ -426,9 +426,9 @@ The content of this structure is not made public by the API. </pre><p>Does the validation related extra step of the normalization of <a href="libxml2-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml2-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml2-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div></div> <hr/> - <div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"/>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int * len, <br/> int max)<br/> + <div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"/>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int * len, <br/> int max)<br/> </pre><p>Build/extend a list of potential children allowed by the content tree</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div></div> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlValidGetValidElements"/>xmlValidGetValidElements ()</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml2-tree.html#xmlNode">xmlNode</a> * prev, <br/> <a href="libxml2-tree.html#xmlNode">xmlNode</a> * next, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int max)<br/> </pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p> diff --git a/doc/devhelp/libxml2-xmlIO.html b/doc/devhelp/libxml2-xmlIO.html index 9e03d5f..8c41d1d 100644 --- a/doc/devhelp/libxml2-xmlIO.html +++ b/doc/devhelp/libxml2-xmlIO.html @@ -71,9 +71,10 @@ int <a href="#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> (<a href= void <a href="#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in); void <a href="#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a> (void); int <a href="#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len); +typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a> (void * context); <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt); -typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a> (void * context); +<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder); int <a href="#xmlIOHTTPMatch">xmlIOHTTPMatch</a> (const char * filename); void * <a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a> (const char * filename); <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc); @@ -230,6 +231,10 @@ void * <a href="#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a> (const char * post_uri, <b </pre><p>flushes and close the output I/O channel and free up all the associated resources</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div> <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateBuffer"/>xmlOutputBufferCreateBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateBuffer (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/> +</pre><p>Create a buffered output for the progressive saving to a <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a></p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div> + <hr/> <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFd"/>xmlOutputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/> </pre><p>Create a buffered output for the progressive saving to a file descriptor</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div> diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html index 44792da..d0eb477 100644 --- a/doc/devhelp/libxml2-xmlerror.html +++ b/doc/devhelp/libxml2-xmlerror.html @@ -811,6 +811,11 @@ void <a href="#xmlResetError">xmlResetError</a> (<a href="libxml2-xmlerror.htm <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 /* 3084 */ <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 /* 3085 */ <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 /* 3085 */ + <a name="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 /* 3086 */ + <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 /* 3087 */ + <a name="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 /* 3088 */ + <a name="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 /* 3089 */ + <a name="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 /* 3090 */ <a name="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 /* 4900 */ <a name="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 /* 4901 */ <a name="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000 diff --git a/doc/devhelp/libxml2-xmlreader.html b/doc/devhelp/libxml2-xmlreader.html index 585f47e..a3bbbb5 100644 --- a/doc/devhelp/libxml2-xmlreader.html +++ b/doc/devhelp/libxml2-xmlreader.html @@ -124,6 +124,7 @@ int <a href="#xmlReaderNewMemory">xmlReaderNewMemory</a> (<a href="libxml2-xmlr const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstValue">xmlTextReaderConstValue</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader); <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlNewTextReader">xmlNewTextReader</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> const char * URI); <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int no); +int <a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options); <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLocalName">xmlTextReaderLocalName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader); <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderExpand">xmlTextReaderExpand</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader); const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstName">xmlTextReaderConstName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader); @@ -513,8 +514,12 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>rng</tt></i>:</span></td><td>the path to a RelaxNG schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidate"/>xmlTextReaderSchemaValidate ()</h3><pre class="programlisting">int xmlTextReaderSchemaValidate (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * xsd)<br/> -</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div></div> +</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div> + <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidateCtxt"/>xmlTextReaderSchemaValidateCtxt ()</h3><pre class="programlisting">int xmlTextReaderSchemaValidateCtxt (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options)<br/> +</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetErrorHandler"/>xmlTextReaderSetErrorHandler ()</h3><pre class="programlisting">void xmlTextReaderSetErrorHandler (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br/> void * arg)<br/> </pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p> diff --git a/doc/devhelp/libxml2-xmlregexp.html b/doc/devhelp/libxml2-xmlregexp.html index 0de6668..e783648 100644 --- a/doc/devhelp/libxml2-xmlregexp.html +++ b/doc/devhelp/libxml2-xmlregexp.html @@ -75,10 +75,10 @@ void <a href="#xmlExpFree">xmlExpFree</a> (<a href="libxml2-xmlregexp.html#xml <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewAtom">xmlExpNewAtom</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len); int <a href="#xmlRegexpExec">xmlRegexpExec</a> (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); int <a href="#xmlRegExecPushString">xmlRegExecPushString</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> void * data); -int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int len); +int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/> int len); <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpParse">xmlExpParse</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const char * expr); <a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> <a href="#xmlExpNewCtxt">xmlExpNewCtxt</a> (int maxNodes, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict); -int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int len); +int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/> int len); <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpStringDerive">xmlExpStringDerive</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len); int <a href="#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt); int <a href="#xmlExpMaxToken">xmlExpMaxToken</a> (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr); @@ -178,13 +178,13 @@ The content of this structure is not made public by the API. </pre><p>Free an expression context</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div></div> <hr/> - <div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int len)<br/> + <div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/> int len)<br/> </pre><p>Find all the strings used in @exp and store them in @list</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div> <hr/> - <div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** list, <br/> int len)<br/> + <div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/> int len)<br/> </pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlExpIsNillable"/>xmlExpIsNillable ()</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/> </pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p> diff --git a/doc/devhelp/libxml2-xmlsave.html b/doc/devhelp/libxml2-xmlsave.html index 0c416f4..910a1df 100644 --- a/doc/devhelp/libxml2-xmlsave.html +++ b/doc/devhelp/libxml2-xmlsave.html @@ -50,6 +50,7 @@ typedef <a href="libxml2-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a> * <a href="#x <a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFd">xmlSaveToFd</a> (int fd, <br/> const char * encoding, <br/> int options); int <a href="#xmlSaveClose">xmlSaveClose</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt); int <a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape); +<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToBuffer">xmlSaveToBuffer</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const char * encoding, <br/> int options); <a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFilename">xmlSaveToFilename</a> (const char * filename, <br/> const char * encoding, <br/> int options); int <a href="#xmlSaveFlush">xmlSaveFlush</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt); long <a href="#xmlSaveDoc">xmlSaveDoc</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); @@ -102,6 +103,10 @@ The content of this structure is not made public by the API. </pre><p>Set a custom escaping function to be used for text in element content</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div></div> <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlSaveToBuffer"/>xmlSaveToBuffer ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToBuffer (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const char * encoding, <br/> int options)<br/> +</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div> + <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSaveToFd"/>xmlSaveToFd ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFd (int fd, <br/> const char * encoding, <br/> int options)<br/> </pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div> diff --git a/doc/devhelp/libxml2-xmlschemas.html b/doc/devhelp/libxml2-xmlschemas.html index bf5120e..4801ea5 100644 --- a/doc/devhelp/libxml2-xmlschemas.html +++ b/doc/devhelp/libxml2-xmlschemas.html @@ -68,7 +68,7 @@ void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErr void <a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx); int <a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt); int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> const char * filename, <br/> int options); -int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); +int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance); void <a href="#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> (const char * buffer, <br/> int size); int <a href="#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx); @@ -77,6 +77,7 @@ void <a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href=" typedef void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...); void <a href="#xmlSchemaDump">xmlSchemaDump</a> (FILE * output, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); void <a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt); +void <a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx); <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> <a href="#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); </pre> </div> @@ -90,7 +91,7 @@ void <a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="lib const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : schema name const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : the target namespace const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version - const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot int flags @@ -106,8 +107,8 @@ void <a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="lib void * includes : the includes, this is opaque for now int preserve : whether to free the document int counter : used to give ononymous components unique names - <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef - void * volatiles : Deprecated; not used anymore. + <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef : All identity-constraint defs. + void * volatiles : Obsolete } xmlSchema; </pre><p/> </div> @@ -204,20 +205,20 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValidCtxt"/>xmlSchemaFreeValidCtxt ()</h3><pre class="programlisting">void xmlSchemaFreeValidCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/> -</pre><p>Free the resources associated to the schema validation context</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetParserErrors"/>xmlSchemaGetParserErrors ()</h3><pre class="programlisting">int xmlSchemaGetParserErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/> </pre><p>Get the callback information used to handle errors for a parser context</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetValidErrors"/>xmlSchemaGetValidErrors ()</h3><pre class="programlisting">int xmlSchemaGetValidErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/> -</pre><p>Get the error and warning callback informations</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaIsValid"/>xmlSchemaIsValid ()</h3><pre class="programlisting">int xmlSchemaIsValid (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/> -</pre><p>Check if any error was detected during validation.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewDocParserCtxt"/>xmlSchemaNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewDocParserCtxt (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/> </pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p> @@ -232,56 +233,60 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewValidCtxt"/>xmlSchemaNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/> -</pre><p>Create an XML Schemas validation context based on the given schema.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaParse"/>xmlSchemaParse ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br/> -</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</p> +</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXPlug"/>xmlSchemaSAXPlug ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> xmlSchemaSAXPlug (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br/> void ** user_data)<br/> -</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXUnplug"/>xmlSchemaSAXUnplug ()</h3><pre class="programlisting">int xmlSchemaSAXUnplug (<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br/> -</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml2-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserErrors"/>xmlSchemaSetParserErrors ()</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx)<br/> </pre><p>Set the callback functions used to handle errors for a validation context</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div> <hr/> + <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserStructuredErrors"/>xmlSchemaSetParserStructuredErrors ()</h3><pre class="programlisting">void xmlSchemaSetParserStructuredErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/> +</pre><p>Set the structured error callback</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div> + <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidErrors"/>xmlSchemaSetValidErrors ()</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx)<br/> -</pre><p>Set the error and warning callback informations</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidOptions"/>xmlSchemaSetValidOptions ()</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options)<br/> -</pre><p>Sets the options to be used during the validation.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidStructuredErrors"/>xmlSchemaSetValidStructuredErrors ()</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/> -</pre><p>Set the structured error callback</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtGetOptions"/>xmlSchemaValidCtxtGetOptions ()</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/> -</pre><p>Get the validation context options.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> - <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"/>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/> -</pre><p>Validate a document tree in memory.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div> + <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"/>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br/> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateFile"/>xmlSchemaValidateFile ()</h3><pre class="programlisting">int xmlSchemaValidateFile (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> const char * filename, <br/> int options)<br/> -</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateOneElement"/>xmlSchemaValidateOneElement ()</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/> -</pre><p>Validate a branch of a tree, starting with the given @elem.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateStream"/>xmlSchemaValidateStream ()</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data)<br/> -</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div> +</pre><p/> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div> <hr/> </div> </div> diff --git a/doc/devhelp/libxml2-xmlstring.html b/doc/devhelp/libxml2-xmlstring.html index f7abfa3..43da9a4 100644 --- a/doc/devhelp/libxml2-xmlstring.html +++ b/doc/devhelp/libxml2-xmlstring.html @@ -108,7 +108,7 @@ int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a> (const <a href="libxml2-xmlstri <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStrEqual"/>xmlStrEqual ()</h3><pre class="programlisting">int xmlStrEqual (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br/> -</pre><p>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</p> +</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStrPrintf"/>xmlStrPrintf ()</h3><pre class="programlisting">int xmlStrPrintf (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/> int len, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/> ... ...)<br/> @@ -156,12 +156,12 @@ int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a> (const <a href="libxml2-xmlstri <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStrncat"/>xmlStrncat ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncat (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br/> int len)<br/> -</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.</p> +</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.</p> <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStrncatNew"/>xmlStrncatNew ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncatNew (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len)<br/> -</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed.</p> -<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div> +</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.</p> +<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or < 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div> <hr/> <div class="refsect2" lang="en"><h3><a name="xmlStrncmp"/>xmlStrncmp ()</h3><pre class="programlisting">int xmlStrncmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len)<br/> </pre><p>a strncmp for xmlChar's</p> diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index edc74cd..c8d5572 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -166,7 +166,9 @@ <function name="XML_SCHEMAS_ANY_SKIP" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_SKIP"/> <function name="XML_SCHEMAS_ANY_STRICT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_STRICT"/> <function name="XML_SCHEMAS_ATTRGROUP_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL"/> + <function name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS"/> <function name="XML_SCHEMAS_ATTRGROUP_MARKED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED"/> + <function name="XML_SCHEMAS_ATTRGROUP_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED"/> <function name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"/> <function name="XML_SCHEMAS_ATTR_FIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED"/> <function name="XML_SCHEMAS_ATTR_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL"/> @@ -230,6 +232,7 @@ <function name="XML_SCHEMAS_TYPE_MIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED"/> <function name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED"/> <function name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"/> + <function name="XML_SCHEMAS_TYPE_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED"/> <function name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT"/> <function name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC"/> <function name="XML_SCHEMAS_TYPE_VARIETY_LIST" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST"/> @@ -956,13 +959,18 @@ <function name="XML_SAVE_NO_EMPTY" link="libxml2-xmlsave.html#XML_SAVE_NO_EMPTY"/> <function name="XML_SAVE_NO_XHTML" link="libxml2-xmlsave.html#XML_SAVE_NO_XHTML"/> <function name="XML_SAVE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING"/> + <function name="XML_SCHEMAP_AG_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT"/> <function name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE"/> <function name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF"/> <function name="XML_SCHEMAP_ATTR_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF"/> + <function name="XML_SCHEMAP_AU_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT"/> <function name="XML_SCHEMAP_AU_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2"/> <function name="XML_SCHEMAP_A_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2"/> + <function name="XML_SCHEMAP_A_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3"/> <function name="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF"/> + <function name="XML_SCHEMAP_COS_ALL_LIMITED" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED"/> <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1"/> + <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2"/> <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_3" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3"/> <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1"/> <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2"/> @@ -1309,6 +1317,7 @@ <function name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS"/> <function name="XML_SCHEMA_CONTENT_SIMPLE" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE"/> <function name="XML_SCHEMA_CONTENT_UNKNOWN" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN"/> + <function name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB"/> <function name="XML_SCHEMA_EXTRA_QNAMEREF" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF"/> <function name="XML_SCHEMA_FACET_ENUMERATION" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION"/> <function name="XML_SCHEMA_FACET_FRACTIONDIGITS" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS"/> @@ -1327,6 +1336,7 @@ <function name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE"/> <function name="XML_SCHEMA_TYPE_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE"/> <function name="XML_SCHEMA_TYPE_ATTRIBUTEGROUP" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP"/> + <function name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE"/> <function name="XML_SCHEMA_TYPE_BASIC" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_BASIC"/> <function name="XML_SCHEMA_TYPE_CHOICE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE"/> <function name="XML_SCHEMA_TYPE_COMPLEX" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX"/> @@ -1922,6 +1932,7 @@ <function name="htmlDocContentDumpOutput ()" link="libxml2-HTMLtree.html#htmlDocContentDumpOutput"/> <function name="htmlDocDump ()" link="libxml2-HTMLtree.html#htmlDocDump"/> <function name="htmlDocDumpMemory ()" link="libxml2-HTMLtree.html#htmlDocDumpMemory"/> + <function name="htmlDocDumpMemoryFormat ()" link="libxml2-HTMLtree.html#htmlDocDumpMemoryFormat"/> <function name="htmlElementAllowedHere ()" link="libxml2-HTMLparser.html#htmlElementAllowedHere"/> <function name="htmlElementStatusHere ()" link="libxml2-HTMLparser.html#htmlElementStatusHere"/> <function name="htmlEncodeEntities ()" link="libxml2-HTMLparser.html#htmlEncodeEntities"/> @@ -2521,6 +2532,7 @@ <function name="xmlNormalizeURIPath ()" link="libxml2-uri.html#xmlNormalizeURIPath"/> <function name="xmlNormalizeWindowsPath ()" link="libxml2-xmlIO.html#xmlNormalizeWindowsPath"/> <function name="xmlOutputBufferClose ()" link="libxml2-xmlIO.html#xmlOutputBufferClose"/> + <function name="xmlOutputBufferCreateBuffer ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateBuffer"/> <function name="xmlOutputBufferCreateFd ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFd"/> <function name="xmlOutputBufferCreateFile ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFile"/> <function name="xmlOutputBufferCreateFilename ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFilename"/> @@ -2757,6 +2769,7 @@ <function name="xmlSaveFormatFileTo ()" link="libxml2-tree.html#xmlSaveFormatFileTo"/> <function name="xmlSaveSetAttrEscape ()" link="libxml2-xmlsave.html#xmlSaveSetAttrEscape"/> <function name="xmlSaveSetEscape ()" link="libxml2-xmlsave.html#xmlSaveSetEscape"/> + <function name="xmlSaveToBuffer ()" link="libxml2-xmlsave.html#xmlSaveToBuffer"/> <function name="xmlSaveToFd ()" link="libxml2-xmlsave.html#xmlSaveToFd"/> <function name="xmlSaveToFilename ()" link="libxml2-xmlsave.html#xmlSaveToFilename"/> <function name="xmlSaveToIO ()" link="libxml2-xmlsave.html#xmlSaveToIO"/> @@ -2801,6 +2814,7 @@ <function name="xmlSchemaSAXPlug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXPlug"/> <function name="xmlSchemaSAXUnplug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXUnplug"/> <function name="xmlSchemaSetParserErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserErrors"/> + <function name="xmlSchemaSetParserStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserStructuredErrors"/> <function name="xmlSchemaSetValidErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidErrors"/> <function name="xmlSchemaSetValidOptions ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidOptions"/> <function name="xmlSchemaSetValidStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidStructuredErrors"/> @@ -2881,6 +2895,8 @@ <function name="xmlStreamPop ()" link="libxml2-pattern.html#xmlStreamPop"/> <function name="xmlStreamPush ()" link="libxml2-pattern.html#xmlStreamPush"/> <function name="xmlStreamPushAttr ()" link="libxml2-pattern.html#xmlStreamPushAttr"/> + <function name="xmlStreamPushNode ()" link="libxml2-pattern.html#xmlStreamPushNode"/> + <function name="xmlStreamWantsAnyNode ()" link="libxml2-pattern.html#xmlStreamWantsAnyNode"/> <function name="xmlStringCurrentChar ()" link="libxml2-parserInternals.html#xmlStringCurrentChar"/> <function name="xmlStringDecodeEntities ()" link="libxml2-parserInternals.html#xmlStringDecodeEntities"/> <function name="xmlStringGetNodeList ()" link="libxml2-tree.html#xmlStringGetNodeList"/> @@ -2961,6 +2977,7 @@ <function name="xmlTextReaderRelaxNGSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGSetSchema"/> <function name="xmlTextReaderRelaxNGValidate ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGValidate"/> <function name="xmlTextReaderSchemaValidate ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidate"/> + <function name="xmlTextReaderSchemaValidateCtxt ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidateCtxt"/> <function name="xmlTextReaderSetErrorHandler ()" link="libxml2-xmlreader.html#xmlTextReaderSetErrorHandler"/> <function name="xmlTextReaderSetParserProp ()" link="libxml2-xmlreader.html#xmlTextReaderSetParserProp"/> <function name="xmlTextReaderSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderSetSchema"/> diff --git a/doc/downloads.html b/doc/downloads.html index b0347d7..8dcfab9 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also +</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/">xmlsoft.org</a> server ( <a href="http://xmlsoft.org/sources/">HTTP</a>, <a href="ftp://xmlsoft.org/">FTP</a> and rsync are available), there is also mirrors (<a href="ftp://ftp.planetmirror.com/pub/xmlsoft/">Australia</a>( <a href="http://xmlsoft.planetmirror.com/">Web</a>), <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> as <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source archive</a> , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a mirror in Austria</a>. (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> @@ -17,12 +17,13 @@ Windows binaries made by Igor Zlatovic are available in the <a href="http://xmls <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides binaries</a>.</li> - <li>Blastwave provides - <a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a>.</li> + <li>Blastwave provides <a href="http://www.blastwave.org/packages.php/libxml2">Solaris + binaries</a>.</li> <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> provides <a href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X binaries</a>.</li> <li>The HP-UX porting center provides <a href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li> - <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as patr of their GNOME packages</li> + <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as + patr of their GNOME packages</li> </ul><p>If you know other supported binary ports, please <a href="http://veillard.com/">contact me</a>.</p><p><a name="Snapshot" id="Snapshot">Snapshot:</a></p><ul><li>Code from the W3C cvs base libxml2 module, updated hourly <a href="ftp://xmlsoft.org/libxml2-cvs-snapshot.tar.gz">libxml2-cvs-snapshot.tar.gz</a>.</li> <li>Docs, content of the web site, the list archive included <a href="ftp://xmlsoft.org/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li> </ul><p><a name="Contribs" id="Contribs">Contributions:</a></p><p>I do accept external contributions, especially if compiling on another diff --git a/doc/encoding.html b/doc/encoding.html index 04d54e7..47171f7 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -7,14 +7,13 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut +</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> by Tim Bray on Unicode and why you should care about it.</p><p>If you don't understand why <b>it does not make sense to have a string -without knowing what encoding it uses</b>, then as Joel Spolsky said -<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do -not write another line of code until you finish reading that article.</a>. -It is a prerequisite to understand this page, and avoid a lot of problems -with libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support +without knowing what encoding it uses</b>, then as Joel Spolsky said <a href="http://www.joelonsoftware.com/articles/Unicode.html">please do not +write another line of code until you finish reading that article.</a>. It is +a prerequisite to understand this page, and avoid a lot of problems with +libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol><li><a href="encoding.html#What">What does internationalization support mean ?</a></li> <li><a href="encoding.html#internal">The internal encoding, how and why</a></li> @@ -185,7 +184,10 @@ detecting such a tag on input. Except for that the processing is the same set of encodings supported by iconv can be instantly be used by libxml. On a linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the -various Japanese ones.</p><h4>Encoding aliases</h4><p>From 2.2.3, libxml2 has support to register encoding names aliases. The +various Japanese ones.</p><p>To convert from the UTF-8 values returned from the API to another encoding +then it is possible to use the function provided from <a href="html/libxml-encoding.html">the encoding module</a> like <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the +POSIX <a href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a> +API directly.</p><h4>Encoding aliases</h4><p>From 2.2.3, libxml2 has support to register encoding names aliases. The goal is to be able to parse document whose encoding is supported but where the name differs (for example from the default set of names accepted by iconv). The following functions allow to register and handle new aliases for diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 0bc8934..55a674d 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -15,20 +15,40 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(HTML_DIR) -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR) -EXTRA_DIST=examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res +EXTRA_DIST=examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res -noinst_PROGRAMS=reader3 io2 reader1 reader2 reader4 testWriter parse3 tree2 tree1 xpath2 parse1 xpath1 io1 parse4 parse2 +noinst_PROGRAMS=io1 io2 parse1 parse2 parse3 parse4 reader1 reader2 reader3 reader4 testWriter tree1 tree2 xpath1 xpath2 -reader3_SOURCES=reader3.c -reader3_LDFLAGS= -reader3_DEPENDENCIES= $(DEPS) -reader3_LDADD= @RDL_LIBS@ $(LDADDS) +io1_SOURCES=io1.c +io1_LDFLAGS= +io1_DEPENDENCIES= $(DEPS) +io1_LDADD= @RDL_LIBS@ $(LDADDS) io2_SOURCES=io2.c io2_LDFLAGS= io2_DEPENDENCIES= $(DEPS) io2_LDADD= @RDL_LIBS@ $(LDADDS) +parse1_SOURCES=parse1.c +parse1_LDFLAGS= +parse1_DEPENDENCIES= $(DEPS) +parse1_LDADD= @RDL_LIBS@ $(LDADDS) + +parse2_SOURCES=parse2.c +parse2_LDFLAGS= +parse2_DEPENDENCIES= $(DEPS) +parse2_LDADD= @RDL_LIBS@ $(LDADDS) + +parse3_SOURCES=parse3.c +parse3_LDFLAGS= +parse3_DEPENDENCIES= $(DEPS) +parse3_LDADD= @RDL_LIBS@ $(LDADDS) + +parse4_SOURCES=parse4.c +parse4_LDFLAGS= +parse4_DEPENDENCIES= $(DEPS) +parse4_LDADD= @RDL_LIBS@ $(LDADDS) + reader1_SOURCES=reader1.c reader1_LDFLAGS= reader1_DEPENDENCIES= $(DEPS) @@ -39,6 +59,11 @@ reader2_LDFLAGS= reader2_DEPENDENCIES= $(DEPS) reader2_LDADD= @RDL_LIBS@ $(LDADDS) +reader3_SOURCES=reader3.c +reader3_LDFLAGS= +reader3_DEPENDENCIES= $(DEPS) +reader3_LDADD= @RDL_LIBS@ $(LDADDS) + reader4_SOURCES=reader4.c reader4_LDFLAGS= reader4_DEPENDENCIES= $(DEPS) @@ -49,50 +74,25 @@ testWriter_LDFLAGS= testWriter_DEPENDENCIES= $(DEPS) testWriter_LDADD= @RDL_LIBS@ $(LDADDS) -parse3_SOURCES=parse3.c -parse3_LDFLAGS= -parse3_DEPENDENCIES= $(DEPS) -parse3_LDADD= @RDL_LIBS@ $(LDADDS) - -tree2_SOURCES=tree2.c -tree2_LDFLAGS= -tree2_DEPENDENCIES= $(DEPS) -tree2_LDADD= @RDL_LIBS@ $(LDADDS) - tree1_SOURCES=tree1.c tree1_LDFLAGS= tree1_DEPENDENCIES= $(DEPS) tree1_LDADD= @RDL_LIBS@ $(LDADDS) -xpath2_SOURCES=xpath2.c -xpath2_LDFLAGS= -xpath2_DEPENDENCIES= $(DEPS) -xpath2_LDADD= @RDL_LIBS@ $(LDADDS) - -parse1_SOURCES=parse1.c -parse1_LDFLAGS= -parse1_DEPENDENCIES= $(DEPS) -parse1_LDADD= @RDL_LIBS@ $(LDADDS) +tree2_SOURCES=tree2.c +tree2_LDFLAGS= +tree2_DEPENDENCIES= $(DEPS) +tree2_LDADD= @RDL_LIBS@ $(LDADDS) xpath1_SOURCES=xpath1.c xpath1_LDFLAGS= xpath1_DEPENDENCIES= $(DEPS) xpath1_LDADD= @RDL_LIBS@ $(LDADDS) -io1_SOURCES=io1.c -io1_LDFLAGS= -io1_DEPENDENCIES= $(DEPS) -io1_LDADD= @RDL_LIBS@ $(LDADDS) - -parse4_SOURCES=parse4.c -parse4_LDFLAGS= -parse4_DEPENDENCIES= $(DEPS) -parse4_LDADD= @RDL_LIBS@ $(LDADDS) - -parse2_SOURCES=parse2.c -parse2_LDFLAGS= -parse2_DEPENDENCIES= $(DEPS) -parse2_LDADD= @RDL_LIBS@ $(LDADDS) +xpath2_SOURCES=xpath2.c +xpath2_LDFLAGS= +xpath2_DEPENDENCIES= $(DEPS) +xpath2_LDADD= @RDL_LIBS@ $(LDADDS) valgrind: $(MAKE) CHECKER='valgrind' tests @@ -100,35 +100,35 @@ valgrind: tests: $(noinst_PROGRAMS) @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse3) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse1 test1.xml) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse4 test3.xml) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse2 test2.xml) + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in index a2ae5c1..83de8f9 100644 --- a/doc/examples/Makefile.in +++ b/doc/examples/Makefile.in @@ -36,11 +36,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -noinst_PROGRAMS = reader3$(EXEEXT) io2$(EXEEXT) reader1$(EXEEXT) \ - reader2$(EXEEXT) reader4$(EXEEXT) testWriter$(EXEEXT) \ - parse3$(EXEEXT) tree2$(EXEEXT) tree1$(EXEEXT) xpath2$(EXEEXT) \ - parse1$(EXEEXT) xpath1$(EXEEXT) io1$(EXEEXT) parse4$(EXEEXT) \ - parse2$(EXEEXT) +noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \ + parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \ + reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \ + reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \ + tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT) subdir = doc/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -326,15 +326,31 @@ target_alias = @target_alias@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ DEPS = $(top_builddir)/libxml2.la LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@ -EXTRA_DIST = examples.xsl index.py test3.xml tst.xml test2.xml writer.xml test1.xml examples.xml xpath1.res tree2.res reader3.res tree1.res reader1.res xpath2.res reader4.res io2.res io1.res -reader3_SOURCES = reader3.c -reader3_LDFLAGS = -reader3_DEPENDENCIES = $(DEPS) -reader3_LDADD = @RDL_LIBS@ $(LDADDS) +EXTRA_DIST = examples.xsl index.py examples.xml test1.xml test2.xml test3.xml tst.xml writer.xml io1.res io2.res reader1.res reader3.res reader4.res tree1.res tree2.res xpath1.res xpath2.res +io1_SOURCES = io1.c +io1_LDFLAGS = +io1_DEPENDENCIES = $(DEPS) +io1_LDADD = @RDL_LIBS@ $(LDADDS) io2_SOURCES = io2.c io2_LDFLAGS = io2_DEPENDENCIES = $(DEPS) io2_LDADD = @RDL_LIBS@ $(LDADDS) +parse1_SOURCES = parse1.c +parse1_LDFLAGS = +parse1_DEPENDENCIES = $(DEPS) +parse1_LDADD = @RDL_LIBS@ $(LDADDS) +parse2_SOURCES = parse2.c +parse2_LDFLAGS = +parse2_DEPENDENCIES = $(DEPS) +parse2_LDADD = @RDL_LIBS@ $(LDADDS) +parse3_SOURCES = parse3.c +parse3_LDFLAGS = +parse3_DEPENDENCIES = $(DEPS) +parse3_LDADD = @RDL_LIBS@ $(LDADDS) +parse4_SOURCES = parse4.c +parse4_LDFLAGS = +parse4_DEPENDENCIES = $(DEPS) +parse4_LDADD = @RDL_LIBS@ $(LDADDS) reader1_SOURCES = reader1.c reader1_LDFLAGS = reader1_DEPENDENCIES = $(DEPS) @@ -343,6 +359,10 @@ reader2_SOURCES = reader2.c reader2_LDFLAGS = reader2_DEPENDENCIES = $(DEPS) reader2_LDADD = @RDL_LIBS@ $(LDADDS) +reader3_SOURCES = reader3.c +reader3_LDFLAGS = +reader3_DEPENDENCIES = $(DEPS) +reader3_LDADD = @RDL_LIBS@ $(LDADDS) reader4_SOURCES = reader4.c reader4_LDFLAGS = reader4_DEPENDENCIES = $(DEPS) @@ -351,42 +371,22 @@ testWriter_SOURCES = testWriter.c testWriter_LDFLAGS = testWriter_DEPENDENCIES = $(DEPS) testWriter_LDADD = @RDL_LIBS@ $(LDADDS) -parse3_SOURCES = parse3.c -parse3_LDFLAGS = -parse3_DEPENDENCIES = $(DEPS) -parse3_LDADD = @RDL_LIBS@ $(LDADDS) -tree2_SOURCES = tree2.c -tree2_LDFLAGS = -tree2_DEPENDENCIES = $(DEPS) -tree2_LDADD = @RDL_LIBS@ $(LDADDS) tree1_SOURCES = tree1.c tree1_LDFLAGS = tree1_DEPENDENCIES = $(DEPS) tree1_LDADD = @RDL_LIBS@ $(LDADDS) -xpath2_SOURCES = xpath2.c -xpath2_LDFLAGS = -xpath2_DEPENDENCIES = $(DEPS) -xpath2_LDADD = @RDL_LIBS@ $(LDADDS) -parse1_SOURCES = parse1.c -parse1_LDFLAGS = -parse1_DEPENDENCIES = $(DEPS) -parse1_LDADD = @RDL_LIBS@ $(LDADDS) +tree2_SOURCES = tree2.c +tree2_LDFLAGS = +tree2_DEPENDENCIES = $(DEPS) +tree2_LDADD = @RDL_LIBS@ $(LDADDS) xpath1_SOURCES = xpath1.c xpath1_LDFLAGS = xpath1_DEPENDENCIES = $(DEPS) xpath1_LDADD = @RDL_LIBS@ $(LDADDS) -io1_SOURCES = io1.c -io1_LDFLAGS = -io1_DEPENDENCIES = $(DEPS) -io1_LDADD = @RDL_LIBS@ $(LDADDS) -parse4_SOURCES = parse4.c -parse4_LDFLAGS = -parse4_DEPENDENCIES = $(DEPS) -parse4_LDADD = @RDL_LIBS@ $(LDADDS) -parse2_SOURCES = parse2.c -parse2_LDFLAGS = -parse2_DEPENDENCIES = $(DEPS) -parse2_LDADD = @RDL_LIBS@ $(LDADDS) +xpath2_SOURCES = xpath2.c +xpath2_LDFLAGS = +xpath2_DEPENDENCIES = $(DEPS) +xpath2_LDADD = @RDL_LIBS@ $(LDADDS) all: all-am .SUFFIXES: @@ -711,35 +711,35 @@ valgrind: tests: $(noinst_PROGRAMS) @(echo '## examples regression tests') @(echo > .memdump) - @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse1 test1.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse2 test2.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse3) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./parse4 test3.xml) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) + @($(CHECKER) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp) + @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse3) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse1 test1.xml) + @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse4 test3.xml) - @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) - @($(CHECKER) ./parse2 test2.xml) + @($(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp) @(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml index 91122ad..22f730c 100644 --- a/doc/examples/examples.xml +++ b/doc/examples/examples.xml @@ -1,28 +1,28 @@ <examples> - <example filename='reader3.c'> - <synopsis>Show how to extract subdocuments with xmlReader</synopsis> - <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose> - <usage>reader3</usage> - <test>reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test> + <example filename='io1.c'> + <synopsis>Example of custom Input/Output</synopsis> + <purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose> + <usage>io1</usage> + <test>io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test> <author>Daniel Veillard</author> <copy>see Copyright for the status of this software. </copy> - <section>xmlReader</section> + <section>InputOutput</section> <includes> - <include><libxml/xmlreader.h></include> + <include><libxml/parser.h></include> + <include><libxml/xmlIO.h></include> + <include><libxml/xinclude.h></include> + <include><libxml/tree.h></include> </includes> <uses> - <function line='106' file='parser' name='xmlCleanupParser'/> - <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/> - <function line='110' file='xmlmemory' name='xmlMemoryDump'/> - <function line='99' file='tree' name='xmlFreeDoc'/> - <function line='65' file='xmlreader' name='xmlFreeTextReader'/> - <macro line='90' file='xmlversion' name='LIBXML_TEST_VERSION'/> - <function line='95' file='tree' name='xmlDocDump'/> - <function line='51' file='xmlreader' name='xmlTextReaderRead'/> - <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/> - <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/> - <function line='37' file='xmlreader' name='xmlReaderForFile'/> - <typedef line='76' file='tree' name='xmlDocPtr'/> + <function line='143' file='tree' name='xmlDocDump'/> + <function line='158' file='xmlmemory' name='xmlMemoryDump'/> + <function line='149' file='tree' name='xmlFreeDoc'/> + <function line='154' file='parser' name='xmlCleanupParser'/> + <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/> + <function line='134' file='xinclude' name='xmlXIncludeProcess'/> + <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/> + <function line='124' file='parser' name='xmlReadMemory'/> + <typedef line='105' file='tree' name='xmlDocPtr'/> </uses> </example> <example filename='io2.c'> @@ -48,6 +48,97 @@ <function line='28' file='tree' name='xmlNewNode'/> </uses> </example> + <example filename='parse1.c'> + <synopsis>Parse an XML file to a tree and free it</synopsis> + <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose> + <usage>parse1 test1.xml</usage> + <test>parse1 test1.xml</test> + <author>Daniel Veillard</author> + <copy>see Copyright for the status of this software. </copy> + <section>Parsing</section> + <includes> + <include><libxml/tree.h></include> + <include><libxml/parser.h></include> + </includes> + <uses> + <function line='54' file='xmlmemory' name='xmlMemoryDump'/> + <function line='50' file='parser' name='xmlCleanupParser'/> + <macro line='45' file='xmlversion' name='LIBXML_TEST_VERSION'/> + <typedef line='24' file='tree' name='xmlDocPtr'/> + <function line='31' file='tree' name='xmlFreeDoc'/> + <function line='26' file='parser' name='xmlReadFile'/> + </uses> + </example> + <example filename='parse2.c'> + <synopsis>Parse and validate an XML file to a tree and free the result</synopsis> + <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose> + <usage>parse2 test2.xml</usage> + <test>parse2 test2.xml</test> + <author>Daniel Veillard</author> + <copy>see Copyright for the status of this software. </copy> + <section>Parsing</section> + <includes> + <include><libxml/tree.h></include> + <include><libxml/parser.h></include> + </includes> + <uses> + <function line='47' file='parser' name='xmlFreeParserCtxt'/> + <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/> + <function line='29' file='parser' name='xmlNewParserCtxt'/> + <typedef line='25' file='tree' name='xmlParserCtxtPtr'/> + <function line='35' file='parser' name='xmlCtxtReadFile'/> + <function line='66' file='parser' name='xmlCleanupParser'/> + <macro line='61' file='xmlversion' name='LIBXML_TEST_VERSION'/> + <function line='44' file='tree' name='xmlFreeDoc'/> + <typedef line='26' file='tree' name='xmlDocPtr'/> + <function line='70' file='xmlmemory' name='xmlMemoryDump'/> + </uses> + </example> + <example filename='parse3.c'> + <synopsis>Parse an XML document in memory to a tree and free it</synopsis> + <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose> + <usage>parse3</usage> + <test>parse3</test> + <author>Daniel Veillard</author> + <copy>see Copyright for the status of this software. </copy> + <section>Parsing</section> + <includes> + <include><libxml/tree.h></include> + <include><libxml/parser.h></include> + </includes> + <uses> + <function line='33' file='parser' name='xmlReadMemory'/> + <function line='58' file='xmlmemory' name='xmlMemoryDump'/> + <function line='54' file='parser' name='xmlCleanupParser'/> + <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/> + <function line='38' file='tree' name='xmlFreeDoc'/> + <typedef line='27' file='tree' name='xmlDocPtr'/> + </uses> + </example> + <example filename='parse4.c'> + <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis> + <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose> + <usage>parse4 test3.xml</usage> + <test>parse4 test3.xml</test> + <author>Daniel Veillard</author> + <copy>see Copyright for the status of this software. </copy> + <section>Parsing</section> + <includes> + <include><libxml/tree.h></include> + <include><libxml/parser.h></include> + </includes> + <uses> + <function line='94' file='parser' name='xmlFreeParserCtxt'/> + <function line='86' file='parser' name='xmlParseChunk'/> + <function line='103' file='tree' name='xmlFreeDoc'/> + <function line='135' file='xmlmemory' name='xmlMemoryDump'/> + <function line='67' file='parser' name='xmlCreatePushParserCtxt'/> + <function line='131' file='parser' name='xmlCleanupParser'/> + <macro line='120' file='xmlversion' name='LIBXML_TEST_VERSION'/> + <typedef line='45' file='tree' name='xmlParserCtxtPtr'/> + <typedef line='47' file='tree' name='xmlDocPtr'/> + </uses> + </example> <example filename='reader1.c'> <synopsis>Parse an XML file with an xmlReader</synopsis> <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose> @@ -89,17 +180,14 @@ </includes> <uses> <function line='45' file='xmlstring' name='xmlStrlen'/> - <function line='109' file='parser' name='xmlCleanupParser'/> <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/> <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/> - <function line='113' file='xmlmemory' name='xmlMemoryDump'/> <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/> <enum line='70' file='parser' name='XML_PARSE_NOENT'/> <function line='37' file='xmlreader' name='xmlTextReaderDepth'/> <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/> <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/> <function line='84' file='xmlreader' name='xmlFreeTextReader'/> - <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/> <function line='30' file='xmlreader' name='xmlTextReaderConstName'/> <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/> <function line='76' file='xmlreader' name='xmlTextReaderRead'/> @@ -108,6 +196,27 @@ <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/> </uses> </example> + <example filename='reader3.c'> + <synopsis>Show how to extract subdocuments with xmlReader</synopsis> + <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose> + <usage>reader3</usage> + <test>reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp</test> + <author>Daniel Veillard</author> + <copy>see Copyright for the status of this software. </copy> + <section>xmlReader</section> + <includes> + <include><libxml/xmlreader.h></include> + </includes> + <uses> + <typedef line='31' file='xmlreader' name='xmlTextReaderPtr'/> + <function line='65' file='xmlreader' name='xmlFreeTextReader'/> + <function line='95' file='tree' name='xmlDocDump'/> + <function line='51' file='xmlreader' name='xmlTextReaderRead'/> + <function line='61' file='xmlreader' name='xmlTextReaderCurrentDoc'/> + <function line='42' file='xmlreader' name='xmlTextReaderPreservePattern'/> + <function line='37' file='xmlreader' name='xmlReaderForFile'/> + </uses> + </example> <example filename='reader4.c'> <synopsis>Parse multiple XML files reusing an xmlReader</synopsis> <purpose>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose> @@ -120,17 +229,12 @@ <include><libxml/xmlreader.h></include> </includes> <uses> - <function line='99' file='tree' name='xmlFreeDoc'/> <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/> - <function line='109' file='parser' name='xmlCleanupParser'/> - <function line='113' file='xmlmemory' name='xmlMemoryDump'/> <function line='83' file='xmlreader' name='xmlReaderNewFile'/> <function line='104' file='xmlreader' name='xmlFreeTextReader'/> - <macro line='72' file='xmlversion' name='LIBXML_TEST_VERSION'/> <function line='26' file='xmlreader' name='xmlTextReaderRead'/> <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/> <function line='72' file='xmlreader' name='xmlReaderForFile'/> - <typedef line='56' file='tree' name='xmlDocPtr'/> </uses> </example> <example filename='testWriter.c'> @@ -152,9 +256,7 @@ <function line='925' file='xmlwriter' name='xmlTextWriterWriteComment'/> <function line='1156' file='encoding' name='xmlFindCharEncodingHandler'/> <variable line='1166' file='globals' name='xmlMalloc'/> - <typedef line='879' file='tree' name='xmlDocPtr'/> <typedef line='341' file='tree' name='xmlBufferPtr'/> - <function line='58' file='xmlmemory' name='xmlMemoryDump'/> <macro line='885' file='parser' name='XML_DEFAULT_VERSION'/> <function line='901' file='tree' name='xmlDocSetRootElement'/> <function line='1127' file='xmlwriter' name='xmlFreeTextWriter'/> @@ -163,10 +265,8 @@ <function line='1111' file='xmlwriter' name='xmlTextWriterEndElement'/> <function line='76' file='xmlwriter' name='xmlNewTextWriterFilename'/> <function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/> - <function line='54' file='parser' name='xmlCleanupParser'/> <function line='1073' file='xmlwriter' name='xmlTextWriterWriteFormatElement'/> <typedef line='1151' file='encoding' name='xmlCharEncodingHandlerPtr'/> - <function line='1131' file='tree' name='xmlFreeDoc'/> <typedef line='880' file='tree' name='xmlNodePtr'/> <function line='949' file='xmlwriter' name='xmlTextWriterWriteAttribute'/> <function line='632' file='xmlwriter' name='xmlNewTextWriterDoc'/> @@ -175,32 +275,28 @@ <function line='904' file='xmlwriter' name='xmlNewTextWriterTree'/> <function line='355' file='xmlwriter' name='xmlNewTextWriterMemory'/> <variable line='1180' file='globals' name='xmlFree'/> - <macro line='40' file='xmlversion' name='LIBXML_TEST_VERSION'/> <function line='613' file='tree' name='xmlBufferFree'/> <typedef line='878' file='xmlwriter' name='xmlTextWriterPtr'/> <function line='1103' file='xmlwriter' name='xmlTextWriterWriteElement'/> <function line='885' file='tree' name='xmlNewDoc'/> </uses> </example> - <example filename='parse3.c'> - <synopsis>Parse an XML document in memory to a tree and free it</synopsis> - <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose> - <usage>parse3</usage> - <test>parse3</test> - <author>Daniel Veillard</author> + <example filename='tree1.c'> + <synopsis>Navigates a tree to print element names</synopsis> + <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose> + <usage>tree1 filename_or_URL</usage> + <test>tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp</test> + <author>Dodji Seketeli</author> <copy>see Copyright for the status of this software. </copy> - <section>Parsing</section> + <section>Tree</section> <includes> <include><libxml/tree.h></include> <include><libxml/parser.h></include> </includes> <uses> - <function line='33' file='parser' name='xmlReadMemory'/> - <function line='58' file='xmlmemory' name='xmlMemoryDump'/> - <function line='54' file='parser' name='xmlCleanupParser'/> - <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/> - <function line='38' file='tree' name='xmlFreeDoc'/> - <typedef line='27' file='tree' name='xmlDocPtr'/> + <enum line='36' file='tree' name='XML_ELEMENT_NODE'/> + <function line='74' file='tree' name='xmlDocGetRootElement'/> + <function line='67' file='parser' name='xmlReadFile'/> </uses> </example> <example filename='tree2.c'> @@ -224,73 +320,9 @@ <function line='88' file='tree' name='xmlNewChild'/> <function line='74' file='tree' name='xmlNewNode'/> <function line='46' file='tree' name='xmlCreateIntSubset'/> - <function line='99' file='tree' name='xmlFreeDoc'/> <function line='39' file='tree' name='xmlNewDoc'/> </uses> </example> - <example filename='tree1.c'> - <synopsis>Navigates a tree to print element names</synopsis> - <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose> - <usage>tree1 filename_or_URL</usage> - <test>tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp</test> - <author>Dodji Seketeli</author> - <copy>see Copyright for the status of this software. </copy> - <section>Tree</section> - <includes> - <include><libxml/tree.h></include> - <include><libxml/parser.h></include> - </includes> - <uses> - <enum line='36' file='tree' name='XML_ELEMENT_NODE'/> - <function line='74' file='tree' name='xmlDocGetRootElement'/> - <function line='67' file='parser' name='xmlReadFile'/> - </uses> - </example> - <example filename='xpath2.c'> - <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis> - <purpose>Shows how to make a full round-trip from a load/edit/save</purpose> - <usage>xpath2 <xml-file> <xpath-expr> <new-value></usage> - <test>xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test> - <author>Aleksey Sanin and Daniel Veillard</author> - <copy>see Copyright for the status of this software. </copy> - <section>XPath</section> - <includes> - <include><libxml/parser.h></include> - <include><libxml/xpath.h></include> - <include><libxml/xpathInternals.h></include> - <include><libxml/tree.h></include> - </includes> - <uses> - <function line='162' file='tree' name='xmlNodeSetContent'/> - <function line='127' file='tree' name='xmlDocDump'/> - <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/> - <function line='110' file='xpath' name='xmlXPathEvalExpression'/> - <function line='95' file='parser' name='xmlParseFile'/> - <function line='123' file='xpath' name='xmlXPathFreeObject'/> - <function line='102' file='xpath' name='xmlXPathNewContext'/> - <typedef line='87' file='xpath' name='xmlXPathContextPtr'/> - <function line='124' file='xpath' name='xmlXPathFreeContext'/> - <function line='41' file='parser' name='xmlInitParser'/> - <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/> - <typedef line='86' file='tree' name='xmlDocPtr'/> - </uses> - </example> - <example filename='parse1.c'> - <synopsis>Parse an XML file to a tree and free it</synopsis> - <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose> - <usage>parse1 test1.xml</usage> - <test>parse1 test1.xml</test> - <author>Daniel Veillard</author> - <copy>see Copyright for the status of this software. </copy> - <section>Parsing</section> - <includes> - <include><libxml/tree.h></include> - <include><libxml/parser.h></include> - </includes> - <uses> - <function line='26' file='parser' name='xmlReadFile'/> - </uses> - </example> <example filename='xpath1.c'> <synopsis>Evaluate XPath expression and prints result node set.</synopsis> <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose> @@ -324,74 +356,42 @@ <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/> </uses> </example> - <example filename='io1.c'> - <synopsis>Example of custom Input/Output</synopsis> - <purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose> - <usage>io1</usage> - <test>io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp</test> - <author>Daniel Veillard</author> - <copy>see Copyright for the status of this software. </copy> - <section>InputOutput</section> - <includes> - <include><libxml/parser.h></include> - <include><libxml/xmlIO.h></include> - <include><libxml/xinclude.h></include> - <include><libxml/tree.h></include> - </includes> - <uses> - <function line='143' file='tree' name='xmlDocDump'/> - <function line='134' file='xinclude' name='xmlXIncludeProcess'/> - <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/> - <function line='124' file='parser' name='xmlReadMemory'/> - </uses> - </example> - <example filename='parse4.c'> - <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis> - <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose> - <usage>parse4 test3.xml</usage> - <test>parse4 test3.xml</test> - <author>Daniel Veillard</author> + <example filename='xpath2.c'> + <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis> + <purpose>Shows how to make a full round-trip from a load/edit/save</purpose> + <usage>xpath2 <xml-file> <xpath-expr> <new-value></usage> + <test>xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</test> + <author>Aleksey Sanin and Daniel Veillard</author> <copy>see Copyright for the status of this software. </copy> - <section>Parsing</section> + <section>XPath</section> <includes> - <include><libxml/tree.h></include> <include><libxml/parser.h></include> - </includes> - <uses> - <function line='94' file='parser' name='xmlFreeParserCtxt'/> - <function line='86' file='parser' name='xmlParseChunk'/> - <function line='67' file='parser' name='xmlCreatePushParserCtxt'/> - <typedef line='45' file='tree' name='xmlParserCtxtPtr'/> - </uses> - </example> - <example filename='parse2.c'> - <synopsis>Parse and validate an XML file to a tree and free the result</synopsis> - <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose> - <usage>parse2 test2.xml</usage> - <test>parse2 test2.xml</test> - <author>Daniel Veillard</author> - <copy>see Copyright for the status of this software. </copy> - <section>Parsing</section> - <includes> + <include><libxml/xpath.h></include> + <include><libxml/xpathInternals.h></include> <include><libxml/tree.h></include> - <include><libxml/parser.h></include> </includes> <uses> - <function line='47' file='parser' name='xmlFreeParserCtxt'/> - <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/> - <function line='29' file='parser' name='xmlNewParserCtxt'/> - <typedef line='25' file='tree' name='xmlParserCtxtPtr'/> - <function line='35' file='parser' name='xmlCtxtReadFile'/> + <function line='162' file='tree' name='xmlNodeSetContent'/> + <function line='127' file='tree' name='xmlDocDump'/> + <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/> + <function line='110' file='xpath' name='xmlXPathEvalExpression'/> + <function line='95' file='parser' name='xmlParseFile'/> + <function line='123' file='xpath' name='xmlXPathFreeObject'/> + <function line='102' file='xpath' name='xmlXPathNewContext'/> + <typedef line='87' file='xpath' name='xmlXPathContextPtr'/> + <function line='124' file='xpath' name='xmlXPathFreeContext'/> + <function line='41' file='parser' name='xmlInitParser'/> + <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/> </uses> </example> <symbols> <symbol name='LIBXML_TEST_VERSION'> - <ref filename='reader3.c'/> - <ref filename='reader1.c'/> - <ref filename='reader2.c'/> - <ref filename='reader4.c'/> - <ref filename='testWriter.c'/> + <ref filename='io1.c'/> + <ref filename='parse1.c'/> + <ref filename='parse2.c'/> <ref filename='parse3.c'/> + <ref filename='parse4.c'/> + <ref filename='reader1.c'/> </symbol> <symbol name='XML_DEFAULT_VERSION'> <ref filename='testWriter.c'/> @@ -401,15 +401,15 @@ <ref filename='xpath1.c'/> </symbol> <symbol name='XML_NAMESPACE_DECL'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='XML_PARSE_DTDATTR'> <ref filename='reader2.c'/> </symbol> <symbol name='XML_PARSE_DTDVALID'> - <ref filename='reader2.c'/> <ref filename='parse2.c'/> + <ref filename='reader2.c'/> </symbol> <symbol name='XML_PARSE_NOENT'> <ref filename='reader2.c'/> @@ -430,12 +430,12 @@ <ref filename='testWriter.c'/> </symbol> <symbol name='xmlCleanupParser'> - <ref filename='reader3.c'/> - <ref filename='reader1.c'/> - <ref filename='reader2.c'/> - <ref filename='reader4.c'/> - <ref filename='testWriter.c'/> + <ref filename='io1.c'/> + <ref filename='parse1.c'/> + <ref filename='parse2.c'/> <ref filename='parse3.c'/> + <ref filename='parse4.c'/> + <ref filename='reader1.c'/> </symbol> <symbol name='xmlCreateIntSubset'> <ref filename='tree2.c'/> @@ -447,9 +447,9 @@ <ref filename='parse2.c'/> </symbol> <symbol name='xmlDocDump'> + <ref filename='io1.c'/> <ref filename='reader3.c'/> <ref filename='xpath2.c'/> - <ref filename='io1.c'/> </symbol> <symbol name='xmlDocDumpFormatMemory'> <ref filename='io2.c'/> @@ -458,12 +458,12 @@ <ref filename='tree1.c'/> </symbol> <symbol name='xmlDocPtr'> - <ref filename='reader3.c'/> + <ref filename='io1.c'/> <ref filename='io2.c'/> - <ref filename='reader4.c'/> - <ref filename='testWriter.c'/> + <ref filename='parse1.c'/> + <ref filename='parse2.c'/> <ref filename='parse3.c'/> - <ref filename='xpath2.c'/> + <ref filename='parse4.c'/> </symbol> <symbol name='xmlDocSetRootElement'> <ref filename='io2.c'/> @@ -479,40 +479,40 @@ <ref filename='xpath1.c'/> </symbol> <symbol name='xmlFreeDoc'> - <ref filename='reader3.c'/> + <ref filename='io1.c'/> <ref filename='io2.c'/> - <ref filename='reader4.c'/> - <ref filename='testWriter.c'/> + <ref filename='parse1.c'/> + <ref filename='parse2.c'/> <ref filename='parse3.c'/> - <ref filename='tree2.c'/> + <ref filename='parse4.c'/> </symbol> <symbol name='xmlFreeParserCtxt'> - <ref filename='parse4.c'/> <ref filename='parse2.c'/> + <ref filename='parse4.c'/> </symbol> <symbol name='xmlFreeTextReader'> - <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> + <ref filename='reader3.c'/> <ref filename='reader4.c'/> </symbol> <symbol name='xmlFreeTextWriter'> <ref filename='testWriter.c'/> </symbol> <symbol name='xmlInitParser'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlMalloc'> <ref filename='testWriter.c'/> </symbol> <symbol name='xmlMemoryDump'> - <ref filename='reader3.c'/> - <ref filename='reader1.c'/> - <ref filename='reader2.c'/> - <ref filename='reader4.c'/> - <ref filename='testWriter.c'/> + <ref filename='io1.c'/> + <ref filename='parse1.c'/> + <ref filename='parse2.c'/> <ref filename='parse3.c'/> + <ref filename='parse4.c'/> + <ref filename='reader1.c'/> </symbol> <symbol name='xmlNewChild'> <ref filename='tree2.c'/> @@ -566,25 +566,25 @@ <ref filename='parse4.c'/> </symbol> <symbol name='xmlParseFile'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlParserCtxtPtr'> - <ref filename='parse4.c'/> <ref filename='parse2.c'/> + <ref filename='parse4.c'/> </symbol> <symbol name='xmlReadFile'> - <ref filename='tree1.c'/> <ref filename='parse1.c'/> + <ref filename='tree1.c'/> </symbol> <symbol name='xmlReadMemory'> - <ref filename='parse3.c'/> <ref filename='io1.c'/> + <ref filename='parse3.c'/> </symbol> <symbol name='xmlReaderForFile'> - <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> + <ref filename='reader3.c'/> <ref filename='reader4.c'/> </symbol> <symbol name='xmlReaderNewFile'> @@ -647,15 +647,15 @@ <ref filename='reader3.c'/> </symbol> <symbol name='xmlTextReaderPtr'> - <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> + <ref filename='reader3.c'/> <ref filename='reader4.c'/> </symbol> <symbol name='xmlTextReaderRead'> - <ref filename='reader3.c'/> <ref filename='reader1.c'/> <ref filename='reader2.c'/> + <ref filename='reader3.c'/> <ref filename='reader4.c'/> </symbol> <symbol name='xmlTextWriterEndDocument'> @@ -692,28 +692,28 @@ <ref filename='io1.c'/> </symbol> <symbol name='xmlXPathContextPtr'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathEvalExpression'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathFreeContext'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathFreeObject'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathNewContext'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathObjectPtr'> - <ref filename='xpath2.c'/> <ref filename='xpath1.c'/> + <ref filename='xpath2.c'/> </symbol> <symbol name='xmlXPathRegisterNs'> <ref filename='xpath1.c'/> @@ -721,27 +721,27 @@ </symbols> <sections> <section name='InputOutput'> - <example filename='io2.c'/> <example filename='io1.c'/> + <example filename='io2.c'/> </section> <section name='Parsing'> - <example filename='parse3.c'/> <example filename='parse1.c'/> - <example filename='parse4.c'/> <example filename='parse2.c'/> + <example filename='parse3.c'/> + <example filename='parse4.c'/> </section> <section name='Tree'> - <example filename='tree2.c'/> <example filename='tree1.c'/> + <example filename='tree2.c'/> </section> <section name='XPath'> - <example filename='xpath2.c'/> <example filename='xpath1.c'/> + <example filename='xpath2.c'/> </section> <section name='xmlReader'> - <example filename='reader3.c'/> <example filename='reader1.c'/> <example filename='reader2.c'/> + <example filename='reader3.c'/> <example filename='reader4.c'/> </section> <section name='xmlWriter'> diff --git a/doc/help.html b/doc/help.html index 3148b84..a9925b2 100644 --- a/doc/help.html +++ b/doc/help.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to +</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug database</a>:</p><ol><li>Provide patches when you find problems.</li> <li>Provide the diffs when you port libxml2 to a new platform. They may not diff --git a/doc/html/libxml-HTMLtree.html b/doc/html/libxml-HTMLtree.html index bc9bbe9..55ff739 100644 --- a/doc/html/libxml-HTMLtree.html +++ b/doc/html/libxml-HTMLtree.html @@ -14,6 +14,7 @@ A:link, A:visited, A:active { text-decoration: underline } <pre class="programlisting">void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)</pre> <pre class="programlisting">int <a href="#htmlDocDump">htmlDocDump</a> (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre> <pre class="programlisting">void <a href="#htmlDocDumpMemory">htmlDocDumpMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)</pre> +<pre class="programlisting">void <a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)</pre> <pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a> (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)</pre> <pre class="programlisting">int <a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre> <pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDoc">htmlNewDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)</pre> @@ -41,7 +42,9 @@ A:link, A:visited, A:active { text-decoration: underline } </pre><p>Dump an HTML document to an open FILE.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemory" id="htmlDocDumpMemory"></a>Function: htmlDocDumpMemory</h3><pre class="programlisting">void htmlDocDumpMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)<br /> </pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="htmlGetMetaEncoding" id="htmlGetMetaEncoding"></a>Function: htmlGetMetaEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemoryFormat" id="htmlDocDumpMemoryFormat"></a>Function: htmlDocDumpMemoryFormat</h3><pre class="programlisting">void htmlDocDumpMemoryFormat (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)<br /> +</pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="htmlGetMetaEncoding" id="htmlGetMetaEncoding"></a>Function: htmlGetMetaEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br /> </pre><p>Encoding definition lookup in the Meta tags</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div><h3><a name="htmlIsBooleanAttr" id="htmlIsBooleanAttr"></a>Function: htmlIsBooleanAttr</h3><pre class="programlisting">int htmlIsBooleanAttr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br /> </pre><p>Determine if a given <a href="libxml-SAX.html#attribute">attribute</a> is a boolean attribute.</p> diff --git a/doc/html/libxml-pattern.html b/doc/html/libxml-pattern.html index 2415881..ac1de26 100644 --- a/doc/html/libxml-pattern.html +++ b/doc/html/libxml-pattern.html @@ -30,6 +30,8 @@ The content of this structure is not made public by the API. <pre class="programlisting">int <a href="#xmlStreamPop">xmlStreamPop</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre> <pre class="programlisting">int <a href="#xmlStreamPush">xmlStreamPush</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> <pre class="programlisting">int <a href="#xmlStreamPushAttr">xmlStreamPushAttr</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre> +<pre class="programlisting">int <a href="#xmlStreamPushNode">xmlStreamPushNode</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> int nodeType)</pre> +<pre class="programlisting">int <a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)</pre> <h2>Description</h2> <h3><a name="xmlPattern" id="xmlPattern">Structure xmlPattern</a></h3><pre class="programlisting">Structure xmlPattern<br />struct _xmlPattern { The content of this structure is not made public by the API. @@ -64,7 +66,11 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, see <a href="libxml-pattern.html#xmlPatternFlags">xmlPatternFlags</a></td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled form of the pattern or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlStreamPop" id="xmlStreamPop"></a>Function: xmlStreamPop</h3><pre class="programlisting">int xmlStreamPop (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br /> </pre><p>push one level from the stream.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPush" id="xmlStreamPush"></a>Function: xmlStreamPush</h3><pre class="programlisting">int xmlStreamPush (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> -</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> +</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushAttr" id="xmlStreamPushAttr"></a>Function: xmlStreamPushAttr</h3><pre class="programlisting">int xmlStreamPushAttr (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br /> -</pre><p>Push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> +</pre><p>Push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushNode" id="xmlStreamPushNode"></a>Function: xmlStreamPushNode</h3><pre class="programlisting">int xmlStreamPushNode (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> int nodeType)<br /> +</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamWantsAnyNode" id="xmlStreamWantsAnyNode"></a>Function: xmlStreamWantsAnyNode</h3><pre class="programlisting">int xmlStreamWantsAnyNode (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br /> +</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> diff --git a/doc/html/libxml-relaxng.html b/doc/html/libxml-relaxng.html index 637f27f..fd95083 100644 --- a/doc/html/libxml-relaxng.html +++ b/doc/html/libxml-relaxng.html @@ -131,7 +131,7 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewValidCtxt" id="xmlRelaxNGNewValidCtxt"></a>Function: xmlRelaxNGNewValidCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> xmlRelaxNGNewValidCtxt (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br /> </pre><p>Create an XML RelaxNGs validation context based on the given schema</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGParse" id="xmlRelaxNGParse"></a>Function: xmlRelaxNGParse</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br /> -</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</p> +</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetParserErrors" id="xmlRelaxNGSetParserErrors"></a>Function: xmlRelaxNGSetParserErrors</h3><pre class="programlisting">void xmlRelaxNGSetParserErrors (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)<br /> </pre><p>Set the callback functions used to handle errors for a validation context</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetValidErrors" id="xmlRelaxNGSetValidErrors"></a>Function: xmlRelaxNGSetValidErrors</h3><pre class="programlisting">void xmlRelaxNGSetValidErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)<br /> diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html index 26b8df2..b25f070 100644 --- a/doc/html/libxml-schemasInternals.html +++ b/doc/html/libxml-schemasInternals.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } </style><style type="text/css"> div.deprecated pre.programlisting {border-style: double;border-color:red} pre.programlisting {border-style: double;background: #EECFA1} - </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="n" href="libxml-schematron.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot + </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="n" href="libxml-schematron.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot </pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * <a name="xmlSchemaAnnotPtr" id="xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttribute">xmlSchemaAttribute</a><br />struct _xmlSchemaAttribute </pre><pre class="programlisting">Structure <a href="#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />struct _xmlSchemaAttributeGroup @@ -50,7 +50,9 @@ The content of this structure is not made public by the API. <h3><a name="XML_SCHEMAS_ANY_SKIP" id="XML_SCHEMAS_ANY_SKIP"></a>Macro: XML_SCHEMAS_ANY_SKIP</h3><pre>#define XML_SCHEMAS_ANY_SKIP</pre><p>Skip unknown <a href="libxml-SAX.html#attribute">attribute</a> from validation</p> <h3><a name="XML_SCHEMAS_ANY_STRICT" id="XML_SCHEMAS_ANY_STRICT"></a>Macro: XML_SCHEMAS_ANY_STRICT</h3><pre>#define XML_SCHEMAS_ANY_STRICT</pre><p>Used by wildcards. Apply strict validation rules</p> <h3><a name="XML_SCHEMAS_ATTRGROUP_GLOBAL" id="XML_SCHEMAS_ATTRGROUP_GLOBAL"></a>Macro: XML_SCHEMAS_ATTRGROUP_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTRGROUP_GLOBAL</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p> +<h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" id="XML_SCHEMAS_ATTRGROUP_HAS_REFS"></a>Macro: XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre>#define XML_SCHEMAS_ATTRGROUP_HAS_REFS</pre><p>Whether this attr. group contains attr. group references.</p> <h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED" id="XML_SCHEMAS_ATTRGROUP_MARKED"></a>Macro: XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_MARKED</pre><p>Marks the attr group as marked; used for circular checks.</p> +<h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED" id="XML_SCHEMAS_ATTRGROUP_REDEFINED"></a>Macro: XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_REDEFINED</pre><p>The attr group was redefined.</p> <h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" id="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"></a>Macro: XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p> <h3><a name="XML_SCHEMAS_ATTR_FIXED" id="XML_SCHEMAS_ATTR_FIXED"></a>Macro: XML_SCHEMAS_ATTR_FIXED</h3><pre>#define XML_SCHEMAS_ATTR_FIXED</pre><p>the <a href="libxml-SAX.html#attribute">attribute</a> has a fixed value</p> <h3><a name="XML_SCHEMAS_ATTR_GLOBAL" id="XML_SCHEMAS_ATTR_GLOBAL"></a>Macro: XML_SCHEMAS_ATTR_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTR_GLOBAL</pre><p>allow elements in no namespace</p> @@ -114,7 +116,8 @@ The content of this structure is not made public by the API. <h3><a name="XML_SCHEMAS_TYPE_MIXED" id="XML_SCHEMAS_TYPE_MIXED"></a>Macro: XML_SCHEMAS_TYPE_MIXED</h3><pre>#define XML_SCHEMAS_TYPE_MIXED</pre><p>the element content type is mixed</p> <h3><a name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" id="XML_SCHEMAS_TYPE_NORMVALUENEEDED"></a>Macro: XML_SCHEMAS_TYPE_NORMVALUENEEDED</h3><pre>#define XML_SCHEMAS_TYPE_NORMVALUENEEDED</pre><p>indicates if the facets (pattern) need a normalized value</p> <h3><a name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" id="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"></a>Macro: XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</h3><pre>#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</pre><p>the complexType owns an <a href="libxml-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p> -<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" id="XML_SCHEMAS_TYPE_VARIETY_ABSENT"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ABSENT</pre><p>the simpleType has a variety of "absent".</p> +<h3><a name="XML_SCHEMAS_TYPE_REDEFINED" id="XML_SCHEMAS_TYPE_REDEFINED"></a>Macro: XML_SCHEMAS_TYPE_REDEFINED</h3><pre>#define XML_SCHEMAS_TYPE_REDEFINED</pre><p>The type was redefined.</p> +<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" id="XML_SCHEMAS_TYPE_VARIETY_ABSENT"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ABSENT</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p> <h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" id="XML_SCHEMAS_TYPE_VARIETY_ATOMIC"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC</pre><p>the simpleType has a variety of "union".</p> <h3><a name="XML_SCHEMAS_TYPE_VARIETY_LIST" id="XML_SCHEMAS_TYPE_VARIETY_LIST"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_LIST</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_LIST</pre><p>the simpleType has a variety of "list".</p> <h3><a name="XML_SCHEMAS_TYPE_VARIETY_UNION" id="XML_SCHEMAS_TYPE_VARIETY_UNION"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_UNION</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_UNION</pre><p>the simpleType has a variety of "union".</p> @@ -126,40 +129,41 @@ The content of this structure is not made public by the API. struct _xmlSchemaAnnot * next <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> content : the annotation }</pre><h3><a name="xmlSchemaAttribute" id="xmlSchemaAttribute">Structure xmlSchemaAttribute</a></h3><pre class="programlisting">Structure xmlSchemaAttribute<br />struct _xmlSchemaAttribute { - <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - struct _xmlSchemaAttribute * next : the next <a href="libxml-SAX.html#attribute">attribute</a> if in a group ... - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : name of the declaration or empty if par - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : the local name of the <a href="libxml-SAX.html#attribute">attribute</a> decl. i - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : the ns URI of the <a href="libxml-SAX.html#attribute">attribute</a> decl. if a + <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type + struct _xmlSchemaAttribute * next : the next <a href="libxml-SAX.html#attribute">attribute</a> (not used?) + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the declaration + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * typeName : the local name of the type definition const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * typeNs : the ns URI of the type definition <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot - <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : obsolete, not used - int occurs - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defValue + <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : Deprecated; not used + int occurs : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defValue : The initial value of the value constrai <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace int flags - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal - <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value constraint + <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl : Deprecated; not used }</pre><h3><a name="xmlSchemaAttributeGroup" id="xmlSchemaAttributeGroup">Structure xmlSchemaAttributeGroup</a></h3><pre class="programlisting">Structure xmlSchemaAttributeGroup<br />struct _xmlSchemaAttributeGroup { <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaAttribute * next : the next <a href="libxml-SAX.html#attribute">attribute</a> if in a group ... const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot - <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes + <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node int flags <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : The referenced <a href="libxml-SAX.html#attribute">attribute</a> group - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> redef Redefi + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace + void * attrUses }</pre><h3><a name="xmlSchemaAttributeLink" id="xmlSchemaAttributeLink">Structure xmlSchemaAttributeLink</a></h3><pre class="programlisting">Structure xmlSchemaAttributeLink<br />struct _xmlSchemaAttributeLink { struct _xmlSchemaAttributeLink * next : the next <a href="libxml-SAX.html#attribute">attribute</a> link ... struct _xmlSchemaAttribute * attr : the linked <a href="libxml-SAX.html#attribute">attribute</a> @@ -169,23 +173,23 @@ The content of this structure is not made public by the API. <a name="XML_SCHEMA_CONTENT_ELEMENTS" id="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2 <a name="XML_SCHEMA_CONTENT_MIXED" id="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3 <a name="XML_SCHEMA_CONTENT_SIMPLE" id="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4 - <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" id="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 : obsolete, not used + <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" id="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 : Obsolete <a name="XML_SCHEMA_CONTENT_BASIC" id="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6 <a name="XML_SCHEMA_CONTENT_ANY" id="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7 } </pre><h3><a name="xmlSchemaElement" id="xmlSchemaElement">Structure xmlSchemaElement</a></h3><pre class="programlisting">Structure xmlSchemaElement<br />struct _xmlSchemaElement { <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - struct _xmlSchemaType * next : the next type if in a sequence ... + struct _xmlSchemaType * next : Not used? const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : the local name of the element declarati - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : the ns URI of the element declaration i + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namedType @@ -193,24 +197,24 @@ The content of this structure is not made public by the API. const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * substGroup const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * substGroupNs const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * scope - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The original value of the value constra struct _xmlSchemaElement * refDecl : This will now be used for the substitut - <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel + <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Obsolete for WXS, maybe used for RelaxN <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal - void * idcs + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value contraint. + void * idcs : The identity-constraint defs }</pre><h3><a name="xmlSchemaFacet" id="xmlSchemaFacet">Structure xmlSchemaFacet</a></h3><pre class="programlisting">Structure xmlSchemaFacet<br />struct _xmlSchemaFacet { <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaFacet * next : the next type if in a sequence ... - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The original value + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node - int fixed + int fixed : XML_SCHEMAS_FACET_PRESERVE, etc. int whitespace - <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val - <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp + <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val : The compiled value + <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp : The regex for patterns }</pre><h3><a name="xmlSchemaFacetLink" id="xmlSchemaFacetLink">Structure xmlSchemaFacetLink</a></h3><pre class="programlisting">Structure xmlSchemaFacetLink<br />struct _xmlSchemaFacetLink { struct _xmlSchemaFacetLink * next : the next facet link ... <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet : the linked facet @@ -224,35 +228,36 @@ The content of this structure is not made public by the API. <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type struct _xmlSchemaType * next : the next type if in a sequence ... const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes - <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes + <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int flags <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * baseNs - <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType - <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets - struct _xmlSchemaType * redef : possible redefinitions for the type - int recurse - <a href="libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> attributeUses + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base : Base type's local name + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * baseNs : Base type's target namespace + <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType : The base type component + <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets : Local facets + struct _xmlSchemaType * redef : Deprecated; not used + int recurse : Obsolete + <a href="libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> * attributeUses : Deprecated; not used <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard - int builtInType - <a href="libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes - <a href="libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix - <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef - <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel + int builtInType : Type of built-in types. + <a href="libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes : member-types if a union type. + <a href="libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet : All facets (incl. inherited) + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used + <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef : Used for the simple content of complex + <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Holds the automaton of the content mode const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace + void * attrUses }</pre><h3><a name="xmlSchemaTypeLink" id="xmlSchemaTypeLink">Structure xmlSchemaTypeLink</a></h3><pre class="programlisting">Structure xmlSchemaTypeLink<br />struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink * next : the next type link ... - <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked typ + <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked type }</pre><h3>Enum <a name="xmlSchemaTypeType" id="xmlSchemaTypeType">xmlSchemaTypeType</a></h3><pre class="programlisting">Enum xmlSchemaTypeType { <a name="XML_SCHEMA_TYPE_BASIC" id="XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a> = 1 : A built-in datatype <a name="XML_SCHEMA_TYPE_ANY" id="XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a> = 2 @@ -279,6 +284,7 @@ The content of this structure is not made public by the API. <a name="XML_SCHEMA_TYPE_IDC_KEY" id="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23 <a name="XML_SCHEMA_TYPE_IDC_KEYREF" id="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24 <a name="XML_SCHEMA_TYPE_PARTICLE" id="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25 + <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" id="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26 <a name="XML_SCHEMA_FACET_MININCLUSIVE" id="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000 <a name="XML_SCHEMA_FACET_MINEXCLUSIVE" id="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001 <a name="XML_SCHEMA_FACET_MAXINCLUSIVE" id="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002 @@ -292,6 +298,7 @@ The content of this structure is not made public by the API. <a name="XML_SCHEMA_FACET_MAXLENGTH" id="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010 <a name="XML_SCHEMA_FACET_MINLENGTH" id="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011 <a name="XML_SCHEMA_EXTRA_QNAMEREF" id="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000 + <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" id="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001 } </pre><h3><a name="xmlSchemaVal" id="xmlSchemaVal">Structure xmlSchemaVal</a></h3><pre class="programlisting">Structure xmlSchemaVal<br />struct _xmlSchemaVal { The content of this structure is not made public by the API. @@ -346,11 +353,11 @@ The content of this structure is not made public by the API. } </pre><h3><a name="xmlSchemaWildcard" id="xmlSchemaWildcard">Structure xmlSchemaWildcard</a></h3><pre class="programlisting">Structure xmlSchemaWildcard<br />struct _xmlSchemaWildcard { <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node - int minOccurs - int maxOccurs + int minOccurs : Deprecated; not used + int maxOccurs : Deprecated; not used int processContents int any : Indicates if the ns constraint is of ## <a href="libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> nsSet : The list of allowed namespaces diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index 5a33b38..af8fefc 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -782,7 +782,7 @@ A:link, A:visited, A:active { text-decoration: underline } <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDtd" id="xmlNewDtd"></a>Function: xmlNewDtd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlNewDtd (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br /> </pre><p>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div><h3><a name="xmlNewGlobalNs" id="xmlNewGlobalNs"></a>Function: xmlNewGlobalNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br /> -</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</p> +</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div><h3><a name="xmlNewNode" id="xmlNewNode"></a>Function: xmlNewNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br /> </pre><p>Creation of a new node element. @ns is optional (NULL).</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object. Uses xmlStrdup() to make copy of @name.</td></tr></tbody></table></div><h3><a name="xmlNewNodeEatName" id="xmlNewNodeEatName"></a>Function: xmlNewNodeEatName</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNodeEatName (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br /> diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 8ec2c68..631c49c 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -76,7 +76,7 @@ The content of this structure is not made public by the API. <pre class="programlisting">void <a href="#xmlSprintfElementContent">xmlSprintfElementContent</a> (char * buf, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br /> int englob)</pre> <pre class="programlisting">int <a href="#xmlValidBuildContentModel">xmlValidBuildContentModel</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre> -<pre class="programlisting">int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int * len, <br /> int max)</pre> +<pre class="programlisting">int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int * len, <br /> int max)</pre> <pre class="programlisting">int <a href="#xmlValidGetValidElements">xmlValidGetValidElements</a> (<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br /> <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int max)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre> <pre class="programlisting">int <a href="#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)</pre> @@ -232,9 +232,9 @@ The content of this structure is not made public by the API. </pre><p>(Re)Build the automata associated to the content model of this element</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element declaration node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 in case of error</td></tr></tbody></table></div><h3><a name="xmlValidCtxtNormalizeAttributeValue" id="xmlValidCtxtNormalizeAttributeValue"></a>Function: xmlValidCtxtNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlValidCtxtNormalizeAttributeValue (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br /> </pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidGetPotentialChildren" id="xmlValidGetPotentialChildren"></a>Function: xmlValidGetPotentialChildren</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int * len, <br /> int max)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidGetPotentialChildren" id="xmlValidGetPotentialChildren"></a>Function: xmlValidGetPotentialChildren</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int * len, <br /> int max)<br /> </pre><p>Build/extend a list of potential children allowed by the content tree</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlValidGetValidElements" id="xmlValidGetValidElements"></a>Function: xmlValidGetValidElements</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br /> <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int max)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlValidGetValidElements" id="xmlValidGetValidElements"></a>Function: xmlValidGetValidElements</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br /> <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int max)<br /> </pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>an element to insert after</td></tr><tr><td><span class="term"><i><tt>next</tt></i>:</span></td><td>an element to insert next</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.</td></tr></tbody></table></div><h3><a name="xmlValidNormalizeAttributeValue" id="xmlValidNormalizeAttributeValue"></a>Function: xmlValidNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlValidNormalizeAttributeValue (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br /> </pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character.</p> diff --git a/doc/html/libxml-xmlIO.html b/doc/html/libxml-xmlIO.html index 76b6dcd..2edd017 100644 --- a/doc/html/libxml-xmlIO.html +++ b/doc/html/libxml-xmlIO.html @@ -45,6 +45,7 @@ int <a href="#xmlInputReadCallback">xmlInputReadCallback</a> (void * context, < <pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre> <pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)</pre> <pre class="programlisting">int <a href="#xmlOutputBufferClose">xmlOutputBufferClose</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre> +<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a> (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a> (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre> <pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a> (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br /> int compression)</pre> @@ -140,7 +141,9 @@ int xmlInputReadCallback (void * context, <br /> char * buffer, <br /> </pre><p>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the input file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a canonicalized version of the path</td></tr></tbody></table></div><h3><a name="xmlOutputBufferClose" id="xmlOutputBufferClose"></a>Function: xmlOutputBufferClose</h3><pre class="programlisting">int xmlOutputBufferClose (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br /> </pre><p>flushes and close the output I/O channel and free up all the associated resources</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFd" id="xmlOutputBufferCreateFd"></a>Function: xmlOutputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateBuffer" id="xmlOutputBufferCreateBuffer"></a>Function: xmlOutputBufferCreateBuffer</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateBuffer (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br /> +</pre><p>Create a buffered output for the progressive saving to a <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFd" id="xmlOutputBufferCreateFd"></a>Function: xmlOutputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br /> </pre><p>Create a buffered output for the progressive saving to a file descriptor</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFile" id="xmlOutputBufferCreateFile"></a>Function: xmlOutputBufferCreateFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFile (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br /> </pre><p>Create a buffered output for the progressive saving to a FILE * buffered C I/O</p> diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index 8f96ae4..f8f0a90 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -761,6 +761,11 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA" id="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 : 3084 <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH" id="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 : 3085 <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH" id="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 : 3085 + <a name="XML_SCHEMAP_AG_PROPS_CORRECT" id="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 : 3086 + <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" id="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 : 3087 + <a name="XML_SCHEMAP_AU_PROPS_CORRECT" id="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 : 3088 + <a name="XML_SCHEMAP_A_PROPS_CORRECT_3" id="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 : 3089 + <a name="XML_SCHEMAP_COS_ALL_LIMITED" id="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 : 3090 <a name="XML_MODULE_OPEN" id="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 : 4900 <a name="XML_MODULE_CLOSE" id="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 : 4901 <a name="XML_CHECK_FOUND_ELEMENT" id="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000 diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html index 6036ccb..0ffa0a4 100644 --- a/doc/html/libxml-xmlreader.html +++ b/doc/html/libxml-xmlreader.html @@ -97,6 +97,7 @@ void <a href="#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> (void * arg, <pre class="programlisting">int <a href="#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre> <pre class="programlisting">int <a href="#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * rng)</pre> <pre class="programlisting">int <a href="#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * xsd)</pre> +<pre class="programlisting">int <a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)</pre> <pre class="programlisting">void <a href="#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br /> void * arg)</pre> <pre class="programlisting">int <a href="#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop, <br /> int value)</pre> <pre class="programlisting">int <a href="#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre> @@ -303,8 +304,10 @@ void xmlTextReaderErrorFunc (void * arg, <br /> const char * msg, <br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled RelaxNG schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderRelaxNGValidate" id="xmlTextReaderRelaxNGValidate"></a>Function: xmlTextReaderRelaxNGValidate</h3><pre class="programlisting">int xmlTextReaderRelaxNGValidate (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * rng)<br /> </pre><p>Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @rng is NULL, then RelaxNG validation is desactivated.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>rng</tt></i>:</span></td><td>the path to a RelaxNG schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidate" id="xmlTextReaderSchemaValidate"></a>Function: xmlTextReaderSchemaValidate</h3><pre class="programlisting">int xmlTextReaderSchemaValidate (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * xsd)<br /> -</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetErrorHandler" id="xmlTextReaderSetErrorHandler"></a>Function: xmlTextReaderSetErrorHandler</h3><pre class="programlisting">void xmlTextReaderSetErrorHandler (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br /> void * arg)<br /> +</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidateCtxt" id="xmlTextReaderSchemaValidateCtxt"></a>Function: xmlTextReaderSchemaValidateCtxt</h3><pre class="programlisting">int xmlTextReaderSchemaValidateCtxt (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br /> +</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetErrorHandler" id="xmlTextReaderSetErrorHandler"></a>Function: xmlTextReaderSetErrorHandler</h3><pre class="programlisting">void xmlTextReaderSetErrorHandler (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br /> void * arg)<br /> </pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function to call on error and warnings</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument to pass to the callback function</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetParserProp" id="xmlTextReaderSetParserProp"></a>Function: xmlTextReaderSetParserProp</h3><pre class="programlisting">int xmlTextReaderSetParserProp (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop, <br /> int value)<br /> </pre><p>Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.</p> diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html index b507f34..b36155d 100644 --- a/doc/html/libxml-xmlregexp.html +++ b/doc/html/libxml-xmlregexp.html @@ -29,8 +29,8 @@ The content of this structure is not made public by the API. <pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpExpDerive">xmlExpExpDerive</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)</pre> <pre class="programlisting">void <a href="#xmlExpFree">xmlExpFree</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre> <pre class="programlisting">void <a href="#xmlExpFreeCtxt">xmlExpFreeCtxt</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)</pre> -<pre class="programlisting">int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int len)</pre> -<pre class="programlisting">int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int len)</pre> +<pre class="programlisting">int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br /> int len)</pre> +<pre class="programlisting">int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)</pre> <pre class="programlisting">int <a href="#xmlExpIsNillable">xmlExpIsNillable</a> (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre> <pre class="programlisting">int <a href="#xmlExpMaxToken">xmlExpMaxToken</a> (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)</pre> <pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewAtom">xmlExpNewAtom</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)</pre> @@ -89,11 +89,11 @@ The content of this structure is not made public by the API. </pre><p>Dereference the expression</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div><h3><a name="xmlExpFreeCtxt" id="xmlExpFreeCtxt"></a>Function: xmlExpFreeCtxt</h3><pre class="programlisting">void xmlExpFreeCtxt (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br /> </pre><p>Free an expression context</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int len)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br /> int len)<br /> </pre><p>Find all the strings used in @exp and store them in @list</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** list, <br /> int len)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)<br /> </pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated lenght of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br /> </pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if nillable, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpMaxToken" id="xmlExpMaxToken"></a>Function: xmlExpMaxToken</h3><pre class="programlisting">int xmlExpMaxToken (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br /> </pre><p>Indicate the maximum number of input a expression can accept</p> diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html index 6863beb..f0e10b0 100644 --- a/doc/html/libxml-xmlsave.html +++ b/doc/html/libxml-xmlsave.html @@ -19,6 +19,7 @@ The content of this structure is not made public by the API. <pre class="programlisting">int <a href="#xmlSaveFlush">xmlSaveFlush</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)</pre> <pre class="programlisting">int <a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre> <pre class="programlisting">int <a href="#xmlSaveSetEscape">xmlSaveSetEscape</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre> +<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToBuffer">xmlSaveToBuffer</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const char * encoding, <br /> int options)</pre> <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFd">xmlSaveToFd</a> (int fd, <br /> const char * encoding, <br /> int options)</pre> <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFilename">xmlSaveToFilename</a> (const char * filename, <br /> const char * encoding, <br /> int options)</pre> <pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToIO">xmlSaveToIO</a> (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * encoding, <br /> int options)</pre> @@ -42,7 +43,9 @@ The content of this structure is not made public by the API. </pre><p>Set a custom escaping function to be used for text in <a href="libxml-SAX.html#attribute">attribute</a> content</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveSetEscape" id="xmlSaveSetEscape"></a>Function: xmlSaveSetEscape</h3><pre class="programlisting">int xmlSaveSetEscape (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br /> </pre><p>Set a custom escaping function to be used for text in element content</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFd" id="xmlSaveToFd"></a>Function: xmlSaveToFd</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFd (int fd, <br /> const char * encoding, <br /> int options)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToBuffer" id="xmlSaveToBuffer"></a>Function: xmlSaveToBuffer</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToBuffer (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const char * encoding, <br /> int options)<br /> +</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFd" id="xmlSaveToFd"></a>Function: xmlSaveToFd</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFd (int fd, <br /> const char * encoding, <br /> int options)<br /> </pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFilename" id="xmlSaveToFilename"></a>Function: xmlSaveToFilename</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFilename (const char * filename, <br /> const char * encoding, <br /> int options)<br /> </pre><p>Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.</p> diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html index 19afcec..d919fcc 100644 --- a/doc/html/libxml-xmlschemas.html +++ b/doc/html/libxml-xmlschemas.html @@ -38,11 +38,12 @@ The content of this structure is not made public by the API. <pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> <a href="#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br /> void ** user_data)</pre> <pre class="programlisting">int <a href="#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a> (<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)</pre> <pre class="programlisting">void <a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)</pre> +<pre class="programlisting">void <a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre> <pre class="programlisting">void <a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)</pre> <pre class="programlisting">int <a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)</pre> <pre class="programlisting">void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre> <pre class="programlisting">int <a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre> -<pre class="programlisting">int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre> +<pre class="programlisting">int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)</pre> <pre class="programlisting">int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)</pre> <pre class="programlisting">int <a href="#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre> <pre class="programlisting">int <a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data)</pre> @@ -57,7 +58,7 @@ void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (v const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : schema name const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : the target namespace const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version - const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id + const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot int flags @@ -73,8 +74,8 @@ void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (v void * includes : the includes, this is opaque for now int preserve : whether to free the document int counter : used to give ononymous components uniqu - <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef - void * volatiles : Deprecated; not used anymore. + <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef : All identity-constraint defs. + void * volatiles : Obsolete }</pre><h3><a name="xmlSchemaParserCtxt" id="xmlSchemaParserCtxt">Structure xmlSchemaParserCtxt</a></h3><pre class="programlisting">Structure xmlSchemaParserCtxt<br />struct _xmlSchemaParserCtxt { The content of this structure is not made public by the API. }</pre><h3><a name="xmlSchemaSAXPlugStruct" id="xmlSchemaSAXPlugStruct">Structure xmlSchemaSAXPlugStruct</a></h3><pre class="programlisting">Structure xmlSchemaSAXPlugStruct<br />struct _xmlSchemaSAXPlug { @@ -119,46 +120,48 @@ The content of this structure is not made public by the API. <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeParserCtxt" id="xmlSchemaFreeParserCtxt"></a>Function: xmlSchemaFreeParserCtxt</h3><pre class="programlisting">void xmlSchemaFreeParserCtxt (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br /> </pre><p>Free the resources associated to the schema parser context</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeValidCtxt" id="xmlSchemaFreeValidCtxt"></a>Function: xmlSchemaFreeValidCtxt</h3><pre class="programlisting">void xmlSchemaFreeValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br /> -</pre><p>Free the resources associated to the schema validation context</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div><h3><a name="xmlSchemaGetParserErrors" id="xmlSchemaGetParserErrors"></a>Function: xmlSchemaGetParserErrors</h3><pre class="programlisting">int xmlSchemaGetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaGetParserErrors" id="xmlSchemaGetParserErrors"></a>Function: xmlSchemaGetParserErrors</h3><pre class="programlisting">int xmlSchemaGetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)<br /> </pre><p>Get the callback information used to handle errors for a parser context</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaGetValidErrors" id="xmlSchemaGetValidErrors"></a>Function: xmlSchemaGetValidErrors</h3><pre class="programlisting">int xmlSchemaGetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)<br /> -</pre><p>Get the error and warning callback informations</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaIsValid" id="xmlSchemaIsValid"></a>Function: xmlSchemaIsValid</h3><pre class="programlisting">int xmlSchemaIsValid (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br /> -</pre><p>Check if any error was detected during validation.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaIsValid" id="xmlSchemaIsValid"></a>Function: xmlSchemaIsValid</h3><pre class="programlisting">int xmlSchemaIsValid (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br /> </pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewMemParserCtxt" id="xmlSchemaNewMemParserCtxt"></a>Function: xmlSchemaNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewMemParserCtxt (const char * buffer, <br /> int size)<br /> </pre><p>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewParserCtxt" id="xmlSchemaNewParserCtxt"></a>Function: xmlSchemaNewParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewParserCtxt (const char * URL)<br /> </pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewValidCtxt" id="xmlSchemaNewValidCtxt"></a>Function: xmlSchemaNewValidCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br /> -</pre><p>Create an XML Schemas validation context based on the given schema.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br /> -</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</p> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br /> +</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXPlug" id="xmlSchemaSAXPlug"></a>Function: xmlSchemaSAXPlug</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> xmlSchemaSAXPlug (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br /> void ** user_data)<br /> -</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXUnplug" id="xmlSchemaSAXUnplug"></a>Function: xmlSchemaSAXUnplug</h3><pre class="programlisting">int xmlSchemaSAXUnplug (<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br /> -</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSAXUnplug" id="xmlSchemaSAXUnplug"></a>Function: xmlSchemaSAXUnplug</h3><pre class="programlisting">int xmlSchemaSAXUnplug (<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br /> </pre><p>Set the callback functions used to handle errors for a validation context</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br /> -</pre><p>Set the error and warning callback informations</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br /> -</pre><p>Sets the options to be used during the validation.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br /> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserStructuredErrors" id="xmlSchemaSetParserStructuredErrors"></a>Function: xmlSchemaSetParserStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetParserStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br /> </pre><p>Set the structured error callback</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br /> -</pre><p>Get the validation context options.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br /> -</pre><p>Validate a document tree in memory.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFile" id="xmlSchemaValidateFile"></a>Function: xmlSchemaValidateFile</h3><pre class="programlisting">int xmlSchemaValidateFile (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)<br /> -</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateOneElement" id="xmlSchemaValidateOneElement"></a>Function: xmlSchemaValidateOneElement</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br /> -</pre><p>Validate a branch of a tree, starting with the given @elem.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data)<br /> -</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFile" id="xmlSchemaValidateFile"></a>Function: xmlSchemaValidateFile</h3><pre class="programlisting">int xmlSchemaValidateFile (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateOneElement" id="xmlSchemaValidateOneElement"></a>Function: xmlSchemaValidateOneElement</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data)<br /> +</pre><p></p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc void xmlSchemaValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...) </pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td></td></tr></tbody></table></div><br /> <h3><a name="xmlSchemaValidityWarningFunc" id="xmlSchemaValidityWarningFunc"></a>Function type: xmlSchemaValidityWarningFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityWarningFunc diff --git a/doc/html/libxml-xmlstring.html b/doc/html/libxml-xmlstring.html index bbcc85f..537aaa5 100644 --- a/doc/html/libxml-xmlstring.html +++ b/doc/html/libxml-xmlstring.html @@ -54,7 +54,7 @@ A:link, A:visited, A:active { text-decoration: underline } <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>Pointer to putative UTF-8 encoded string.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>value: true if @utf is valid.</td></tr></tbody></table></div><h3><a name="xmlGetUTF8Char" id="xmlGetUTF8Char"></a>Function: xmlGetUTF8Char</h3><pre class="programlisting">int xmlGetUTF8Char (const unsigned char * utf, <br /> int * len)<br /> </pre><p>Read the first UTF8 character from @utf</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div><h3><a name="xmlStrEqual" id="xmlStrEqual"></a>Function: xmlStrEqual</h3><pre class="programlisting">int xmlStrEqual (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br /> -</pre><p>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</p> +</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrPrintf" id="xmlStrPrintf"></a>Function: xmlStrPrintf</h3><pre class="programlisting">int xmlStrPrintf (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br /> int len, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br /> ... ...)<br /> </pre><p>Formats @msg and places result into @buf.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrQEqual" id="xmlStrQEqual"></a>Function: xmlStrQEqual</h3><pre class="programlisting">int xmlStrQEqual (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br /> @@ -78,10 +78,10 @@ A:link, A:visited, A:active { text-decoration: underline } <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> contained in the ARRAY.</td></tr></tbody></table></div><h3><a name="xmlStrncasecmp" id="xmlStrncasecmp"></a>Function: xmlStrncasecmp</h3><pre class="programlisting">int xmlStrncasecmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br /> </pre><p>a strncasecmp for xmlChar's</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrncat" id="xmlStrncat"></a>Function: xmlStrncat</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncat (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add, <br /> int len)<br /> -</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.</p> +</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div><h3><a name="xmlStrncatNew" id="xmlStrncatNew"></a>Function: xmlStrncatNew</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncatNew (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br /> -</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed.</p> -<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrncmp" id="xmlStrncmp"></a>Function: xmlStrncmp</h3><pre class="programlisting">int xmlStrncmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br /> +</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.</p> +<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or < 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrncmp" id="xmlStrncmp"></a>Function: xmlStrncmp</h3><pre class="programlisting">int xmlStrncmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br /> </pre><p>a strncmp for xmlChar's</p> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrndup" id="xmlStrndup"></a>Function: xmlStrndup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrndup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int len)<br /> </pre><p>a strndup for array of xmlChar's</p> diff --git a/doc/index.html b/doc/index.html index e5cdd04..b4cfbcb 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> - <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="SHORTCUT ICON" href="/favicon.ico" /> <style type="text/css"> TD {font-family: Verdana,Arial,Helvetica} @@ -83,9 +84,6 @@ A:link, A:visited, A:active { text-decoration: underline } <a href="index.html">Home</a> </li> <li> - <a href="http://xmlsoft.org/wiki">Wiki</a> - </li> - <li> <a href="html/index.html">Reference Manual</a> </li> <li> diff --git a/doc/intro.html b/doc/intro.html index 7ddc6f8..8c30482 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the +</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the <a href="http://www.gnome.org/">Gnome</a> project. <a href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based structured documents/data.</p><p>Here are some key points about libxml:</p><ul><li>Libxml2 exports Push (progressive) and Pull (blocking) type parser interfaces for both XML and HTML.</li> diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 2522c21..088d0ae 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -110,9 +110,10 @@ <exports symbol='htmlNodeDumpFileFormat' type='function'/> <exports symbol='htmlDocDumpMemory' type='function'/> <exports symbol='htmlSaveFile' type='function'/> - <exports symbol='htmlNewDocNoDtD' type='function'/> <exports symbol='htmlDocDump' type='function'/> + <exports symbol='htmlDocDumpMemoryFormat' type='function'/> <exports symbol='htmlIsBooleanAttr' type='function'/> + <exports symbol='htmlSaveFileFormat' type='function'/> <exports symbol='htmlNodeDumpFormatOutput' type='function'/> <exports symbol='htmlSetMetaEncoding' type='function'/> <exports symbol='htmlSaveFileEnc' type='function'/> @@ -122,7 +123,7 @@ <exports symbol='htmlGetMetaEncoding' type='function'/> <exports symbol='htmlNodeDumpFile' type='function'/> <exports symbol='htmlDocContentDumpFormatOutput' type='function'/> - <exports symbol='htmlSaveFileFormat' type='function'/> + <exports symbol='htmlNewDocNoDtD' type='function'/> <exports symbol='htmlDocContentDumpOutput' type='function'/> </file> <file name='SAX'> @@ -1003,11 +1004,13 @@ <exports symbol='xmlPatternStreamable' type='function'/> <exports symbol='xmlStreamPushAttr' type='function'/> <exports symbol='xmlPatternMatch' type='function'/> + <exports symbol='xmlStreamWantsAnyNode' type='function'/> <exports symbol='xmlStreamPop' type='function'/> <exports symbol='xmlFreePattern' type='function'/> <exports symbol='xmlStreamPush' type='function'/> <exports symbol='xmlPatternMaxDepth' type='function'/> <exports symbol='xmlPatterncompile' type='function'/> + <exports symbol='xmlStreamPushNode' type='function'/> <exports symbol='xmlFreeStreamCtxt' type='function'/> </file> <file name='relaxng'> @@ -1093,7 +1096,7 @@ </file> <file name='schemasInternals'> <summary>internal interfaces for XML Schemas</summary> - <description>internal interfaces for the XML Schemas handling and schema validity checking </description> + <description>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </description> <author>Daniel Veillard </author> <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION' type='macro'/> <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_EXTENSION' type='macro'/> @@ -1118,11 +1121,12 @@ <exports symbol='XML_SCHEMAS_ATTR_USE_PROHIBITED' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_NILLABLE' type='macro'/> <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION' type='macro'/> - <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' type='macro'/> + <exports symbol='XML_SCHEMAS_ATTRGROUP_REDEFINED' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_BLOCK_DEFAULT' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_FINAL_EXTENSION' type='macro'/> + <exports symbol='XML_SCHEMAS_TYPE_REDEFINED' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_FIXED' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' type='macro'/> @@ -1142,7 +1146,9 @@ <exports symbol='XML_SCHEMAS_ANYATTR_LAX' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_GLOBAL' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_ABSTRACT' type='macro'/> + <exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/> <exports symbol='XML_SCHEMAS_ATTR_FIXED' type='macro'/> + <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' type='macro'/> <exports symbol='XML_SCHEMAS_ANY_SKIP' type='macro'/> <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_LIST' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ABSENT' type='macro'/> @@ -1151,7 +1157,7 @@ <exports symbol='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_NSDEFAULT' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_GLOBAL' type='macro'/> - <exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/> + <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/> <exports symbol='XML_SCHEMAS_ANY_LAX' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_FINAL_RESTRICTION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_HAS_FACETS' type='macro'/> @@ -1160,7 +1166,7 @@ <exports symbol='XML_SCHEMAS_ELEM_FINAL_ABSENT' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_BLOCK_EXTENSION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_INTERNAL_INVALID' type='macro'/> - <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/> + <exports symbol='XML_SCHEMAS_ATTRGROUP_HAS_REFS' type='macro'/> <exports symbol='XML_SCHEMAS_ELEM_ABSTRACT' type='macro'/> <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION' type='macro'/> <exports symbol='XML_SCHEMAS_TYPE_FINAL_UNION' type='macro'/> @@ -1223,6 +1229,7 @@ <exports symbol='XML_SCHEMAS_GMONTH' type='enum'/> <exports symbol='XML_SCHEMA_CONTENT_ELEMENTS' type='enum'/> <exports symbol='XML_SCHEMAS_GYEAR' type='enum'/> + <exports symbol='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' type='enum'/> <exports symbol='XML_SCHEMAS_BYTE' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_ALL' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_IDC_KEYREF' type='enum'/> @@ -1230,6 +1237,7 @@ <exports symbol='XML_SCHEMA_FACET_MAXINCLUSIVE' type='enum'/> <exports symbol='XML_SCHEMAS_NAME' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_LIST' type='enum'/> + <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE_USE' type='enum'/> <exports symbol='XML_SCHEMAS_GDAY' type='enum'/> <exports symbol='XML_SCHEMA_TYPE_ANY' type='enum'/> <exports symbol='XML_SCHEMAS_ANYURI' type='enum'/> @@ -1853,9 +1861,10 @@ <exports symbol='xmlFreeParserInputBuffer' type='function'/> <exports symbol='xmlRegisterDefaultInputCallbacks' type='function'/> <exports symbol='xmlParserInputBufferGrow' type='function'/> + <exports symbol='xmlOutputCloseCallback' type='function'/> <exports symbol='xmlAllocOutputBuffer' type='function'/> <exports symbol='xmlNoNetExternalEntityLoader' type='function'/> - <exports symbol='xmlOutputCloseCallback' type='function'/> + <exports symbol='xmlOutputBufferCreateBuffer' type='function'/> <exports symbol='xmlIOHTTPMatch' type='function'/> <exports symbol='xmlIOHTTPOpen' type='function'/> <exports symbol='xmlParserInputBufferCreateIO' type='function'/> @@ -1927,7 +1936,7 @@ <exports symbol='XML_XPATH_UNKNOWN_FUNC_ERROR' type='enum'/> <exports symbol='XML_ERR_DOCUMENT_START' type='enum'/> <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_TEXT' type='enum'/> - <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_2' type='enum'/> + <exports symbol='XML_SCHEMAP_AG_PROPS_CORRECT' type='enum'/> <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_1' type='enum'/> <exports symbol='XML_DTD_NOT_STANDALONE' type='enum'/> <exports symbol='XML_HTTP_USE_IP' type='enum'/> @@ -2064,6 +2073,7 @@ <exports symbol='XML_SAVE_CHAR_INVALID' type='enum'/> <exports symbol='XML_ERR_ENTITYREF_NO_NAME' type='enum'/> <exports symbol='XML_DTD_ID_FIXED' type='enum'/> + <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_3' type='enum'/> <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_2' type='enum'/> <exports symbol='XML_WAR_NS_COLUMN' type='enum'/> <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_2_1' type='enum'/> @@ -2083,6 +2093,7 @@ <exports symbol='XML_FROM_HTTP' type='enum'/> <exports symbol='XML_DTD_NOTATION_REDEFINED' type='enum'/> <exports symbol='XML_WAR_LANG_VALUE' type='enum'/> + <exports symbol='XML_SCHEMAP_AU_PROPS_CORRECT' type='enum'/> <exports symbol='XML_ERR_SEPARATOR_REQUIRED' type='enum'/> <exports symbol='XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED' type='enum'/> <exports symbol='XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE' type='enum'/> @@ -2220,7 +2231,7 @@ <exports symbol='XML_XINCLUDE_PARSE_VALUE' type='enum'/> <exports symbol='XML_RNGP_NSNAME_NO_NS' type='enum'/> <exports symbol='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' type='enum'/> - <exports symbol='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' type='enum'/> + <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_2' type='enum'/> <exports symbol='XML_CHECK_FOUND_ELEMENT' type='enum'/> <exports symbol='XML_RNGP_PARENTREF_NAME_INVALID' type='enum'/> <exports symbol='XML_NS_ERR_QNAME' type='enum'/> @@ -2230,6 +2241,7 @@ <exports symbol='XML_I18N_NO_NAME' type='enum'/> <exports symbol='XML_SCHEMAP_ST_PROPS_CORRECT_1' type='enum'/> <exports symbol='XML_RNGP_EXCEPT_MISSING' type='enum'/> + <exports symbol='XML_SCHEMAP_COS_CT_EXTENDS_1_2' type='enum'/> <exports symbol='XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID' type='enum'/> <exports symbol='XML_SCHEMAP_UNKNOWN_ALL_CHILD' type='enum'/> <exports symbol='XML_DTD_MIXED_CORRUPT' type='enum'/> @@ -2333,6 +2345,7 @@ <exports symbol='XML_ERR_VALUE_REQUIRED' type='enum'/> <exports symbol='XML_RNGP_PAT_LIST_TEXT' type='enum'/> <exports symbol='XML_RNGP_URI_NOT_ABSOLUTE' type='enum'/> + <exports symbol='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' type='enum'/> <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_ATTR' type='enum'/> <exports symbol='XML_FTP_PASV_ANSWER' type='enum'/> <exports symbol='XML_SCHEMAP_INVALID_BOOLEAN' type='enum'/> @@ -2521,6 +2534,7 @@ <exports symbol='XML_CHECK_NAME_NOT_NULL' type='enum'/> <exports symbol='XML_SCHEMAP_INVALID_MINOCCURS' type='enum'/> <exports symbol='XML_SCHEMAV_CVC_ELT_1' type='enum'/> + <exports symbol='XML_SCHEMAP_COS_ALL_LIMITED' type='enum'/> <exports symbol='XML_CHECK_' type='enum'/> <exports symbol='XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID' type='enum'/> <exports symbol='XML_IO_EPIPE' type='enum'/> @@ -2864,6 +2878,7 @@ <exports symbol='xmlTextReaderConstValue' type='function'/> <exports symbol='xmlNewTextReader' type='function'/> <exports symbol='xmlTextReaderGetAttributeNo' type='function'/> + <exports symbol='xmlTextReaderSchemaValidateCtxt' type='function'/> <exports symbol='xmlTextReaderLocalName' type='function'/> <exports symbol='xmlTextReaderExpand' type='function'/> <exports symbol='xmlTextReaderConstName' type='function'/> @@ -2943,6 +2958,7 @@ <exports symbol='xmlSaveToFd' type='function'/> <exports symbol='xmlSaveClose' type='function'/> <exports symbol='xmlSaveSetAttrEscape' type='function'/> + <exports symbol='xmlSaveToBuffer' type='function'/> <exports symbol='xmlSaveToFilename' type='function'/> <exports symbol='xmlSaveFlush' type='function'/> <exports symbol='xmlSaveDoc' type='function'/> @@ -3014,6 +3030,7 @@ <exports symbol='xmlSchemaValidityWarningFunc' type='function'/> <exports symbol='xmlSchemaDump' type='function'/> <exports symbol='xmlSchemaFreeValidCtxt' type='function'/> + <exports symbol='xmlSchemaSetParserStructuredErrors' type='function'/> <exports symbol='xmlSchemaNewValidCtxt' type='function'/> </file> <file name='xmlschemastypes'> @@ -4063,9 +4080,15 @@ <macro name='XML_SCHEMAS_ATTRGROUP_GLOBAL' file='schemasInternals'> <info>The attribute wildcard has been already builded.</info> </macro> + <macro name='XML_SCHEMAS_ATTRGROUP_HAS_REFS' file='schemasInternals'> + <info>Whether this attr. group contains attr. group references.</info> + </macro> <macro name='XML_SCHEMAS_ATTRGROUP_MARKED' file='schemasInternals'> <info>Marks the attr group as marked; used for circular checks.</info> </macro> + <macro name='XML_SCHEMAS_ATTRGROUP_REDEFINED' file='schemasInternals'> + <info>The attr group was redefined.</info> + </macro> <macro name='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' file='schemasInternals'> <info>The attribute wildcard has been already builded.</info> </macro> @@ -4255,8 +4278,11 @@ <macro name='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' file='schemasInternals'> <info>the complexType owns an attribute wildcard, i.e. it can be freed by the complexType</info> </macro> + <macro name='XML_SCHEMAS_TYPE_REDEFINED' file='schemasInternals'> + <info>The type was redefined.</info> + </macro> <macro name='XML_SCHEMAS_TYPE_VARIETY_ABSENT' file='schemasInternals'> - <info>the simpleType has a variety of "absent".</info> + <info>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</info> </macro> <macro name='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' file='schemasInternals'> <info>the simpleType has a variety of "union".</info> @@ -5155,13 +5181,18 @@ <enum name='XML_SAVE_NO_EMPTY' file='xmlsave' value='4' type='xmlSaveOption' info='no empty tags'/> <enum name='XML_SAVE_NO_XHTML' file='xmlsave' value='8' type='xmlSaveOption' info=' disable XHTML1 specific rules'/> <enum name='XML_SAVE_UNKNOWN_ENCODING' file='xmlerror' value='1403' type='xmlParserErrors' info='1403'/> + <enum name='XML_SCHEMAP_AG_PROPS_CORRECT' file='xmlerror' value='3087' type='xmlParserErrors' info='3086'/> <enum name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' file='xmlerror' value='1701' type='xmlParserErrors' info='1701'/> <enum name='XML_SCHEMAP_ATTRGRP_NONAME_NOREF' file='xmlerror' value='1702' type='xmlParserErrors' info='1702'/> <enum name='XML_SCHEMAP_ATTR_NONAME_NOREF' file='xmlerror' value='1703' type='xmlParserErrors' info='1703'/> + <enum name='XML_SCHEMAP_AU_PROPS_CORRECT' file='xmlerror' value='3089' type='xmlParserErrors' info='3088'/> <enum name='XML_SCHEMAP_AU_PROPS_CORRECT_2' file='xmlerror' value='3078' type='xmlParserErrors' info='3078'/> <enum name='XML_SCHEMAP_A_PROPS_CORRECT_2' file='xmlerror' value='3079' type='xmlParserErrors' info='3079'/> + <enum name='XML_SCHEMAP_A_PROPS_CORRECT_3' file='xmlerror' value='3090' type='xmlParserErrors' info='3089'/> <enum name='XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF' file='xmlerror' value='1704' type='xmlParserErrors' info='1704'/> + <enum name='XML_SCHEMAP_COS_ALL_LIMITED' file='xmlerror' value='3091' type='xmlParserErrors' info='3090'/> <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_1' file='xmlerror' value='3063' type='xmlParserErrors' info='3063'/> + <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_2' file='xmlerror' value='3088' type='xmlParserErrors' info='3087'/> <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_3' file='xmlerror' value='1800' type='xmlParserErrors' info='1800'/> <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_1' file='xmlerror' value='3031' type='xmlParserErrors' info='3031'/> <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_2' file='xmlerror' value='3032' type='xmlParserErrors' info='3032'/> @@ -5505,9 +5536,10 @@ <enum name='XML_SCHEMA_CONTENT_ELEMENTS' file='schemasInternals' value='2' type='xmlSchemaContentType'/> <enum name='XML_SCHEMA_CONTENT_EMPTY' file='schemasInternals' value='1' type='xmlSchemaContentType'/> <enum name='XML_SCHEMA_CONTENT_MIXED' file='schemasInternals' value='3' type='xmlSchemaContentType'/> - <enum name='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' file='schemasInternals' value='5' type='xmlSchemaContentType' info='obsolete, not used'/> + <enum name='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' file='schemasInternals' value='5' type='xmlSchemaContentType' info='Obsolete'/> <enum name='XML_SCHEMA_CONTENT_SIMPLE' file='schemasInternals' value='4' type='xmlSchemaContentType'/> <enum name='XML_SCHEMA_CONTENT_UNKNOWN' file='schemasInternals' value='0' type='xmlSchemaContentType'/> + <enum name='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' file='schemasInternals' value='2001' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_EXTRA_QNAMEREF' file='schemasInternals' value='2000' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_FACET_ENUMERATION' file='schemasInternals' value='1007' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_FACET_FRACTIONDIGITS' file='schemasInternals' value='1005' type='xmlSchemaTypeType'/> @@ -5526,6 +5558,7 @@ <enum name='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' file='schemasInternals' value='21' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_ATTRIBUTE' file='schemasInternals' value='15' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_ATTRIBUTEGROUP' file='schemasInternals' value='16' type='xmlSchemaTypeType'/> + <enum name='XML_SCHEMA_TYPE_ATTRIBUTE_USE' file='schemasInternals' value='26' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_BASIC' file='schemasInternals' value='1' type='xmlSchemaTypeType' info='A built-in datatype'/> <enum name='XML_SCHEMA_TYPE_CHOICE' file='schemasInternals' value='7' type='xmlSchemaTypeType'/> <enum name='XML_SCHEMA_TYPE_COMPLEX' file='schemasInternals' value='5' type='xmlSchemaTypeType'/> @@ -6343,7 +6376,7 @@ actually an xmlCharEncoding'/> <field name='name' type='const xmlChar *' info=' schema name'/> <field name='targetNamespace' type='const xmlChar *' info=' the target namespace'/> <field name='version' type='const xmlChar *' info=''/> - <field name='id' type='const xmlChar *' info=''/> + <field name='id' type='const xmlChar *' info=' Obsolete'/> <field name='doc' type='xmlDocPtr' info=''/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> <field name='flags' type='int' info=''/> @@ -6359,8 +6392,8 @@ actually an xmlCharEncoding'/> <field name='includes' type='void *' info=' the includes, this is opaque for now'/> <field name='preserve' type='int' info=' whether to free the document'/> <field name='counter' type='int' info=' used to give ononymous components unique names'/> - <field name='idcDef' type='xmlHashTablePtr' info=''/> - <field name='volatiles' type='void *' info=' Deprecated; not used anymore.'/> + <field name='idcDef' type='xmlHashTablePtr' info=' All identity-constraint defs.'/> + <field name='volatiles' type='void *' info=' Obsolete'/> </struct> <struct name='xmlSchemaAnnot' file='schemasInternals' type='struct _xmlSchemaAnnot'> <field name='next' type='struct _xmlSchemaAnnot *' info=''/> @@ -6368,41 +6401,42 @@ actually an xmlCharEncoding'/> </struct> <typedef name='xmlSchemaAnnotPtr' file='schemasInternals' type='xmlSchemaAnnot *'/> <struct name='xmlSchemaAttribute' file='schemasInternals' type='struct _xmlSchemaAttribute'> - <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> - <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute if in a group ...'/> - <field name='name' type='const xmlChar *' info=' name of the declaration or empty if particle'/> - <field name='id' type='const xmlChar *' info=''/> - <field name='ref' type='const xmlChar *' info=' the local name of the attribute decl. if a particle'/> - <field name='refNs' type='const xmlChar *' info=' the ns URI of the attribute decl. if a particle'/> + <field name='type' type='xmlSchemaTypeType' info=''/> + <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute (not used?)'/> + <field name='name' type='const xmlChar *' info=' the name of the declaration'/> + <field name='id' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/> <field name='typeName' type='const xmlChar *' info=' the local name of the type definition'/> <field name='typeNs' type='const xmlChar *' info=' the ns URI of the type definition'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> - <field name='base' type='xmlSchemaTypePtr' info=' obsolete, not used'/> - <field name='occurs' type='int' info=''/> - <field name='defValue' type='const xmlChar *' info=''/> + <field name='base' type='xmlSchemaTypePtr' info=' Deprecated; not used'/> + <field name='occurs' type='int' info=' Deprecated; not used'/> + <field name='defValue' type='const xmlChar *' info=' The initial value of the value constraint'/> <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/> <field name='node' type='xmlNodePtr' info=''/> <field name='targetNamespace' type='const xmlChar *' info=''/> <field name='flags' type='int' info=''/> - <field name='refPrefix' type='const xmlChar *' info=''/> - <field name='defVal' type='xmlSchemaValPtr' info=''/> - <field name='refDecl' type='xmlSchemaAttributePtr' info=''/> + <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value constraint'/> + <field name='refDecl' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/> </struct> <struct name='xmlSchemaAttributeGroup' file='schemasInternals' type='struct _xmlSchemaAttributeGroup'> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute if in a group ...'/> <field name='name' type='const xmlChar *' info=''/> <field name='id' type='const xmlChar *' info=''/> - <field name='ref' type='const xmlChar *' info=''/> - <field name='refNs' type='const xmlChar *' info=''/> + <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> - <field name='attributes' type='xmlSchemaAttributePtr' info=''/> + <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/> <field name='node' type='xmlNodePtr' info=''/> <field name='flags' type='int' info=''/> <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/> - <field name='refPrefix' type='const xmlChar *' info=''/> - <field name='refItem' type='xmlSchemaAttributeGroupPtr' info=' The referenced attribute group'/> - <field name='targetNamespace' type='const xmlChar *' info=' xmlSchemaAttributeGroupPtr redef Redefinitions'/> + <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='refItem' type='xmlSchemaAttributeGroupPtr' info=' Deprecated; not used'/> + <field name='targetNamespace' type='const xmlChar *' info=''/> + <field name='attrUses' type='void *' info=''/> </struct> <typedef name='xmlSchemaAttributeGroupPtr' file='schemasInternals' type='xmlSchemaAttributeGroup *'/> <struct name='xmlSchemaAttributeLink' file='schemasInternals' type='struct _xmlSchemaAttributeLink'> @@ -6414,17 +6448,17 @@ actually an xmlCharEncoding'/> <typedef name='xmlSchemaContentType' file='schemasInternals' type='enum'/> <struct name='xmlSchemaElement' file='schemasInternals' type='struct _xmlSchemaElement'> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> - <field name='next' type='struct _xmlSchemaType *' info=' the next type if in a sequence ...'/> + <field name='next' type='struct _xmlSchemaType *' info=' Not used?'/> <field name='name' type='const xmlChar *' info=''/> - <field name='id' type='const xmlChar *' info=''/> - <field name='ref' type='const xmlChar *' info=' the local name of the element declaration if a particle'/> - <field name='refNs' type='const xmlChar *' info=' the ns URI of the element declaration if a particle'/> + <field name='id' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/> <field name='attributes' type='xmlSchemaAttributePtr' info=''/> <field name='node' type='xmlNodePtr' info=''/> - <field name='minOccurs' type='int' info=''/> - <field name='maxOccurs' type='int' info=''/> + <field name='minOccurs' type='int' info=' Deprecated; not used'/> + <field name='maxOccurs' type='int' info=' Deprecated; not used'/> <field name='flags' type='int' info=''/> <field name='targetNamespace' type='const xmlChar *' info=''/> <field name='namedType' type='const xmlChar *' info=''/> @@ -6432,26 +6466,27 @@ actually an xmlCharEncoding'/> <field name='substGroup' type='const xmlChar *' info=''/> <field name='substGroupNs' type='const xmlChar *' info=''/> <field name='scope' type='const xmlChar *' info=''/> - <field name='value' type='const xmlChar *' info=''/> - <field name='refDecl' type='struct _xmlSchemaElement *' info=' This will now be used for the substitution group affiliation'/> - <field name='contModel' type='xmlRegexpPtr' info=''/> + <field name='value' type='const xmlChar *' info=' The original value of the value constraint.'/> + <field name='refDecl' type='struct _xmlSchemaElement *' info=' This will now be used for the +substitution group affiliation'/> + <field name='contModel' type='xmlRegexpPtr' info=' Obsolete for WXS, maybe used for RelaxNG'/> <field name='contentType' type='xmlSchemaContentType' info=''/> - <field name='refPrefix' type='const xmlChar *' info=''/> - <field name='defVal' type='xmlSchemaValPtr' info=''/> - <field name='idcs' type='void *' info=''/> + <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value contraint.'/> + <field name='idcs' type='void *' info=' The identity-constraint defs'/> </struct> <typedef name='xmlSchemaElementPtr' file='schemasInternals' type='xmlSchemaElement *'/> <struct name='xmlSchemaFacet' file='schemasInternals' type='struct _xmlSchemaFacet'> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> <field name='next' type='struct _xmlSchemaFacet *' info=' the next type if in a sequence ...'/> - <field name='value' type='const xmlChar *' info=''/> - <field name='id' type='const xmlChar *' info=''/> + <field name='value' type='const xmlChar *' info=' The original value'/> + <field name='id' type='const xmlChar *' info=' Obsolete'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> <field name='node' type='xmlNodePtr' info=''/> - <field name='fixed' type='int' info=''/> + <field name='fixed' type='int' info=' XML_SCHEMAS_FACET_PRESERVE, etc.'/> <field name='whitespace' type='int' info=''/> - <field name='val' type='xmlSchemaValPtr' info=''/> - <field name='regexp' type='xmlRegexpPtr' info=''/> + <field name='val' type='xmlSchemaValPtr' info=' The compiled value'/> + <field name='regexp' type='xmlRegexpPtr' info=' The regex for patterns'/> </struct> <struct name='xmlSchemaFacetLink' file='schemasInternals' type='struct _xmlSchemaFacetLink'> <field name='next' type='struct _xmlSchemaFacetLink *' info=' the next facet link ...'/> @@ -6476,36 +6511,38 @@ actually an xmlCharEncoding'/> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> <field name='next' type='struct _xmlSchemaType *' info=' the next type if in a sequence ...'/> <field name='name' type='const xmlChar *' info=''/> - <field name='id' type='const xmlChar *' info=''/> - <field name='ref' type='const xmlChar *' info=''/> - <field name='refNs' type='const xmlChar *' info=''/> + <field name='id' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> <field name='subtypes' type='xmlSchemaTypePtr' info=''/> - <field name='attributes' type='xmlSchemaAttributePtr' info=''/> + <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/> <field name='node' type='xmlNodePtr' info=''/> - <field name='minOccurs' type='int' info=''/> - <field name='maxOccurs' type='int' info=''/> + <field name='minOccurs' type='int' info=' Deprecated; not used'/> + <field name='maxOccurs' type='int' info=' Deprecated; not used'/> <field name='flags' type='int' info=''/> <field name='contentType' type='xmlSchemaContentType' info=''/> - <field name='base' type='const xmlChar *' info=''/> - <field name='baseNs' type='const xmlChar *' info=''/> - <field name='baseType' type='xmlSchemaTypePtr' info=''/> - <field name='facets' type='xmlSchemaFacetPtr' info=''/> - <field name='redef' type='struct _xmlSchemaType *' info=' possible redefinitions for the type'/> - <field name='recurse' type='int' info=''/> - <field name='attributeUses' type='xmlSchemaAttributeLinkPtr' info=''/> + <field name='base' type='const xmlChar *' info=' Base type's local name'/> + <field name='baseNs' type='const xmlChar *' info=' Base type's target namespace'/> + <field name='baseType' type='xmlSchemaTypePtr' info=' The base type component'/> + <field name='facets' type='xmlSchemaFacetPtr' info=' Local facets'/> + <field name='redef' type='struct _xmlSchemaType *' info=' Deprecated; not used'/> + <field name='recurse' type='int' info=' Obsolete'/> + <field name='attributeUses' type='xmlSchemaAttributeLinkPtr *' info=' Deprecated; not used'/> <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/> - <field name='builtInType' type='int' info=''/> - <field name='memberTypes' type='xmlSchemaTypeLinkPtr' info=''/> - <field name='facetSet' type='xmlSchemaFacetLinkPtr' info=''/> - <field name='refPrefix' type='const xmlChar *' info=''/> - <field name='contentTypeDef' type='xmlSchemaTypePtr' info=''/> - <field name='contModel' type='xmlRegexpPtr' info=''/> + <field name='builtInType' type='int' info=' Type of built-in types.'/> + <field name='memberTypes' type='xmlSchemaTypeLinkPtr' info=' member-types if a union type.'/> + <field name='facetSet' type='xmlSchemaFacetLinkPtr' info=' All facets (incl. inherited)'/> + <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/> + <field name='contentTypeDef' type='xmlSchemaTypePtr' info=' Used for the simple content of complex types. +Could we use @subtypes for this?'/> + <field name='contModel' type='xmlRegexpPtr' info=' Holds the automaton of the content model'/> <field name='targetNamespace' type='const xmlChar *' info=''/> + <field name='attrUses' type='void *' info=''/> </struct> <struct name='xmlSchemaTypeLink' file='schemasInternals' type='struct _xmlSchemaTypeLink'> <field name='next' type='struct _xmlSchemaTypeLink *' info=' the next type link ...'/> - <field name='type' type='xmlSchemaTypePtr' info=' the linked typ'/> + <field name='type' type='xmlSchemaTypePtr' info=' the linked type'/> </struct> <typedef name='xmlSchemaTypeLinkPtr' file='schemasInternals' type='xmlSchemaTypeLink *'/> <typedef name='xmlSchemaTypePtr' file='schemasInternals' type='xmlSchemaType *'/> @@ -6520,11 +6557,11 @@ actually an xmlCharEncoding'/> <typedef name='xmlSchemaWhitespaceValueType' file='xmlschemastypes' type='enum'/> <struct name='xmlSchemaWildcard' file='schemasInternals' type='struct _xmlSchemaWildcard'> <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/> - <field name='id' type='const xmlChar *' info=''/> + <field name='id' type='const xmlChar *' info=' Deprecated; not used'/> <field name='annot' type='xmlSchemaAnnotPtr' info=''/> <field name='node' type='xmlNodePtr' info=''/> - <field name='minOccurs' type='int' info=''/> - <field name='maxOccurs' type='int' info=''/> + <field name='minOccurs' type='int' info=' Deprecated; not used'/> + <field name='maxOccurs' type='int' info=' Deprecated; not used'/> <field name='processContents' type='int' info=''/> <field name='any' type='int' info=' Indicates if the ns constraint is of ##any'/> <field name='nsSet' type='xmlSchemaWildcardNsPtr' info=' The list of allowed namespaces'/> @@ -7288,6 +7325,15 @@ actually an xmlCharEncoding'/> <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/> <arg name='size' type='int *' info='OUT: the memory length'/> </function> + <function name='htmlDocDumpMemoryFormat' file='HTMLtree' module='HTMLtree'> + <cond>defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)</cond> + <info>Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.</info> + <return type='void'/> + <arg name='cur' type='xmlDocPtr' info='the document'/> + <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/> + <arg name='size' type='int *' info='OUT: the memory length'/> + <arg name='format' type='int' info='should formatting spaces been added'/> + </function> <function name='htmlElementAllowedHere' file='HTMLparser' module='HTMLparser'> <cond>defined(LIBXML_HTML_ENABLED)</cond> <info>Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements</info> @@ -9412,7 +9458,7 @@ actually an xmlCharEncoding'/> <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/> <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/> <arg name='exp' type='xmlExpNodePtr' info='the expression'/> - <arg name='list' type='const xmlChar **' info='where to store the tokens'/> + <arg name='langList' type='const xmlChar **' info='where to store the tokens'/> <arg name='len' type='int' info='the allocated lenght of @list'/> </function> <function name='xmlExpGetStart' file='xmlregexp' module='xmlregexp'> @@ -9421,7 +9467,7 @@ actually an xmlCharEncoding'/> <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/> <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/> <arg name='exp' type='xmlExpNodePtr' info='the expression'/> - <arg name='list' type='const xmlChar **' info='where to store the tokens'/> + <arg name='tokList' type='const xmlChar **' info='where to store the tokens'/> <arg name='len' type='int' info='the allocated lenght of @list'/> </function> <function name='xmlExpIsNillable' file='xmlregexp' module='xmlregexp'> @@ -11139,7 +11185,7 @@ actually an xmlCharEncoding'/> </function> <function name='xmlNewGlobalNs' file='tree' module='legacy'> <cond>defined(LIBXML_LEGACY_ENABLED)</cond> - <info>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.</info> + <info>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</info> <return type='xmlNsPtr' info='NULL this functionality had been removed'/> <arg name='doc' type='xmlDocPtr' info='the document carrying the namespace'/> <arg name='href' type='const xmlChar *' info='the URI associated'/> @@ -11467,6 +11513,13 @@ actually an xmlCharEncoding'/> <return type='int' info='the number of byte written or -1 in case of error.'/> <arg name='out' type='xmlOutputBufferPtr' info='a buffered output'/> </function> + <function name='xmlOutputBufferCreateBuffer' file='xmlIO' module='xmlIO'> + <cond>defined(LIBXML_OUTPUT_ENABLED)</cond> + <info>Create a buffered output for the progressive saving to a xmlBuffer</info> + <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/> + <arg name='buffer' type='xmlBufferPtr' info='a xmlBufferPtr'/> + <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/> + </function> <function name='xmlOutputBufferCreateFd' file='xmlIO' module='xmlIO'> <cond>defined(LIBXML_OUTPUT_ENABLED)</cond> <info>Create a buffered output for the progressive saving to a file descriptor</info> @@ -12611,7 +12664,7 @@ actually an xmlCharEncoding'/> </function> <function name='xmlRelaxNGParse' file='relaxng' module='relaxng'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</info> + <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info> <return type='xmlRelaxNGPtr' info='the internal XML RelaxNG structure built from the resource or NULL in case of error'/> <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG parser context'/> </function> @@ -13133,6 +13186,14 @@ actually an xmlCharEncoding'/> <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/> <arg name='escape' type='xmlCharEncodingOutputFunc' info='the escaping function'/> </function> + <function name='xmlSaveToBuffer' file='xmlsave' module='xmlsave'> + <cond>defined(LIBXML_OUTPUT_ENABLED)</cond> + <info>Create a document saving context serializing to a buffer with the encoding and the options given</info> + <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/> + <arg name='buffer' type='xmlBufferPtr' info='a buffer'/> + <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/> + <arg name='options' type='int' info='a set of xmlSaveOptions'/> + </function> <function name='xmlSaveToFd' file='xmlsave' module='xmlsave'> <cond>defined(LIBXML_OUTPUT_ENABLED)</cond> <info>Create a document saving context serializing to a file descriptor with the encoding and the options given.</info> @@ -13252,9 +13313,9 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaFreeValidCtxt' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Free the resources associated to the schema validation context</info> + <info></info> <return type='void'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> </function> <function name='xmlSchemaFreeValue' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13325,12 +13386,12 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaGetValidErrors' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Get the error and warning callback informations</info> - <return type='int' info='-1 in case of error and 0 otherwise'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a XML-Schema validation context'/> - <arg name='err' type='xmlSchemaValidityErrorFunc *' info='the error function result'/> - <arg name='warn' type='xmlSchemaValidityWarningFunc *' info='the warning function result'/> - <arg name='ctx' type='void **' info='the functions context result'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='err' type='xmlSchemaValidityErrorFunc *' info=''/> + <arg name='warn' type='xmlSchemaValidityWarningFunc *' info=''/> + <arg name='ctx' type='void **' info=''/> </function> <function name='xmlSchemaInitTypes' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13346,9 +13407,9 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaIsValid' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Check if any error was detected during validation.</info> - <return type='int' info='1 if valid so far, 0 if errors were detected, and -1 in case of internal error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> </function> <function name='xmlSchemaNewDocParserCtxt' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13397,29 +13458,29 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaNewValidCtxt' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Create an XML Schemas validation context based on the given schema.</info> - <return type='xmlSchemaValidCtxtPtr' info='the validation context or NULL in case of error'/> - <arg name='schema' type='xmlSchemaPtr' info='a precompiled XML Schemas'/> + <info></info> + <return type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='schema' type='xmlSchemaPtr' info=''/> </function> <function name='xmlSchemaParse' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change</info> + <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info> <return type='xmlSchemaPtr' info='the internal XML Schema structure built from the resource or NULL in case of error'/> <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema validation context'/> </function> <function name='xmlSchemaSAXPlug' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</info> - <return type='xmlSchemaSAXPlugPtr' info='a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='sax' type='xmlSAXHandlerPtr *' info='a pointer to the original xmlSAXHandlerPtr'/> - <arg name='user_data' type='void **' info='a pointer to the original SAX user data pointer'/> + <info></info> + <return type='xmlSchemaSAXPlugPtr' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='sax' type='xmlSAXHandlerPtr *' info=''/> + <arg name='user_data' type='void **' info=''/> </function> <function name='xmlSchemaSAXUnplug' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</info> - <return type='int' info='0 in case of success and -1 in case of failure.'/> - <arg name='plug' type='xmlSchemaSAXPlugPtr' info='a data structure returned by xmlSchemaSAXPlug'/> + <info></info> + <return type='int' info=''/> + <arg name='plug' type='xmlSchemaSAXPlugPtr' info=''/> </function> <function name='xmlSchemaSetParserErrors' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13430,29 +13491,37 @@ actually an xmlCharEncoding'/> <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning callback'/> <arg name='ctx' type='void *' info='contextual data for the callbacks'/> </function> - <function name='xmlSchemaSetValidErrors' file='xmlschemas' module='xmlschemas'> + <function name='xmlSchemaSetParserStructuredErrors' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Set the error and warning callback informations</info> + <info>Set the structured error callback</info> <return type='void'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='err' type='xmlSchemaValidityErrorFunc' info='the error function'/> - <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning function'/> + <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema parser context'/> + <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/> <arg name='ctx' type='void *' info='the functions context'/> </function> + <function name='xmlSchemaSetValidErrors' file='xmlschemas' module='xmlschemas'> + <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info></info> + <return type='void'/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='err' type='xmlSchemaValidityErrorFunc' info=''/> + <arg name='warn' type='xmlSchemaValidityWarningFunc' info=''/> + <arg name='ctx' type='void *' info=''/> + </function> <function name='xmlSchemaSetValidOptions' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Sets the options to be used during the validation.</info> - <return type='int' info='0 in case of success, -1 in case of an API error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='options' type='int' info='a combination of xmlSchemaValidOption'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='options' type='int' info=''/> </function> <function name='xmlSchemaSetValidStructuredErrors' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Set the structured error callback</info> + <info></info> <return type='void'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/> - <arg name='ctx' type='void *' info='the functions context'/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='serror' type='xmlStructuredErrorFunc' info=''/> + <arg name='ctx' type='void *' info=''/> </function> <function name='xmlSchemaValPredefTypeNode' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13474,16 +13543,16 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaValidCtxtGetOptions' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Get the validation context options.</info> - <return type='int' info='the option combination or -1 on error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> </function> <function name='xmlSchemaValidateDoc' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Validate a document tree in memory.</info> - <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='doc' type='xmlDocPtr' info='a parsed document tree'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='instance' type='xmlDocPtr' info=''/> </function> <function name='xmlSchemaValidateFacet' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13507,11 +13576,11 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaValidateFile' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</info> - <return type='int' info='0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='filename' type='const char *' info='the URI of the instance'/> - <arg name='options' type='int' info='a future set of options, currently unused'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='filename' type='const char *' info=''/> + <arg name='options' type='int' info=''/> </function> <function name='xmlSchemaValidateLengthFacet' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13545,10 +13614,10 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaValidateOneElement' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Validate a branch of a tree, starting with the given @elem.</info> - <return type='int' info='0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='elem' type='xmlNodePtr' info='an element node'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='elem' type='xmlNodePtr' info=''/> </function> <function name='xmlSchemaValidatePredefinedType' file='xmlschemastypes' module='xmlschemastypes'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13560,13 +13629,13 @@ actually an xmlCharEncoding'/> </function> <function name='xmlSchemaValidateStream' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</info> - <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/> - <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/> - <arg name='input' type='xmlParserInputBufferPtr' info='the input to use for reading the data'/> - <arg name='enc' type='xmlCharEncoding' info='an optional encoding information'/> - <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler for the resulting events'/> - <arg name='user_data' type='void *' info='the context to provide to the SAX handler.'/> + <info></info> + <return type='int' info=''/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info=''/> + <arg name='input' type='xmlParserInputBufferPtr' info=''/> + <arg name='enc' type='xmlCharEncoding' info=''/> + <arg name='sax' type='xmlSAXHandlerPtr' info=''/> + <arg name='user_data' type='void *' info=''/> </function> <functype name='xmlSchemaValidityErrorFunc' file='xmlschemas' module='xmlschemas'> <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond> @@ -13971,7 +14040,7 @@ actually an xmlCharEncoding'/> <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/> </function> <function name='xmlStrEqual' file='xmlstring' module='xmlstring'> - <info>Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual()</info> + <info>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</info> <return type='int' info='1 if they are equal, 0 if they are different'/> <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/> <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/> @@ -14047,7 +14116,7 @@ actually an xmlCharEncoding'/> </function> <function name='xmlStreamPush' file='pattern' module='pattern'> <cond>defined(LIBXML_PATTERN_ENABLED)</cond> - <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info> + <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</info> <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/> <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> <arg name='name' type='const xmlChar *' info='the current name'/> @@ -14055,12 +14124,27 @@ actually an xmlCharEncoding'/> </function> <function name='xmlStreamPushAttr' file='pattern' module='pattern'> <cond>defined(LIBXML_PATTERN_ENABLED)</cond> - <info>Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.</info> + <info>Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</info> <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/> <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> <arg name='name' type='const xmlChar *' info='the current name'/> <arg name='ns' type='const xmlChar *' info='the namespace name'/> </function> + <function name='xmlStreamPushNode' file='pattern' module='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</info> + <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/> + <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/> + <arg name='name' type='const xmlChar *' info='the current name'/> + <arg name='ns' type='const xmlChar *' info='the namespace name'/> + <arg name='nodeType' type='int' info='the type of the node being pushed'/> + </function> + <function name='xmlStreamWantsAnyNode' file='pattern' module='pattern'> + <cond>defined(LIBXML_PATTERN_ENABLED)</cond> + <info>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</info> + <return type='int' info='1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.'/> + <arg name='streamCtxt' type='xmlStreamCtxtPtr' info='the stream context'/> + </function> <function name='xmlStringCurrentChar' file='parserInternals' module='parserInternals'> <info>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</info> <return type='int' info='the current char value and its length'/> @@ -14115,18 +14199,18 @@ actually an xmlCharEncoding'/> <arg name='len' type='int' info='the max comparison length'/> </function> <function name='xmlStrncat' file='xmlstring' module='xmlstring'> - <info>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add.</info> + <info>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len < 0 then this is an API error and NULL will be returned.</info> <return type='xmlChar *' info='a new xmlChar *, the original @cur is reallocated if needed and should not be freed'/> <arg name='cur' type='xmlChar *' info='the original xmlChar * array'/> <arg name='add' type='const xmlChar *' info='the xmlChar * array added'/> <arg name='len' type='int' info='the length of @add'/> </function> <function name='xmlStrncatNew' file='xmlstring' module='xmlstring'> - <info>same as xmlStrncat, but creates a new string. The original two strings are not freed.</info> + <info>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is < 0 then the length will be calculated automatically.</info> <return type='xmlChar *' info='a new xmlChar * or NULL'/> <arg name='str1' type='const xmlChar *' info='first xmlChar string'/> <arg name='str2' type='const xmlChar *' info='second xmlChar string'/> - <arg name='len' type='int' info='the len of @str2'/> + <arg name='len' type='int' info='the len of @str2 or < 0'/> </function> <function name='xmlStrncmp' file='xmlstring' module='xmlstring'> <info>a strncmp for xmlChar's</info> @@ -14546,13 +14630,13 @@ actually an xmlCharEncoding'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> </function> <function name='xmlTextReaderReadInnerXml' file='xmlreader' module='xmlreader'> - <cond>defined(LIBXML_READER_ENABLED)</cond> + <cond>defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)</cond> <info>Reads the contents of the current node, including child nodes and markup.</info> <return type='xmlChar *' info='a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> </function> <function name='xmlTextReaderReadOuterXml' file='xmlreader' module='xmlreader'> - <cond>defined(LIBXML_READER_ENABLED)</cond> + <cond>defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)</cond> <info>Reads the contents of the current node, including child nodes and markup.</info> <return type='xmlChar *' info='a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> @@ -14585,11 +14669,19 @@ actually an xmlCharEncoding'/> </function> <function name='xmlTextReaderSchemaValidate' file='xmlreader' module='xmlreader'> <cond>defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)</cond> - <info>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). if @xsd is NULL, then RelaxNG validation is desactivated.</info> - <return type='int' info='0 in case the schemas validation could be (des)activated and -1 in case of error.'/> + <info>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</info> + <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> <arg name='xsd' type='const char *' info='the path to a W3C XSD schema or NULL'/> </function> + <function name='xmlTextReaderSchemaValidateCtxt' file='xmlreader' module='xmlreader'> + <cond>defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)</cond> + <info>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</info> + <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/> + <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> + <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the XML Schema validation context or NULL'/> + <arg name='options' type='int' info='options (not used yet)'/> + </function> <function name='xmlTextReaderSetErrorHandler' file='xmlreader' module='xmlreader'> <cond>defined(LIBXML_READER_ENABLED)</cond> <info>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</info> @@ -16436,7 +16528,7 @@ actually an xmlCharEncoding'/> <info>Build/extend a list of potential children allowed by the content tree</info> <return type='int' info='the number of element in the list, or -1 in case of error.'/> <arg name='ctree' type='xmlElementContent *' info='an element content tree'/> - <arg name='list' type='const xmlChar **' info='an array to store the list of child names'/> + <arg name='names' type='const xmlChar **' info='an array to store the list of child names'/> <arg name='len' type='int *' info='a pointer to the number of element in the list'/> <arg name='max' type='int' info='the size of the array'/> </function> diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa index e09ad85..0b6082a 100644 --- a/doc/libxml2.xsa +++ b/doc/libxml2.xsa @@ -8,45 +8,21 @@ </vendor> <product id="libxml2"> <name>libxml2</name> - <version>2.6.21</version> - <last-release> Sep 4 2005</last-release> + <version>2.6.22</version> + <last-release> Sep 12 2005</last-release> <info-url>http://xmlsoft.org/</info-url> - <changes> - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, - - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs. - - improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation. - - documentation: xmllint man page had --nonet duplicated + <changes> - build fixes: compile without schematron (Stéphane Bidoul) + - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik) + - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik). + - documentation: generation of gtk-doc like docs, integration with + devhelp. </changes> </product> diff --git a/doc/namespaces.html b/doc/namespaces.html index d2c9be3..b4936c7 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by +</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by recognizing namespace constructs in the input, and does namespace lookup automatically when building the DOM tree. A namespace declaration is associated with an in-memory structure and all elements or attributes within diff --git a/doc/news.html b/doc/news.html index 8916d49..29af068 100644 --- a/doc/news.html +++ b/doc/news.html @@ -7,164 +7,202 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want +</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Items not finished and worked on, get in touch with the list if you want to help those</p><ul><li>More testing on RelaxNG</li> <li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML Schemas</a></li> </ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits -to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.22: Sep 12 2005</h3><ul><li>build fixes: compile without schematron (Stéphane Bidoul)</li> +to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p>There is the list of public releases:</p><h3>2.6.23: Jan 5 2006</h3><ul><li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), + </li> + <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese)</li> + <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath + pattern based evaluation fixes (Kasimier)</li> + <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards), </li> + <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), + </li> +</ul><h3>2.6.22: Sep 12 2005</h3><ul><li>build fixes: compile without schematron (Stéphane Bidoul)</li> <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) - </li> - <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik).</li> + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li> + <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik).</li> <li>documentation: generation of gtk-doc like docs, integration with - devhelp.</li> + devhelp.</li> </ul><h3>2.6.21: Sep 4 2005</h3><ul><li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, </li> + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS,</li> <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs.</li> + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs.</li> <li>improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation.</li> + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation.</li> <li>documentation: xmllint man page had --nonet duplicated</li> -</ul><h3>2.6.20: Jul 10 2005</h3><ul><li> build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. - </li> - <li> bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). - </li> - <li> improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. - </li> -</ul><h3>2.6.19: Apr 02 2005</h3><ul><li> build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4</li> - <li> bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time</li> - <li> improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling.</li> +</ul><h3>2.6.20: Jul 10 2005</h3><ul><li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution.</li> + <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William).</li> + <li>improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support.</li> +</ul><h3>2.6.19: Apr 02 2005</h3><ul><li>build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4</li> + <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time</li> + <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling.</li> <li></li> -</ul><h3>2.6.18: Mar 13 2005</h3><ul><li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> - <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li> - <li> improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik), </li> - <li> Documentation: Wiki support (Joel Reed) -</li></ul><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol)</li> +</ul><h3>2.6.18: Mar 13 2005</h3><ul><li>build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> + <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer).</li> + <li>improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik),</li> + <li>Documentation: Wiki support (Joel Reed)</li> +</ul><h3>2.6.17: Jan 16 2005</h3><ul><li>build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol)</li> <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. - </li> - <li>improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). - </li> - <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer)</li> - <li>documentation: site improvement (John Fleck), FAQ entries (William).</li> + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing.</li> + <li>improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize().</li> + <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer)</li> + <li>documentation: site improvement (John Fleck), FAQ entries + (William).</li> </ul><h3>2.6.16: Nov 10 2004</h3><ul><li>general hardening and bug fixing crossing all the API based on new automated regression testing</li> <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li> @@ -174,7 +212,7 @@ to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p><p> <li>documentation: fix to xmllint man page, some API function descritpion were updated.</li> <li>improvements: DTD validation APIs provided at the Python level (Brent - Hendricks) </li> + Hendricks)</li> </ul><h3>2.6.15: Oct 27 2004</h3><ul><li>security fixes on the nanoftp and nanohttp modules</li> <li>build fixes: xmllint detection bug in configure, building outside the source tree (Thomas Fitzsimmons)</li> diff --git a/doc/python.html b/doc/python.html index e16ca53..1659122 100644 --- a/doc/python.html +++ b/doc/python.html @@ -33,8 +33,9 @@ or libxslt wrappers or bindings:</p><ul><li><a href="http://libxmlplusplus.sourc libxml2</a> with Kylix, Delphi and other Pascal compilers.</li> <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 implementation for Kylix2/D5/D6 from Borland.</li> - <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings for Ruby</a> and - libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module + <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings + for Ruby</a> and libxml2 bindings are also available in Ruby through the + <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module maintained by Tobias Peters.</li> <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for Tcl</a>.</li> @@ -49,17 +50,15 @@ or libxslt wrappers or bindings:</p><ul><li><a href="http://libxmlplusplus.sourc osax</a>. This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT. Also includes commands for Property-lists (Apple's fast lookup table XML format.)</li> - <li>Francesco Montorsi developped -<a href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a> + <li>Francesco Montorsi developped <a href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a> wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.</li> </ul><p>The distribution includes a set of Python bindings, which are guaranteed to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.</p><p>Note that some of the Python purist dislike the default set of Python -bindings, rather than complaining I suggest they have a look at -<a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 and libxslt</a> and -<a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn Faassen</a> -complete those.</p><p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a> +bindings, rather than complaining I suggest they have a look at <a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 +and libxslt</a> and <a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn +Faassen</a> complete those.</p><p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a> maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port of the Python bindings</a>.</p><p>Note to people interested in building bindings, the API is formalized as <a href="libxml2-api.xml">an XML API description file</a> which allows to diff --git a/doc/site.xsl b/doc/site.xsl index 29e8aaf..8368a73 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -318,7 +318,7 @@ </form> <ul><!-- style="margin-left: -1em" --> <li><a href="index.html">Home</a></li> - <li><a href="http://xmlsoft.org/wiki">Wiki</a></li> + <!--<li><a href="http://xmlsoft.org/wiki">Wiki</a></li> --> <li><a href="html/index.html">Reference Manual</a></li> <xsl:for-each select="/html/body/h2"> <xsl:variable name="filename"> diff --git a/doc/xml.html b/doc/xml.html index 638d1c9..6ecd81c 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -3,7 +3,7 @@ <html> <head> <title>The XML C parser and toolkit of Gnome</title> - <meta name="GENERATOR" content="amaya 5.1"> + <meta name="GENERATOR" content="amaya 8.5, see http://www.w3.org/Amaya/"> <meta http-equiv="Content-Type" content="text/html"> </head> @@ -124,7 +124,6 @@ benchmark</a> on sourceforge February 2004 (smaller is better):</p> alt="benchmark results for Expat Xerces libxml2 Oracle and Sun toolkits"></p> --------------> - <p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p> <h2><a name="Introducti">Introduction</a></h2> @@ -315,41 +314,49 @@ libxml2</p> <p><code>CFLAGS=`xml2-config --cflags`</code></p> <p><code>LIBS=`xml2-config --libs`</code></p> </li> - <li><em>I want to install my own copy of libxml2 in my home directory and link - my programs against it, but it doesn't work</em> + <li><em>I want to install my own copy of libxml2 in my home directory and + link my programs against it, but it doesn't work</em> <p>There are many different ways to accomplish this. Here is one way to - do this under Linux. Suppose your home directory is <code>/home/user. - </code>Then:</p> - <ul><li>Create a subdirectory, let's call it <code>myxml</code></li> + do this under Linux. Suppose your home directory is <code>/home/user. + </code>Then:</p> + <ul> + <li>Create a subdirectory, let's call it <code>myxml</code></li> <li>unpack the libxml2 distribution into that subdirectory</li> - <li>chdir into the unpacked distribution (<code>/home/user/myxml/libxml2 - </code>)</li> + <li>chdir into the unpacked distribution + (<code>/home/user/myxml/libxml2 </code>)</li> <li>configure the library using the "<code>--prefix</code>" switch, - specifying an installation subdirectory in <code>/home/user/myxml</code>, - e.g. - <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other - configuration options}</p></li> + specifying an installation subdirectory in + <code>/home/user/myxml</code>, e.g. + <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other + configuration options}</p> + </li> <li>now run <code>make</code> followed by <code>make install</code></li> <li>At this point, the installation subdirectory contains the complete - "private" include files, library files and binary program files (e.g. - xmllint), located in - <p> <code>/home/user/myxml/xmlinst/lib, /home/user/myxml/xmlinst/include - </code> and <code> /home/user/myxml/xmlinst/bin</code></p> - respectively.</li> - <li>In order to use this "private" library, you should first add it - to the beginning of your default PATH (so that your own private - program files such as xmllint will be used instead of the normal - system ones). To do this, the Bash command would be - <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p></li> + "private" include files, library files and binary program files (e.g. + xmllint), located in + <p><code>/home/user/myxml/xmlinst/lib, + /home/user/myxml/xmlinst/include </code> and <code> + /home/user/myxml/xmlinst/bin</code></p> + respectively.</li> + <li>In order to use this "private" library, you should first add it to + the beginning of your default PATH (so that your own private program + files such as xmllint will be used instead of the normal system + ones). To do this, the Bash command would be + <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p> + </li> <li>Now suppose you have a program <code>test1.c</code> that you would - like to compile with your "private" library. Simply compile it - using the command <p><code>gcc `xml2-config --cflags --libs` -o test - test.c</code></p> Note that, because your PATH has been set with <code> - /home/user/myxml/xmlinst/bin</code> at the beginning, the - xml2-config program which you just installed will be used instead of - the system default one, and this will <em>automatically</em> get the - correct libraries linked with your program.</li></ul> - </li><p/> + like to compile with your "private" library. Simply compile it using + the command + <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p> + Note that, because your PATH has been set with <code> + /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config + program which you just installed will be used instead of the system + default one, and this will <em>automatically</em> get the correct + libraries linked with your program.</li> + </ul> + </li> + + <p></p> <li><em>xmlDocDump() generates output on one line.</em> <p>Libxml2 will not <strong>invent</strong> spaces in the content of a document since <strong>all spaces in the content of a document are @@ -663,14 +670,17 @@ href="http://xmlsoft.org/sources/win32/">win32</a> directory.</p> maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides binaries</a>.</li> - <li>Blastwave provides - <a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a>.</li> + <li>Blastwave provides <a + href="http://www.blastwave.org/packages.php/libxml2">Solaris + binaries</a>.</li> <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> provides <a href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X binaries</a>.</li> <li>The HP-UX porting center provides <a href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li> - <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as patr of their GNOME packages</li> + <li>Bull provides precompiled <a + href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as + patr of their GNOME packages</li> </ul> <p>If you know other supported binary ports, please <a @@ -716,176 +726,223 @@ to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p> <p>There is the list of public releases:</p> +<h3>2.6.23: Jan 5 2006</h3> +<ul> + <li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows + (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas), + --with-minimum compilation fixes (William Brack), error case handling fix + on Solaris (Albert Chin), don't use 'list' as parameter name reported by + Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin), + MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick Jones), + </li> + <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose + (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring + parsing code (Bjorn Reese)</li> + <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack), + combinatory explosion and performances in regexp code, leak in + xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo + Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik), + XPath pattern based evaluation bugs (DV & Kasimier), + xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in + xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of + vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF + split problem (William), issues with non-namespaced attributes in + xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards), + HTML parsing of script, Python must not output to stdout (Nic Ferrier), + exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype + totalDigits bug (Kasimier Buchcik), error handling when writing to an + xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi + Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix + XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier), + fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml + (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of + runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs + (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair), + compilation and build fixes (Michael Day), removed dependancies on + xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath + pattern based evaluation fixes (Kasimier)</li> + <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier + Buchcik), node copy checks and fix for attribute (Rob Richards), counted + transition bug in regexps, ctxt->standalone = -2 to indicate no + standalone attribute was found, add xmlSchemaSetParserStructuredErrors() + (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API + (Kasimier), handle gzipped HTTP resources (Gary Coady), add + htmlDocDumpMemoryFormat. (Rob Richards), </li> + <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save + function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik), + </li> +</ul> + <h3>2.6.22: Sep 12 2005</h3> <ul> <li>build fixes: compile without schematron (Stéphane Bidoul)</li> <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i, - CDATA push parser bug, xmlElemDump problem with XHTML1 doc, - XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, - fix some output formatting for meta element (Rob Richards), - script and style XHTML1 serialization (David Madore), Attribute - derivation fixups in XSD (Kasimier Buchcik), better IDC error - reports (Kasimier Buchcik) - </li> - <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), - add XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements - preparing for derive (Kasimier Buchcik).</li> + CDATA push parser bug, xmlElemDump problem with XHTML1 doc, + XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some + output formatting for meta element (Rob Richards), script and style + XHTML1 serialization (David Madore), Attribute derivation fixups in XSD + (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li> + <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add + XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for + derive (Kasimier Buchcik).</li> <li>documentation: generation of gtk-doc like docs, integration with - devhelp.</li> + devhelp.</li> </ul> + <h3>2.6.21: Sep 4 2005</h3> <ul> <li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling - convention problems on Windows (Marcus Boerger), cleanups based on - Linus' sparse tool, update of win32/configure.js (Rob Richards), - remove warnings on Windows(Marcus Boerger), compilation without SAX1, - detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew - W. Nosenko), compilation/link with threads and old gcc, compile - problem by C370 on Z/OS, </li> + convention problems on Windows (Marcus Boerger), cleanups based on Linus' + sparse tool, update of win32/configure.js (Rob Richards), remove warnings + on Windows(Marcus Boerger), compilation without SAX1, detection of the + Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko), + compilation/link with threads and old gcc, compile problem by C370 on + Z/OS,</li> <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8 - bug (Jiri Netolicky), XPath NaN compare bug (William Brack), - htmlParseScript potential bug, Schemas regexp handling of spaces, - Base64 Schemas comparisons NIST passes, automata build error xsd:all, - xmlGetNodePath for namespaced attributes (Alexander Pohoyda), - xmlSchemas foreign namespaces handling, XML Schemas facet comparison - (Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier - Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model - group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI - composition (William), xs:anyType in Schemas (Kasimier), Python resolver - emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr - Clapa), trying to fix the file path/URI conversion, - xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak - (Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism - detection problem, XInclude bug, Schemas context type (Dean Hill), - validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces - (Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug, - error in encoding handling, xmlGetLineNo fixes, bug on entities handling, - entity name extraction in error handling with XInclude, text nodes - in HTML body tags (Gary Coady), xml:id and IDness at the treee level - fixes, XPath streaming patterns bugs.</li> + bug (Jiri Netolicky), XPath NaN compare bug (William Brack), + htmlParseScript potential bug, Schemas regexp handling of spaces, Base64 + Schemas comparisons NIST passes, automata build error xsd:all, + xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas + foreign namespaces handling, XML Schemas facet comparison (Kupriyanov + Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml: + namespace ahndling in Schemas (Kasimier), empty model group in Schemas + (Kasimier), wilcard in Schemas (Kasimier), URI composition (William), + xs:anyType in Schemas (Kasimier), Python resolver emmitting error + messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to + fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob + Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8 + serialization, streaming XPath, Schemas determinism detection problem, + XInclude bug, Schemas context type (Dean Hill), validation fix (Derek + Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas + type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling, + xmlGetLineNo fixes, bug on entities handling, entity name extraction in + error handling with XInclude, text nodes in HTML body tags (Gary Coady), + xml:id and IDness at the treee level fixes, XPath streaming patterns + bugs.</li> <li>improvements: structured interfaces for schemas and RNG error reports - (Marcus Boerger), optimization of the char data inner loop parsing - (thanks to Behdad Esfahbod for the idea), schematron validation - though not finished yet, xmlSaveOption to omit XML declaration, - keyref match error reports (Kasimier), formal expression handling - code not plugged yet, more lax mode for the HTML parser, - parser XML_PARSE_COMPACT option for text nodes allocation.</li> + (Marcus Boerger), optimization of the char data inner loop parsing + (thanks to Behdad Esfahbod for the idea), schematron validation though + not finished yet, xmlSaveOption to omit XML declaration, keyref match + error reports (Kasimier), formal expression handling code not plugged + yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option + for text nodes allocation.</li> <li>documentation: xmllint man page had --nonet duplicated</li> </ul> + <h3>2.6.20: Jul 10 2005</h3> <ul> - <li> build fixes: Windows build (Rob Richards), Mingw compilation (Igor - Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and - andriy@google.com), use gcc weak references to pthread to avoid the - pthread dependancy on Linux, compilation problem (Steve Nairn), - compiling of subset (Morten Welinder), IPv6/ss_family compilation - (William Brack), compilation when disabling parts of the library, - standalone test distribution. - </li> - <li> bug fixes: bug in lang(), memory cleanup on errors (William Brack), - HTTP query strings (Aron Stansvik), memory leak in DTD (William), - integer overflow in XPath (William), nanoftp buffer size, pattern - "." apth fixup (Kasimier), leak in tree reported by Malcolm Rowe, - replaceNode patch (Brent Hendricks), CDATA with NULL content - (Mark Vakoc), xml:base fixup on XInclude (William), pattern - fixes (William), attribute bug in exclusive c14n (Aleksey Sanin), - xml:space and xml:lang with SAX2 (Rob Richards), namespace - trouble in complex parsing (Malcolm Rowe), XSD type QNames fixes - (Kasimier), XPath streaming fixups (William), RelaxNG bug (Rob Richards), - Schemas for Schemas fixes (Kasimier), removal of ID (Rob Richards), - a small RelaxNG leak, HTML parsing in push mode bug (James Bursa), - failure to detect UTF-8 parsing bugs in CDATA sections, areBlanks() - heuristic failure, duplicate attributes in DTD bug (William). - </li> - <li> improvements: lot of work on Schemas by Kasimier Buchcik both on - conformance and streaming, Schemas validation messages (Kasimier - Buchcik, Matthew Burgess), namespace removal at the python level - (Brent Hendricks), Update to new Schemas regression tests from - W3C/Nist (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation - of xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), - standalone test framework and programs, new DOM import APIs - xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode(), extension of xmllint capabilities for - SAX and Schemas regression tests, xmlStopParser() available in - pull mode too, ienhancement to xmllint --shell namespaces support, - Windows port of the standalone testing tools (Kasimier and William), - xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() - SAX Schemas APIs, Schemas xmlReader support. - </li> + <li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor + Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and + andriy@google.com), use gcc weak references to pthread to avoid the + pthread dependancy on Linux, compilation problem (Steve Nairn), compiling + of subset (Morten Welinder), IPv6/ss_family compilation (William Brack), + compilation when disabling parts of the library, standalone test + distribution.</li> + <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack), + HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer + overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup + (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch + (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup + on XInclude (William), pattern fixes (William), attribute bug in + exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob + Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type + QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug + (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob + Richards), a small RelaxNG leak, HTML parsing in push mode bug (James + Bursa), failure to detect UTF-8 parsing bugs in CDATA sections, + areBlanks() heuristic failure, duplicate attributes in DTD bug + (William).</li> + <li>improvements: lot of work on Schemas by Kasimier Buchcik both on + conformance and streaming, Schemas validation messages (Kasimier Buchcik, + Matthew Burgess), namespace removal at the python level (Brent + Hendricks), Update to new Schemas regression tests from W3C/Nist + (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of + xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert), + standalone test framework and programs, new DOM import APIs + xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and + xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and + Schemas regression tests, xmlStopParser() available in pull mode too, + ienhancement to xmllint --shell namespaces support, Windows port of the + standalone testing tools (Kasimier and William), + xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX + Schemas APIs, Schemas xmlReader support.</li> </ul> + <h3>2.6.19: Apr 02 2005</h3> <ul> - <li> build fixes: drop .la from RPMs, --with-minimum build fix (William - Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with - AIX 5.3 compiler, fixed elfgcchack.h generation and PLT reduction - code on Linux/ELF/gcc4</li> - <li> bug fixes: schemas type decimal fixups (William Brack), xmmlint return - code (Gerry Murphy), small schemas fixes (Matthew Burgess and - GUY Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey - Sanin), segfault in Schemas (Kasimier Buchcik), Schemas attribute - validation (Kasimier), Prop related functions and xmlNewNodeEatName - (Rob Richards), HTML serialization of name attribute on a elements, - Python error handlers leaks and improvement (Brent Hendricks), - uninitialized variable in encoding code, Relax-NG validation bug, - potential crash if gnorableWhitespace is NULL, xmlSAXParseDoc and - xmlParseDoc signatures, switched back to assuming UTF-8 in case - no encoding is given at serialization time</li> - <li> improvements: lot of work on Schemas by Kasimier Buchcik on facets - checking and also mixed handling.</li> + <li>build fixes: drop .la from RPMs, --with-minimum build fix (William + Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX + 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on + Linux/ELF/gcc4</li> + <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return + code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY + Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin), + segfault in Schemas (Kasimier Buchcik), Schemas attribute validation + (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards), + HTML serialization of name attribute on a elements, Python error handlers + leaks and improvement (Brent Hendricks), uninitialized variable in + encoding code, Relax-NG validation bug, potential crash if + gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures, + switched back to assuming UTF-8 in case no encoding is given at + serialization time</li> + <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets + checking and also mixed handling.</li> <li></li> </ul> + <h3>2.6.18: Mar 13 2005</h3> <ul> - <li> build fixes: warnings (Peter Breitenlohner), testapi.c generation, - Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), - some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> - <li> bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and - xmlreader stopping on non-fatal errors, thread support for dictionnaries - reference counting (Gary Coady), internal subset and push problem, - URL saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python - paths fixup (Stephane Bidoul), xmlGetNodePath and namespaces, - xmlSetNsProp fix (Mike Hommey), warning should not count as error - (William Brack), xmlCreatePushParser empty chunk, XInclude parser - flags (William), cleanup FTP and HTTP code to reuse the uri parsing - and IPv6 (William), xmlTextWriterStartAttributeNS fix (Rob Richards), - XMLLINT_INDENT being empty (William), xmlWriter bugs (Rob Richards), - multithreading on Windows (Rich Salz), xmlSearchNsByHref fix (Kasimier), - Python binding leak (Brent Hendricks), aliasing bug exposed by gcc4 - on s390, xmlTextReaderNext bug (Rob Richards), Schemas decimal type - fixes (William Brack), xmlByteConsumed static buffer (Ben Maurer).</li> - <li> improvement: speedup parsing comments and DTDs, dictionnary support for - hash tables, Schemas Identity constraints (Kasimier), streaming XPath - subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical - values handling (Kasimier), add xmlTextReaderByteConsumed (Aron - Stansvik), </li> - <li> Documentation: Wiki support (Joel Reed) + <li>build fixes: warnings (Peter Breitenlohner), testapi.c generation, + Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed), + some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li> + <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and + xmlreader stopping on non-fatal errors, thread support for dictionnaries + reference counting (Gary Coady), internal subset and push problem, URL + saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths + fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix + (Mike Hommey), warning should not count as error (William Brack), + xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup + FTP and HTTP code to reuse the uri parsing and IPv6 (William), + xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being + empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows + (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent + Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug + (Rob Richards), Schemas decimal type fixes (William Brack), + xmlByteConsumed static buffer (Ben Maurer).</li> + <li>improvement: speedup parsing comments and DTDs, dictionnary support for + hash tables, Schemas Identity constraints (Kasimier), streaming XPath + subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical + values handling (Kasimier), add xmlTextReaderByteConsumed (Aron + Stansvik),</li> + <li>Documentation: Wiki support (Joel Reed)</li> </ul> + <h3>2.6.17: Jan 16 2005</h3> <ul> - <li>build fixes: Windows, warnings removal (William Brack), - maintainer-clean dependency(William), build in a different directory - (William), fixing --with-minimum configure build (William), BeOS - build (Marcin Konicki), Python-2.4 detection (William), compilation - on AIX (Dan McNichol)</li> + <li>build fixes: Windows, warnings removal (William Brack), + maintainer-clean dependency(William), build in a different directory + (William), fixing --with-minimum configure build (William), BeOS build + (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan + McNichol)</li> <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile() - to use the catalog(s), loop on output (William Brack), XPath memory leak, - ID deallocation problem (Steve Shepard), debugDumpNode crash (William), - warning not using error callback (William), xmlStopParser bug (William), - UTF-16 with BOM on DTDs (William), namespace bug on empty elements - in push mode (Rob Richards), line and col computations fixups (Aleksey - Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), - patterns with too many steps, bug in RNG choice optimization, line - number sometimes missing. - </li> - <li>improvements: XSD Schemas (Kasimier Buchcik), python generator (William), - xmlUTF8Strpos speedup (William), unicode Python strings (William), - XSD error reports (Kasimier Buchcik), Python __str__ call serialize(). - </li> - <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber - for the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs - (mostly Joel Reed), error extraction API from regexps, new XMLSave - option for format (Phil Shafer)</li> - <li>documentation: site improvement (John Fleck), FAQ entries (William).</li> + to use the catalog(s), loop on output (William Brack), XPath memory leak, + ID deallocation problem (Steve Shepard), debugDumpNode crash (William), + warning not using error callback (William), xmlStopParser bug (William), + UTF-16 with BOM on DTDs (William), namespace bug on empty elements in + push mode (Rob Richards), line and col computations fixups (Aleksey + Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William), + patterns with too many steps, bug in RNG choice optimization, line number + sometimes missing.</li> + <li>improvements: XSD Schemas (Kasimier Buchcik), python generator + (William), xmlUTF8Strpos speedup (William), unicode Python strings + (William), XSD error reports (Kasimier Buchcik), Python __str__ call + serialize().</li> + <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for + the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel + Reed), error extraction API from regexps, new XMLSave option for format + (Phil Shafer)</li> + <li>documentation: site improvement (John Fleck), FAQ entries + (William).</li> </ul> <h3>2.6.16: Nov 10 2004</h3> @@ -899,7 +956,7 @@ to the <a href="http://cvs.gnome.org/viewcvs/libxml2/">CVS</a> code base.</p> <li>documentation: fix to xmllint man page, some API function descritpion were updated.</li> <li>improvements: DTD validation APIs provided at the Python level (Brent - Hendricks) </li> + Hendricks)</li> </ul> <h3>2.6.15: Oct 27 2004</h3> @@ -2443,10 +2500,9 @@ or libxslt wrappers or bindings:</p> <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 implementation for Kylix2/D5/D6 from Borland.</li> - <li>There is <a - href="http://rubyforge.org/projects/xml-tools/">bindings for Ruby</a> and - libxml2 bindings are also available in Ruby through the <a - href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module + <li>There is <a href="http://rubyforge.org/projects/xml-tools/">bindings + for Ruby</a> and libxml2 bindings are also available in Ruby through the + <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module maintained by Tobias Peters.</li> <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for @@ -2457,14 +2513,15 @@ or libxslt wrappers or bindings:</p> libxslt as part of GNU ClasspathX project.</li> <li>Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for <a href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li> - <li><a href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a> + <li><a + href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a> provides <a href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLib osax</a>. This is an osax for Mac OS X with a set of commands to implement in AppleScript the XML DOM, XPATH and XSLT. Also includes commands for Property-lists (Apple's fast lookup table XML format.)</li> - <li>Francesco Montorsi developped -<a href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a> + <li>Francesco Montorsi developped <a + href="https://sourceforge.net/project/showfiles.php?group_id=51305&package_id=45182">wxXml2</a> wrappers that interface libxml2, allowing wxWidgets applications to load/save/edit XML instances.</li> </ul> @@ -2474,10 +2531,11 @@ to be maintained as part of the library in the future, though the Python interface have not yet reached the completeness of the C API.</p> <p>Note that some of the Python purist dislike the default set of Python -bindings, rather than complaining I suggest they have a look at -<a href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 and libxslt</a> and -<a href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn Faassen</a> -complete those.</p> +bindings, rather than complaining I suggest they have a look at <a +href="http://codespeak.net/lxml/">lxml the more pythonic bindings for libxml2 +and libxslt</a> and <a +href="http://codespeak.net/mailman/listinfo/lxml-dev">help Martijn +Faassen</a> complete those.</p> <p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a> maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port @@ -3251,12 +3309,13 @@ of a number of things:</p> is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a> by Tim Bray on Unicode and why you should care about it.</p> + <p>If you don't understand why <b>it does not make sense to have a string -without knowing what encoding it uses</b>, then as Joel Spolsky said -<a href="http://www.joelonsoftware.com/articles/Unicode.html">please do -not write another line of code until you finish reading that article.</a>. -It is a prerequisite to understand this page, and avoid a lot of problems -with libxml2, XML or text processing in general.</p> +without knowing what encoding it uses</b>, then as Joel Spolsky said <a +href="http://www.joelonsoftware.com/articles/Unicode.html">please do not +write another line of code until you finish reading that article.</a>. It is +a prerequisite to understand this page, and avoid a lot of problems with +libxml2, XML or text processing in general.</p> <p>Table of Content:</p> <ol> @@ -3452,7 +3511,7 @@ encoding:</p> <très>là</très> ~/XML -> ./xmllint --encode UTF-8 isolat1 <?xml version="1.0" encoding="UTF-8"?> -<très>là </très> +<très>là </très> ~/XML -> </pre> <p>The same processing is applied (and reuse most of the code) for HTML I18N @@ -3482,6 +3541,14 @@ linux machine with glibc-2.1 the list of supported encodings and aliases fill 3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the various Japanese ones.</p> +<p>To convert from the UTF-8 values returned from the API to another encoding +then it is possible to use the function provided from <a +href="html/libxml-encoding.html">the encoding module</a> like <a +href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the +POSIX <a +href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a> +API directly.</p> + <h4>Encoding aliases</h4> <p>From 2.2.3, libxml2 has support to register encoding names aliases. The @@ -3666,19 +3733,19 @@ new output handler with the closing call deactivated:</p> the file: <pre>xmlOutputBufferPtr xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) { - xmlOutputBufferPtr ret; - - if (xmlOutputCallbackInitialized == 0) - xmlRegisterDefaultOutputCallbacks(); - - if (file == NULL) return(NULL); - ret = xmlAllocOutputBuffer(encoder); - if (ret != NULL) { - ret->context = file; - ret->writecallback = xmlFileWrite; - ret->closecallback = NULL; /* No close callback */ - } - return(ret); + xmlOutputBufferPtr ret; + + if (xmlOutputCallbackInitialized == 0) + xmlRegisterDefaultOutputCallbacks(); + + if (file == NULL) return(NULL); + ret = xmlAllocOutputBuffer(encoder); + if (ret != NULL) { + ret->context = file; + ret->writecallback = xmlFileWrite; + ret->closecallback = NULL; /* No close callback */ + } + return(ret); } </pre> </li> <li>And then use it to save the document: @@ -4844,10 +4911,9 @@ Gnome CVS base under gnome-xml/example</p> <a href="http://www.w3.org/Signature/">XML Canonicalization and XML Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li> - <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> - and contributors maintain <a - href="http://tclxml.sourceforge.net/">tcl bindings for libxml2 and - libxslt</a>, as well as <a + <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and + contributors maintain <a href="http://tclxml.sourceforge.net/">tcl + bindings for libxml2 and libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a> a GUI for xsltproc.</li> diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 45eb249..2e0caf9 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -7,7 +7,7 @@ H1 {font-family: Verdana,Arial,Helvetica} H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -</style><title>Validation & DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation & DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="http://xmlsoft.org/wiki">Wiki</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li> +</style><title>Validation & DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation & DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://www.blastwave.org/packages.php/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://rubyforge.org/projects/xml-tools/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol><li><a href="#General5">General overview</a></li> <li><a href="#definition">The definition</a></li> <li><a href="#Simple">Simple rules</a> <ol><li><a href="#reference">How to reference a DTD from a document</a></li> diff --git a/doc/xmlreader.html b/doc/xmlreader.html index db711b8..b8382a8 100644 --- a/doc/xmlreader.html +++ b/doc/xmlreader.html @@ -466,9 +466,9 @@ affects the Read() ones, however usually once processed the full subtree is not useful anymore, and the Next() operation allows to skip it completely and process to the successor or return 0 if the document end is reached.</p> -<p><a href="mailto:veillard@redhat.com">Daniel Veillard</a></p> +<p><a href="mailto:xml@gnome.org">Daniel Veillard</a></p> -<p>$Id: xmlreader.html,v 1.8 2003/11/05 04:15:16 jfleck Exp $</p> +<p>$Id: xmlreader.html,v 1.9 2005/10/18 19:11:54 veillard Exp $</p> <p></p> </body> diff --git a/elfgcchack.h b/elfgcchack.h index 44ab139..66e056c 100644 --- a/elfgcchack.h +++ b/elfgcchack.h @@ -301,6 +301,18 @@ extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias __attribut #endif #endif +#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_HTMLtree +#undef htmlDocDumpMemoryFormat +extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat __attribute((alias("htmlDocDumpMemoryFormat__internal_alias"))); +#else +#ifndef htmlDocDumpMemoryFormat +extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias __attribute((visibility("hidden"))); +#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_HTML_ENABLED) #ifdef bottom_HTMLparser #undef htmlElementAllowedHere @@ -6573,6 +6585,18 @@ extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __at #if defined(LIBXML_OUTPUT_ENABLED) #ifdef bottom_xmlIO +#undef xmlOutputBufferCreateBuffer +extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias"))); +#else +#ifndef xmlOutputBufferCreateBuffer +extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden"))); +#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias +#endif +#endif +#endif + +#if defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_xmlIO #undef xmlOutputBufferCreateFd extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd __attribute((alias("xmlOutputBufferCreateFd__internal_alias"))); #else @@ -9155,6 +9179,18 @@ extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute( #if defined(LIBXML_OUTPUT_ENABLED) #ifdef bottom_xmlsave +#undef xmlSaveToBuffer +extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias"))); +#else +#ifndef xmlSaveToBuffer +extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden"))); +#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias +#endif +#endif +#endif + +#if defined(LIBXML_OUTPUT_ENABLED) +#ifdef bottom_xmlsave #undef xmlSaveToFd extern __typeof (xmlSaveToFd) xmlSaveToFd __attribute((alias("xmlSaveToFd__internal_alias"))); #else @@ -9681,6 +9717,18 @@ extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors__internal_al #if defined(LIBXML_SCHEMAS_ENABLED) #ifdef bottom_xmlschemas +#undef xmlSchemaSetParserStructuredErrors +extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors __attribute((alias("xmlSchemaSetParserStructuredErrors__internal_alias"))); +#else +#ifndef xmlSchemaSetParserStructuredErrors +extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors__internal_alias __attribute((visibility("hidden"))); +#define xmlSchemaSetParserStructuredErrors xmlSchemaSetParserStructuredErrors__internal_alias +#endif +#endif +#endif + +#if defined(LIBXML_SCHEMAS_ENABLED) +#ifdef bottom_xmlschemas #undef xmlSchemaSetValidErrors extern __typeof (xmlSchemaSetValidErrors) xmlSchemaSetValidErrors __attribute((alias("xmlSchemaSetValidErrors__internal_alias"))); #else @@ -11423,7 +11471,7 @@ extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValu #endif #endif -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderReadInnerXml extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias"))); @@ -11435,7 +11483,7 @@ extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml__internal_ #endif #endif -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderReadOuterXml extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias"))); @@ -11507,6 +11555,18 @@ extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate__inter #endif #endif +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) +#ifdef bottom_xmlreader +#undef xmlTextReaderSchemaValidateCtxt +extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt __attribute((alias("xmlTextReaderSchemaValidateCtxt__internal_alias"))); +#else +#ifndef xmlTextReaderSchemaValidateCtxt +extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt__internal_alias __attribute((visibility("hidden"))); +#define xmlTextReaderSchemaValidateCtxt xmlTextReaderSchemaValidateCtxt__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_READER_ENABLED) #ifdef bottom_xmlreader #undef xmlTextReaderSetErrorHandler @@ -21,7 +21,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, ...); #define XML_GET_VAR_STR(msg, str) { \ - int size; \ + int size, prev_size = -1; \ int chars; \ char *larger; \ va_list ap; \ @@ -35,8 +35,13 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, va_start(ap, msg); \ chars = vsnprintf(str, size, msg, ap); \ va_end(ap); \ - if ((chars > -1) && (chars < size)) \ - break; \ + if ((chars > -1) && (chars < size)) { \ + if (prev_size == chars) { \ + break; \ + } else { \ + prev_size = chars; \ + } \ + } \ if (chars > -1) \ size += chars + 1; \ else \ @@ -293,8 +298,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, if (name != NULL) { channel(data, "element %s: ", name); } - if (code == XML_ERR_OK) - return; switch (domain) { case XML_FROM_PARSER: channel(data, "parser "); @@ -360,8 +363,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, default: break; } - if (code == XML_ERR_OK) - return; switch (level) { case XML_ERR_NONE: channel(data, ": "); @@ -376,8 +377,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, channel(data, "error : "); break; } - if (code == XML_ERR_OK) - return; if (str != NULL) { int len; len = xmlStrlen((const xmlChar *)str); @@ -388,8 +387,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str, } else { channel(data, "%s\n", "out of memory error"); } - if (code == XML_ERR_OK) - return; if (ctxt != NULL) { xmlParserPrintFileContextInternal(input, channel, data); @@ -46,6 +46,7 @@ modules_defines = { "DOCBparser" : "LIBXML_DOCB_ENABLED", "xmlmodule" : "LIBXML_MODULES_ENABLED", "pattern" : "LIBXML_PATTERN_ENABLED", + "schematron" : "LIBXML_SCHEMATRON_ENABLED", } # diff --git a/include/libxml/HTMLtree.h b/include/libxml/HTMLtree.h index 50b8544..6ea8207 100644 --- a/include/libxml/HTMLtree.h +++ b/include/libxml/HTMLtree.h @@ -75,6 +75,11 @@ XMLPUBFUN void XMLCALL htmlDocDumpMemory (xmlDocPtr cur, xmlChar **mem, int *size); +XMLPUBFUN void XMLCALL + htmlDocDumpMemoryFormat (xmlDocPtr cur, + xmlChar **mem, + int *size, + int format); XMLPUBFUN int XMLCALL htmlDocDump (FILE *f, xmlDocPtr cur); diff --git a/include/libxml/pattern.h b/include/libxml/pattern.h index 1aa6704..97d2cd2 100644 --- a/include/libxml/pattern.h +++ b/include/libxml/pattern.h @@ -75,6 +75,11 @@ XMLPUBFUN xmlStreamCtxtPtr XMLCALL XMLPUBFUN void XMLCALL xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); XMLPUBFUN int XMLCALL + xmlStreamPushNode (xmlStreamCtxtPtr stream, + const xmlChar *name, + const xmlChar *ns, + int nodeType); +XMLPUBFUN int XMLCALL xmlStreamPush (xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns); @@ -84,6 +89,8 @@ XMLPUBFUN int XMLCALL const xmlChar *ns); XMLPUBFUN int XMLCALL xmlStreamPop (xmlStreamCtxtPtr stream); +XMLPUBFUN int XMLCALL + xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); #ifdef __cplusplus } #endif diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 384758d..b68a6e1 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -2,6 +2,8 @@ * Summary: internal interfaces for XML Schemas * Description: internal interfaces for the XML Schemas handling * and schema validity checking + * The Schemas development is a Work In Progress. + * Some of those interfaces are not garanteed to be API or ABI stable ! * * Copy: See Copyright for the status of this software. * @@ -103,6 +105,7 @@ typedef enum { XML_SCHEMA_TYPE_IDC_KEY, XML_SCHEMA_TYPE_IDC_KEYREF, XML_SCHEMA_TYPE_PARTICLE = 25, + XML_SCHEMA_TYPE_ATTRIBUTE_USE, XML_SCHEMA_FACET_MININCLUSIVE = 1000, XML_SCHEMA_FACET_MINEXCLUSIVE, XML_SCHEMA_FACET_MAXINCLUSIVE, @@ -115,7 +118,8 @@ typedef enum { XML_SCHEMA_FACET_LENGTH, XML_SCHEMA_FACET_MAXLENGTH, XML_SCHEMA_FACET_MINLENGTH, - XML_SCHEMA_EXTRA_QNAMEREF = 2000 + XML_SCHEMA_EXTRA_QNAMEREF = 2000, + XML_SCHEMA_EXTRA_ATTR_USE_PROHIB } xmlSchemaTypeType; typedef enum { @@ -124,7 +128,7 @@ typedef enum { XML_SCHEMA_CONTENT_ELEMENTS, XML_SCHEMA_CONTENT_MIXED, XML_SCHEMA_CONTENT_SIMPLE, - XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* obsolete, not used */ + XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ XML_SCHEMA_CONTENT_BASIC, XML_SCHEMA_CONTENT_ANY } xmlSchemaContentType; @@ -242,31 +246,32 @@ struct _xmlSchemaAnnot { typedef struct _xmlSchemaAttribute xmlSchemaAttribute; typedef xmlSchemaAttribute *xmlSchemaAttributePtr; struct _xmlSchemaAttribute { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ - const xmlChar *name; /* name of the declaration or empty if particle */ - const xmlChar *id; - const xmlChar *ref; /* the local name of the attribute decl. if a particle */ - const xmlChar *refNs; /* the ns URI of the attribute decl. if a particle */ + xmlSchemaTypeType type; + struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ + const xmlChar *name; /* the name of the declaration */ + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ const xmlChar *typeName; /* the local name of the type definition */ const xmlChar *typeNs; /* the ns URI of the type definition */ xmlSchemaAnnotPtr annot; - xmlSchemaTypePtr base; /* obsolete, not used */ - int occurs; - const xmlChar *defValue; + xmlSchemaTypePtr base; /* Deprecated; not used */ + int occurs; /* Deprecated; not used */ + const xmlChar *defValue; /* The initial value of the value constraint */ xmlSchemaTypePtr subtypes; /* the type definition */ xmlNodePtr node; const xmlChar *targetNamespace; int flags; - const xmlChar *refPrefix; - xmlSchemaValPtr defVal; - xmlSchemaAttributePtr refDecl; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value constraint */ + xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ }; /** * xmlSchemaAttributeLink: * Used to build a list of attribute uses on complexType definitions. + * WARNING: Deprecated; not used. */ typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; @@ -301,11 +306,11 @@ typedef struct _xmlSchemaWildcard xmlSchemaWildcard; typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; struct _xmlSchemaWildcard { xmlSchemaTypeType type; /* The kind of type */ - const xmlChar *id; + const xmlChar *id; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int processContents; int any; /* Indicates if the ns constraint is of ##any */ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ @@ -333,6 +338,19 @@ struct _xmlSchemaWildcard { #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 /** + * XML_SCHEMAS_ATTRGROUP_REDEFINED: + * + * The attr group was redefined. + */ +#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 +/** + * XML_SCHEMAS_ATTRGROUP_HAS_REFS: + * + * Whether this attr. group contains attr. group references. + */ +#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 + +/** * An attribute group definition. * * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures @@ -345,18 +363,18 @@ struct _xmlSchemaAttributeGroup { struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ const xmlChar *name; const xmlChar *id; - const xmlChar *ref; - const xmlChar *refNs; + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; - xmlSchemaAttributePtr attributes; + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; int flags; xmlSchemaWildcardPtr attributeWildcard; - const xmlChar *refPrefix; - xmlSchemaAttributeGroupPtr refItem; /* The referenced attribute group */ + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ const xmlChar *targetNamespace; - /* xmlSchemaAttributeGroupPtr redef;*/ /* Redefinitions */ + void *attrUses; }; /** @@ -368,7 +386,7 @@ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink *next;/* the next type link ... */ - xmlSchemaTypePtr type;/* the linked type*/ + xmlSchemaTypePtr type;/* the linked type */ }; /** @@ -417,6 +435,9 @@ struct _xmlSchemaFacetLink { * XML_SCHEMAS_TYPE_VARIETY_ABSENT: * * the simpleType has a variety of "absent". + * TODO: Actually not necessary :-/, since if + * none of the variety flags occur then it's + * automatically absent. */ #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 /** @@ -561,41 +582,56 @@ struct _xmlSchemaFacetLink { #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 /** + * XML_SCHEMAS_TYPE_REDEFINED: + * + * The type was redefined. + */ +#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 +/** + * XML_SCHEMAS_TYPE_REDEFINING: + * + * The type redefines an other type. + */ +/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ + +/** * _xmlSchemaType: * * Schemas type definition. */ struct _xmlSchemaType { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next;/* the next type if in a sequence ... */ + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* the next type if in a sequence ... */ const xmlChar *name; - const xmlChar *id; - const xmlChar *ref; - const xmlChar *refNs; + const xmlChar *id ; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; - xmlSchemaAttributePtr attributes; + xmlSchemaAttributePtr attributes; /* Deprecated; not used */ xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int flags; xmlSchemaContentType contentType; - const xmlChar *base; - const xmlChar *baseNs; - xmlSchemaTypePtr baseType; - xmlSchemaFacetPtr facets; - struct _xmlSchemaType *redef;/* possible redefinitions for the type */ - int recurse; - xmlSchemaAttributeLinkPtr attributeUses; + const xmlChar *base; /* Base type's local name */ + const xmlChar *baseNs; /* Base type's target namespace */ + xmlSchemaTypePtr baseType; /* The base type component */ + xmlSchemaFacetPtr facets; /* Local facets */ + struct _xmlSchemaType *redef; /* Deprecated; not used */ + int recurse; /* Obsolete */ + xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ xmlSchemaWildcardPtr attributeWildcard; - int builtInType; - xmlSchemaTypeLinkPtr memberTypes; - xmlSchemaFacetLinkPtr facetSet; - const xmlChar *refPrefix; - xmlSchemaTypePtr contentTypeDef; - xmlRegexpPtr contModel; + int builtInType; /* Type of built-in types. */ + xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ + xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. + Could we use @subtypes for this? */ + xmlRegexpPtr contModel; /* Holds the automaton of the content model */ const xmlChar *targetNamespace; + void *attrUses; }; /* @@ -727,18 +763,18 @@ struct _xmlSchemaType { typedef struct _xmlSchemaElement xmlSchemaElement; typedef xmlSchemaElement *xmlSchemaElementPtr; struct _xmlSchemaElement { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next;/* the next type if in a sequence ... */ + xmlSchemaTypeType type; /* The kind of type */ + struct _xmlSchemaType *next; /* Not used? */ const xmlChar *name; - const xmlChar *id; - const xmlChar *ref; /* the local name of the element declaration if a particle */ - const xmlChar *refNs; /* the ns URI of the element declaration if a particle */ + const xmlChar *id; /* Deprecated; not used */ + const xmlChar *ref; /* Deprecated; not used */ + const xmlChar *refNs; /* Deprecated; not used */ xmlSchemaAnnotPtr annot; xmlSchemaTypePtr subtypes; /* the type definition */ xmlSchemaAttributePtr attributes; xmlNodePtr node; - int minOccurs; - int maxOccurs; + int minOccurs; /* Deprecated; not used */ + int maxOccurs; /* Deprecated; not used */ int flags; const xmlChar *targetNamespace; @@ -747,13 +783,14 @@ struct _xmlSchemaElement { const xmlChar *substGroup; const xmlChar *substGroupNs; const xmlChar *scope; - const xmlChar *value; - struct _xmlSchemaElement *refDecl; /* This will now be used for the substitution group affiliation */ - xmlRegexpPtr contModel; + const xmlChar *value; /* The original value of the value constraint. */ + struct _xmlSchemaElement *refDecl; /* This will now be used for the + substitution group affiliation */ + xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ xmlSchemaContentType contentType; - const xmlChar *refPrefix; - xmlSchemaValPtr defVal; - void *idcs; + const xmlChar *refPrefix; /* Deprecated; not used */ + xmlSchemaValPtr defVal; /* The compiled value contraint. */ + void *idcs; /* The identity-constraint defs */ }; /* @@ -786,14 +823,14 @@ struct _xmlSchemaElement { struct _xmlSchemaFacet { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ - const xmlChar *value; - const xmlChar *id; + const xmlChar *value; /* The original value */ + const xmlChar *id; /* Obsolete */ xmlSchemaAnnotPtr annot; xmlNodePtr node; - int fixed; + int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ int whitespace; - xmlSchemaValPtr val; - xmlRegexpPtr regexp; + xmlSchemaValPtr val; /* The compiled value */ + xmlRegexpPtr regexp; /* The regex for patterns */ }; /** @@ -802,7 +839,7 @@ struct _xmlSchemaFacet { typedef struct _xmlSchemaNotation xmlSchemaNotation; typedef xmlSchemaNotation *xmlSchemaNotationPtr; struct _xmlSchemaNotation { - xmlSchemaTypeType type; /* The kind of type */ + xmlSchemaTypeType type; /* The kind of type */ const xmlChar *name; xmlSchemaAnnotPtr annot; const xmlChar *identifier; @@ -810,7 +847,7 @@ struct _xmlSchemaNotation { }; /* -* Actually all those flags used for the schema should sit +* TODO: Actually all those flags used for the schema should sit * on the schema parser context, since they are used only * during parsing an XML schema document, and not available * on the component level as per spec. @@ -884,10 +921,10 @@ struct _xmlSchemaNotation { * A Schemas definition */ struct _xmlSchema { - const xmlChar *name; /* schema name */ - const xmlChar *targetNamespace; /* the target namespace */ + const xmlChar *name; /* schema name */ + const xmlChar *targetNamespace; /* the target namespace */ const xmlChar *version; - const xmlChar *id; + const xmlChar *id; /* Obsolete */ xmlDocPtr doc; xmlSchemaAnnotPtr annot; int flags; @@ -906,8 +943,8 @@ struct _xmlSchema { void *includes; /* the includes, this is opaque for now */ int preserve; /* whether to free the document */ int counter; /* used to give ononymous components unique names */ - xmlHashTablePtr idcDef; - void *volatiles; /* Deprecated; not used anymore. */ + xmlHashTablePtr idcDef; /* All identity-constraint defs. */ + void *volatiles; /* Obsolete */ }; XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); diff --git a/include/libxml/valid.h b/include/libxml/valid.h index d13e4eb..7492d28 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -410,7 +410,7 @@ XMLPUBFUN xmlElementPtr XMLCALL XMLPUBFUN int XMLCALL xmlValidGetPotentialChildren(xmlElementContent *ctree, - const xmlChar **list, + const xmlChar **names, int *len, int max); diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h index e67b6e5..eea9ed6 100644 --- a/include/libxml/xmlIO.h +++ b/include/libxml/xmlIO.h @@ -232,6 +232,10 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlCharEncodingHandlerPtr encoder); XMLPUBFUN xmlOutputBufferPtr XMLCALL + xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder); + +XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateFd (int fd, xmlCharEncodingHandlerPtr encoder); diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index bfe3c24..c83dc95 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -767,6 +767,11 @@ typedef enum { XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */ + XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */ + XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */ + XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */ + XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */ + XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */ XML_MODULE_OPEN = 4900, /* 4900 */ XML_MODULE_CLOSE, /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000, diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h index f016546..1d12988 100644 --- a/include/libxml/xmlreader.h +++ b/include/libxml/xmlreader.h @@ -121,10 +121,15 @@ XMLPUBFUN void XMLCALL */ XMLPUBFUN int XMLCALL xmlTextReaderRead (xmlTextReaderPtr reader); + +#ifdef LIBXML_WRITER_ENABLED XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadInnerXml (xmlTextReaderPtr reader); + XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadOuterXml (xmlTextReaderPtr reader); +#endif + XMLPUBFUN xmlChar * XMLCALL xmlTextReaderReadString (xmlTextReaderPtr reader); XMLPUBFUN int XMLCALL @@ -279,6 +284,10 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char *xsd); +XMLPUBFUN int XMLCALL + xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, + xmlSchemaValidCtxtPtr ctxt, + int options); XMLPUBFUN int XMLCALL xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema); diff --git a/include/libxml/xmlregexp.h b/include/libxml/xmlregexp.h index a257bb4..022cd6a 100644 --- a/include/libxml/xmlregexp.h +++ b/include/libxml/xmlregexp.h @@ -183,12 +183,12 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, - const xmlChar**list, + const xmlChar**langList, int len); XMLPUBFUN int XMLCALL xmlExpGetStart (xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, - const xmlChar**list, + const xmlChar**tokList, int len); XMLPUBFUN xmlExpNodePtr XMLCALL xmlExpStringDerive(xmlExpCtxtPtr ctxt, diff --git a/include/libxml/xmlsave.h b/include/libxml/xmlsave.h index 766a2ac..c71c71a 100644 --- a/include/libxml/xmlsave.h +++ b/include/libxml/xmlsave.h @@ -45,14 +45,12 @@ XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToFilename (const char *filename, const char *encoding, int options); -/****** - Not yet implemented. XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToBuffer (xmlBufferPtr buffer, const char *encoding, int options); - ******/ + XMLPUBFUN xmlSaveCtxtPtr XMLCALL xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h index ab47091..15faef5 100644 --- a/include/libxml/xmlschemas.h +++ b/include/libxml/xmlschemas.h @@ -113,6 +113,10 @@ XMLPUBFUN void XMLCALL xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); +XMLPUBFUN void XMLCALL + xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaValidityErrorFunc * err, @@ -140,7 +144,8 @@ XMLPUBFUN void XMLCALL void *ctx); XMLPUBFUN void XMLCALL xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, void *ctx); + xmlStructuredErrorFunc serror, + void *ctx); XMLPUBFUN int XMLCALL xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc *err, diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index 77d6659..867c94d 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.6.22" +#define LIBXML_DOTTED_VERSION "2.6.23" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 1002003 */ -#define LIBXML_VERSION 20622 +#define LIBXML_VERSION 20623 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "1002003" */ -#define LIBXML_VERSION_STRING "20622" +#define LIBXML_VERSION_STRING "20623" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-CVS2634" +#define LIBXML_VERSION_EXTRA "-CVS2717" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20622); +#define LIBXML_TEST_VERSION xmlCheckVersion(20623); #ifndef VMS #if 0 diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index a628741..cf547dd 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -299,7 +299,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * Whether the runtime debugging is configured in */ -#if @WITH_MEM_DEBUG@ +#if @WITH_RUN_DEBUG@ #define LIBXML_DEBUG_RUNTIME #endif diff --git a/include/win32config.h b/include/win32config.h index 9c75afd..c61dfa9 100644 --- a/include/win32config.h +++ b/include/win32config.h @@ -84,10 +84,12 @@ static int isnan (double d) { #endif #endif /* _MSC_VER */ -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define mkdir(p,m) _mkdir(p) #define snprintf _snprintf #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a) +#elif defined(__MINGW32__) +#define mkdir(p,m) _mkdir(p) #endif /* Threading API to use should be specified here for compatibility reasons. diff --git a/include/wsockcompat.h b/include/wsockcompat.h index 690048c..a898b05 100644 --- a/include/wsockcompat.h +++ b/include/wsockcompat.h @@ -10,6 +10,18 @@ #else #undef HAVE_ERRNO_H #include <winsock2.h> +#include <ws2tcpip.h> +/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */ +#if defined(GetAddrInfo) +#define HAVE_GETADDRINFO +#endif +#endif + +#ifdef __MINGW32__ +/* Include <errno.h> here to ensure that it doesn't get included later + * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */ +#include <errno.h> +#undef EWOULDBLOCK #endif #if !defined SOCKLEN_T @@ -673,7 +673,6 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, * * Creation of a Namespace, the old way using PI and without scoping * DEPRECATED !!! - * It now create a namespace on the root element of the document if found. * Returns NULL this functionality had been removed */ xmlNsPtr @@ -53,7 +53,7 @@ library exports Push and Pull type parser interfaces for both XML and static library .TP .B /depot/lib/libxml_2.0.0/libxml.so -shareable library +shared library .TP .B /depot/package/libxml_2.0.0/bin/xmllint binary application for parsing XML files diff --git a/libxml.spec.in b/libxml.spec.in index 16c9888..bf5dd5f 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -60,36 +60,6 @@ at parse time or later once the document has been modified. %setup -q %build -# -# try to use compiler profiling, based on Arjan van de Ven <arjanv@redhat.com> -# initial test spec. This really doesn't work okay for most tests done. -# -# Well except it's just broken most of the time. -#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -ge 34 ] -#then -# PROF_GEN='-fprofile-generate' -# PROF_USE='-fprofile-use' -#fi -# -#if [ "$PROF_GEN" != "" ] -#then -# # First generate a profiling version -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}" %configure -# make -# # Run a few sampling -# make dba100000.xml -# ./xmllint --noout dba100000.xml -# ./xmllint --stream dba100000.xml -# ./xmllint --noout --valid test/valid/REC-xml-19980210.xml -# ./xmllint --stream --valid test/valid/REC-xml-19980210.xml -# # Then generate code based on profile -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}" %configure -# make -#else -# %configure -# make -#fi %configure make gzip -9 ChangeLog diff --git a/libxml2.spec b/libxml2.spec index f3256d6..1df9897 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -1,6 +1,6 @@ Summary: Library providing XML and HTML support Name: libxml2 -Version: 2.6.22 +Version: 2.6.23 Release: 1 License: MIT Group: Development/Libraries @@ -60,36 +60,6 @@ at parse time or later once the document has been modified. %setup -q %build -# -# try to use compiler profiling, based on Arjan van de Ven <arjanv@redhat.com> -# initial test spec. This really doesn't work okay for most tests done. -# -# Well except it's just broken most of the time. -#GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'` -#if [ $GCC_VERSION -ge 34 ] -#then -# PROF_GEN='-fprofile-generate' -# PROF_USE='-fprofile-use' -#fi -# -#if [ "$PROF_GEN" != "" ] -#then -# # First generate a profiling version -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_GEN}" %configure -# make -# # Run a few sampling -# make dba100000.xml -# ./xmllint --noout dba100000.xml -# ./xmllint --stream dba100000.xml -# ./xmllint --noout --valid test/valid/REC-xml-19980210.xml -# ./xmllint --stream --valid test/valid/REC-xml-19980210.xml -# # Then generate code based on profile -# CFLAGS="${RPM_OPT_FLAGS} ${PROF_USE}" %configure -# make -#else -# %configure -# make -#fi %configure make gzip -9 ChangeLog @@ -157,8 +127,8 @@ rm -fr %{buildroot} %doc doc/python.html %changelog -* Mon Sep 12 2005 Daniel Veillard <veillard@redhat.com> -- upstream release 2.6.22 see http://xmlsoft.org/news.html +* Thu Jan 5 2006 Daniel Veillard <veillard@redhat.com> +- upstream release 2.6.23 see http://xmlsoft.org/news.html * Thu Jan 2 2003 Daniel Veillard <veillard@redhat.com> - integrated drv_libxml2 xml.sax driver from Stéphane Bidoul @@ -1,7 +1,7 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # @@ -17,7 +17,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -43,9 +43,14 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.6 -TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $" +VERSION="1.5.22 Debian 1.5.22-1" +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -83,14 +88,15 @@ rm="rm -f" Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' # test EBCDIC or ASCII -case `echo A|tr A '\301'` in - A) # EBCDIC based system - SP2NL="tr '\100' '\n'" - NL2SP="tr '\r\n' '\100\100'" +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' ;; - *) # Assume ASCII based system - SP2NL="tr '\040' '\012'" - NL2SP="tr '\015\012' '\040\040'" + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' ;; esac @@ -107,8 +113,9 @@ if test "${LANG+set}" = set; then fi # Make sure IFS has a sensible default -: ${IFS=" -"} +lt_nl=' +' +IFS=" $lt_nl" if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then $echo "$modename: not configured to build any kind of library" 1>&2 @@ -125,6 +132,8 @@ run= show="$echo" show_help= execute_dlfiles= +duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" @@ -132,13 +141,51 @@ o2lo="s/\\.${objext}\$/.lo/" # Shell function definitions: # This seems to be the best place for them +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. -func_win32_libid () { +func_win32_libid () +{ win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in @@ -149,12 +196,11 @@ func_win32_libid () { if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` - if test "X$win32_nmres" = "Ximport" ; then - win32_libid_type="x86 archive import" - else - win32_libid_type="x86 archive static" - fi + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac fi ;; *DLL*) @@ -178,7 +224,8 @@ func_win32_libid () { # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' -func_infer_tag () { +func_infer_tag () +{ if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -235,12 +282,116 @@ func_infer_tag () { esac fi } + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" +disable_libs=no + # Parse our command line options once, thoroughly. while test "$#" -gt 0 do @@ -305,10 +456,10 @@ do --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo - $echo "Copyright (C) 2003 Free Software Foundation, Inc." + $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $EXIT_SUCCESS + exit $? ;; --config) @@ -317,7 +468,7 @@ do for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done - exit $EXIT_SUCCESS + exit $? ;; --debug) @@ -342,7 +493,7 @@ do else $echo "disable static libraries" fi - exit $EXIT_SUCCESS + exit $? ;; --finish) mode="finish" ;; @@ -357,7 +508,11 @@ do preserve_args="$preserve_args $arg" ;; - --tag) prevopt="--tag" prev=tag ;; + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; --tag=*) set tag "$optarg" ${1+"$@"} shift @@ -389,6 +544,18 @@ if test -n "$prevopt"; then exit $EXIT_FAILURE fi +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. @@ -399,7 +566,7 @@ if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link @@ -465,7 +632,7 @@ if test -z "$show_help"; then for arg do - case "$arg_mode" in + case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" @@ -547,7 +714,10 @@ if test -z "$show_help"; then case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; @@ -621,6 +791,14 @@ if test -z "$show_help"; then esac done + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then @@ -693,12 +871,17 @@ compiler." $run $rm $removelist exit $EXIT_FAILURE fi - $echo $srcfile > "$lockfile" + $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac $run $rm "$libobj" "${libobj}T" @@ -720,18 +903,18 @@ EOF fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then - command="$base_compile $srcfile $pic_flag" + command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code - command="$base_compile $srcfile" + command="$base_compile $qsrcfile" fi if test ! -d "${xdir}$objdir"; then $show "$mkdir ${xdir}$objdir" $run $mkdir ${xdir}$objdir - status=$? - if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then + exit $exit_status fi fi @@ -803,9 +986,9 @@ EOF if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code - command="$base_compile $srcfile" + command="$base_compile $qsrcfile" else - command="$base_compile $srcfile $pic_flag" + command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" @@ -934,6 +1117,7 @@ EOF no_install=no objs= non_pic_objects= + notinst_path= # paths that contain not-installed libtool libraries precious_files_regex= prefer_static_libs=no preload=no @@ -962,14 +1146,15 @@ EOF if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=yes else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=built fi build_libtool_libs=no build_old_libs=yes - prefer_static_libs=yes break ;; esac @@ -1144,6 +1329,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1227,6 +1417,13 @@ EOF prev= continue ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; *) eval "$prev=\"\$arg\"" prev= @@ -1285,6 +1482,18 @@ EOF continue ;; + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + -inst-prefix-dir) prev=inst_prefix continue @@ -1311,7 +1520,8 @@ EOF absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit $EXIT_FAILURE + absdir="$dir" + notinst_path="$notinst_path $dir" fi dir="$absdir" ;; @@ -1325,10 +1535,15 @@ EOF esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac continue @@ -1337,15 +1552,15 @@ EOF -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; - *-*-mingw* | *-*-os2*) + *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; @@ -1353,10 +1568,19 @@ EOF # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; esac elif test "X$arg" = "X-lc_r"; then case $host in - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -1366,8 +1590,20 @@ EOF continue ;; + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - deplibs="$deplibs $arg" + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" continue ;; @@ -1376,13 +1612,19 @@ EOF continue ;; - # gcc -m* arguments should be passed to the linker via $compiler_flags - # in order to pass architecture information to the linker - # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo - # but this is not reliable with gcc because gcc may use -mfoo to - # select a different linker, different libraries, etc, while - # -Wl,-mfoo simply passes -mfoo to the linker. - -m*) + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` @@ -1393,9 +1635,7 @@ EOF esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" - if test "$with_gcc" = "yes" ; then - compiler_flags="$compiler_flags $arg" - fi + compiler_flags="$compiler_flags $arg" continue ;; @@ -1633,6 +1873,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1738,9 +1983,9 @@ EOF if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir - status=$? - if test "$status" -ne 0 && test ! -d "$output_objdir"; then - exit $status + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status fi fi @@ -1803,7 +2048,6 @@ EOF newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" @@ -1858,7 +2102,7 @@ EOF compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - deplibs="$deplib $deplibs" + compiler_flags="$compiler_flags $deplib" fi continue ;; @@ -1977,7 +2221,22 @@ EOF fi case $linkmode in lib) - if test "$deplibs_check_method" != pass_all; then + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" @@ -2027,7 +2286,7 @@ EOF esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib'" 1>&2 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi @@ -2051,6 +2310,8 @@ EOF # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no + avoidtemprpath= + # Read the .la file case $lib in @@ -2149,11 +2410,19 @@ EOF dir="$libdir" absdir="$libdir" fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` @@ -2226,12 +2495,12 @@ EOF if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var"; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; + *) temp_rpath="$temp_rpath $absdir" ;; esac fi @@ -2268,8 +2537,12 @@ EOF fi link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes @@ -2382,11 +2655,15 @@ EOF if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in - *-*-sco3.2v5* ) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo @@ -2417,7 +2694,7 @@ EOF add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2490,7 +2767,7 @@ EOF add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2551,8 +2828,6 @@ EOF fi fi else - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi @@ -2670,12 +2945,12 @@ EOF *) continue ;; esac case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; esac case " $deplibs " in - *" $path "*) ;; - *) deplibs="$deplibs $path" ;; + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no @@ -2947,7 +3222,7 @@ EOF case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -2956,7 +3231,7 @@ EOF case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -2965,7 +3240,7 @@ EOF case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; @@ -2991,7 +3266,7 @@ EOF versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) @@ -3144,9 +3419,9 @@ EOF # Eliminate all temporary directories. for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` - deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` done if test -n "$xrpath"; then @@ -3197,9 +3472,14 @@ EOF *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. @@ -3243,11 +3523,11 @@ EOF int main() { return 0; } EOF $rm conftest - $LTCC -o conftest conftest.c $deplibs + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3284,11 +3564,11 @@ EOF # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC -o conftest conftest.c $i + $LTCC $LTCFLAGS -o conftest conftest.c $i # Did it work? if test "$?" -eq 0 ; then ldd_output=`ldd conftest` @@ -3336,7 +3616,7 @@ EOF set dummy $deplibs_check_method file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3405,7 +3685,7 @@ EOF set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3535,6 +3815,35 @@ EOF deplibs=$newdeplibs fi + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -3618,6 +3927,7 @@ EOF fi lib="$output_objdir/$realname" + linknames= for link do linknames="$linknames $link" @@ -3646,6 +3956,9 @@ EOF # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break fi done IFS="$save_ifs" @@ -3679,67 +3992,13 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" fi fi - + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" @@ -3769,7 +4028,8 @@ EOF fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -3788,6 +4048,7 @@ EOF save_libobjs=$libobjs fi save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. @@ -3797,13 +4058,13 @@ EOF delfiles= last_robj= k=1 - output=$output_objdir/$save_output-${k}.$objext + output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*"` && + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else @@ -3817,9 +4078,9 @@ EOF # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi - last_robj=$output_objdir/$save_output-${k}.$objext + last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` - output=$output_objdir/$save_output-${k}.$objext + output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi @@ -3839,13 +4100,13 @@ EOF eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi - # Set up a command to remove the reloadale object files + # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" @@ -3893,13 +4154,30 @@ EOF IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + exit $EXIT_SUCCESS fi @@ -3977,64 +4255,10 @@ EOF eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - for xlib in $convenience; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi @@ -4135,6 +4359,35 @@ EOF ;; esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" @@ -4179,10 +4432,15 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac done @@ -4296,13 +4554,25 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" + export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac else - $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac fi fi @@ -4353,7 +4623,26 @@ extern \"C\" { #endif /* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } @@ -4400,16 +4689,29 @@ static const void *lt_preloaded_setup() { esac # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 @@ -4434,7 +4736,7 @@ static const void *lt_preloaded_setup() { # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" - status=$? + exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then @@ -4442,7 +4744,7 @@ static const void *lt_preloaded_setup() { $run $rm "$output_objdir/${outputname}S.${objext}" fi - exit $status + exit $exit_status fi if test -n "$shlibpath_var"; then @@ -4582,10 +4884,12 @@ static const void *lt_preloaded_setup() { esac case $host in *cygwin* | *mingw* ) - cwrappersource=`$echo ${objdir}/lt-${output}.c` - cwrapper=`$echo ${output}.exe` - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <<EOF @@ -4610,6 +4914,9 @@ EOF #include <malloc.h> #include <stdarg.h> #include <assert.h> +#include <string.h> +#include <ctype.h> +#include <sys/stat.h> #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX @@ -4620,15 +4927,19 @@ EOF #endif #ifndef DIR_SEPARATOR -#define DIR_SEPARATOR '/' +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) -#define HAVE_DOS_BASED_FILE_SYSTEM -#ifndef DIR_SEPARATOR_2 -#define DIR_SEPARATOR_2 '\\' -#endif +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif #endif #ifndef DIR_SEPARATOR_2 @@ -4638,17 +4949,32 @@ EOF (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); -char * basename (const char *name); -char * fnqualify(const char *path); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); @@ -4658,29 +4984,51 @@ main (int argc, char *argv[]) char **newargz; int i; - program_name = (char *) xstrdup ((char *) basename (argv[0])); + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF - cat >> $cwrappersource <<EOF - newargz[0] = "$SHELL"; + cat >> $cwrappersource <<EOF + newargz[0] = (char *) xstrdup("$SHELL"); EOF - cat >> $cwrappersource <<"EOF" - newargz[1] = fnqualify(argv[0]); + cat >> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; + + for (i=0; i<argc+1; i++) + { + DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); + ; + } + EOF - cat >> $cwrappersource <<EOF + case $host_os in + mingw*) + cat >> $cwrappersource <<EOF + execv("$SHELL",(char const **)newargz); +EOF + ;; + *) + cat >> $cwrappersource <<EOF execv("$SHELL",newargz); EOF + ;; + esac - cat >> $cwrappersource <<"EOF" + cat >> $cwrappersource <<"EOF" + return 127; } void * @@ -4700,48 +5048,148 @@ xstrdup (const char *string) ; } -char * -basename (const char *name) +const char * +base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha (name[0]) && name[1] == ':') + if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; - return (char *) base; + return base; } +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ char * -fnqualify(const char *path) +find_executable (const char* wrapper) { - size_t size; - char *p; + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; - assert(path != NULL); + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - /* Is it qualified already? */ + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha (path[0]) && path[1] == ':') - return xstrdup (path); + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } #endif - if (IS_DIR_SEPARATOR (path[0])) - return xstrdup (path); - /* prepend the current directory */ - /* doesn't handle '~' */ + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); - size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ - p = XMALLOC(char, size); - sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); - return p; + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; } char * @@ -4785,16 +5233,16 @@ lt_fatal (const char *message, ...) va_end (ap); } EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL @@ -4815,7 +5263,7 @@ sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" @@ -4944,13 +5392,13 @@ else # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} + exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac @@ -4960,7 +5408,7 @@ else fi else # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE @@ -4992,71 +5440,73 @@ fi\ if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - status=$? - if test "$status" -ne 0 && test ! -d "$gentop"; then - exit $status - fi generated="$generated $gentop" - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - case $xlib in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "$mkdir $xdir" - $run $mkdir "$xdir" - status=$? - if test "$status" -ne 0 && test ! -d "$xdir"; then - exit $status - fi - # We will extract separately just the conflicting names and we will no - # longer touch any unique names. It is faster to leave these extract - # automatically by $AR in one run. - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 - $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 - $AR t "$xabs" | sort | uniq -cd | while read -r count name - do - i=1 - while test "$i" -le "$count" - do - # Put our $i before any first dot (extension) - # Never overwrite any file - name_to="$name" - while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" - do - name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` - done - $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" - $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? - i=`expr $i + 1` - done - done - fi - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` - done + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && @@ -5070,20 +5520,7 @@ fi\ objlist= concat_cmds= save_oldobjs=$oldobjs - # GNU ar 2.10+ was changed to match POSIX; thus no paths are - # encoded into archives. This makes 'ar r' malfunction in - # this piecewise linking case whenever conflicting object - # names appear in distinct ar calls; check, warn and compensate. - if (for obj in $save_oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 - $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 - AR_FLAGS=cq - fi + # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do @@ -5094,7 +5531,7 @@ fi\ oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*"` && + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else @@ -5291,11 +5728,11 @@ relink_command=\"$relink_command\"" # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5304,14 +5741,14 @@ relink_command=\"$relink_command\"" shift else install_prog= - arg="$nonopt" + arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5329,28 +5766,31 @@ relink_command=\"$relink_command\"" do if test -n "$dest"; then files="$files $dest" - dest="$arg" + dest=$arg continue fi case $arg in -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; - -*) ;; - + -*) + ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else - dest="$arg" + dest=$arg continue fi ;; @@ -5359,7 +5799,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5528,11 +5968,14 @@ relink_command=\"$relink_command\"" if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi @@ -5545,7 +5988,16 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" fi @@ -5639,17 +6091,15 @@ relink_command=\"$relink_command\"" notinst_deplibs= relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac # Check the variables that should have been set. @@ -5677,34 +6127,21 @@ relink_command=\"$relink_command\"" done relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - save_umask=`umask` - umask 0077 - if $mkdir "$tmpdir"; then - umask $save_umask - else - umask $save_umask - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi + tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. @@ -5728,7 +6165,7 @@ relink_command=\"$relink_command\"" fi # remove .exe since cygwin /usr/bin/install will append another - # one anyways + # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in @@ -5828,7 +6265,7 @@ relink_command=\"$relink_command\"" # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" @@ -5861,7 +6298,7 @@ relink_command=\"$relink_command\"" $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "----------------------------------------------------------------------" + $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; @@ -6078,9 +6515,17 @@ relink_command=\"$relink_command\"" rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - if test "$mode" = uninstall; then + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds @@ -6113,7 +6558,8 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. - fi + ;; + esac fi ;; @@ -6398,7 +6844,7 @@ esac $echo $echo "Try \`$modename --help' for more information about other modes." -exit $EXIT_SUCCESS +exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting @@ -6412,12 +6858,11 @@ exit $EXIT_SUCCESS # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes +disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: diff --git a/macos/src/config-mac.h b/macos/src/config-mac.h index 7281426..e9a8f9d 100644 --- a/macos/src/config-mac.h +++ b/macos/src/config-mac.h @@ -177,15 +177,6 @@ /* Define if you have the <zlib.h> header file. */ #undef HAVE_ZLIB_H -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Name of package */ #define PACKAGE @@ -11,9 +11,6 @@ * daniel@veillard.com */ -/* TODO add compression support, Send the Accept- , and decompress on the - fly with ZLIB if found at compile-time */ - #define NEED_SOCKETS #define IN_LIBXML #include "libxml.h" @@ -66,6 +63,10 @@ #ifdef SUPPORT_IP6 #include <resolv.h> #endif +#ifdef HAVE_ZLIB_H +#include <zlib.h> +#endif + #ifdef VMS #include <stropts> @@ -152,6 +153,10 @@ typedef struct xmlNanoHTTPCtxt { char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */ char *encoding; /* encoding extracted from the contentType */ char *mimeType; /* Mime-Type extracted from the contentType */ +#ifdef HAVE_ZLIB_H + z_stream *strm; /* Zlib stream object */ + int usesGzip; /* "Content-Encoding: gzip" was detected */ +#endif } xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr; static int initialized = 0; @@ -413,6 +418,13 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType); if (ctxt->location != NULL) xmlFree(ctxt->location); if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); +#ifdef HAVE_ZLIB_H + if (ctxt->strm != NULL) { + inflateEnd(ctxt->strm); + xmlFree(ctxt->strm); + } +#endif + ctxt->state = XML_NANO_HTTP_NONE; if (ctxt->fd >= 0) closesocket(ctxt->fd); ctxt->fd = -1; @@ -752,6 +764,26 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); ctxt->authHeader = xmlMemStrdup(cur); +#ifdef HAVE_ZLIB_H + } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Encoding:", 17) ) { + cur += 17; + while ((*cur == ' ') || (*cur == '\t')) cur++; + if ( !xmlStrncasecmp( BAD_CAST cur, BAD_CAST"gzip", 4) ) { + ctxt->usesGzip = 1; + + ctxt->strm = xmlMalloc(sizeof(z_stream)); + + if (ctxt->strm != NULL) { + ctxt->strm->zalloc = Z_NULL; + ctxt->strm->zfree = Z_NULL; + ctxt->strm->opaque = Z_NULL; + ctxt->strm->avail_in = 0; + ctxt->strm->next_in = Z_NULL; + + inflateInit2( ctxt->strm, 31 ); + } + } +#endif } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) { cur += 15; ctxt->ContentLength = strtol( cur, NULL, 10 ); @@ -946,14 +978,21 @@ xmlNanoHTTPConnectHost(const char *host, int port) memset (&sockin, 0, sizeof(sockin)); #ifdef SUPPORT_IP6 memset (&sockin6, 0, sizeof(sockin6)); +#endif + +#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6) if (have_ipv6 ()) -#if !defined(HAVE_GETADDRINFO) && defined(RES_USE_INET6) { if (!(_res.options & RES_INIT)) res_init(); _res.options |= RES_USE_INET6; } -#elif defined(HAVE_GETADDRINFO) +#endif + +#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32) + if (have_ipv6 ()) +#endif +#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32)) { int status; struct addrinfo hints, *res, *result; @@ -969,42 +1008,45 @@ xmlNanoHTTPConnectHost(const char *host, int port) } for (res = result; res; res = res->ai_next) { - if (res->ai_family == AF_INET || res->ai_family == AF_INET6) { - if (res->ai_family == AF_INET6) { - if (res->ai_addrlen > sizeof(sockin6)) { - __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - freeaddrinfo (result); - return (-1); - } - memcpy (&sockin6, res->ai_addr, res->ai_addrlen); - sockin6.sin6_port = htons (port); - addr = (struct sockaddr *)&sockin6; - } - else { - if (res->ai_addrlen > sizeof(sockin)) { - __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); - freeaddrinfo (result); - return (-1); - } - memcpy (&sockin, res->ai_addr, res->ai_addrlen); - sockin.sin_port = htons (port); - addr = (struct sockaddr *)&sockin; + if (res->ai_family == AF_INET) { + if (res->ai_addrlen > sizeof(sockin)) { + __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); + freeaddrinfo (result); + return (-1); } - - s = xmlNanoHTTPConnectAttempt (addr); - if (s != -1) { + memcpy (&sockin, res->ai_addr, res->ai_addrlen); + sockin.sin_port = htons (port); + addr = (struct sockaddr *)&sockin; +#ifdef SUPPORT_IP6 + } else if (have_ipv6 () && (res->ai_family == AF_INET6)) { + if (res->ai_addrlen > sizeof(sockin6)) { + __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n"); freeaddrinfo (result); - return (s); + return (-1); } + memcpy (&sockin6, res->ai_addr, res->ai_addrlen); + sockin6.sin6_port = htons (port); + addr = (struct sockaddr *)&sockin6; +#endif + } else + continue; /* for */ + + s = xmlNanoHTTPConnectAttempt (addr); + if (s != -1) { + freeaddrinfo (result); + return (s); } } + if (result) freeaddrinfo (result); - return (-1); - } else + } #endif +#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32) + else #endif - { +#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32) + { h = gethostbyname (host); if (h == NULL) { @@ -1080,6 +1122,8 @@ xmlNanoHTTPConnectHost(const char *host, int port) return (s); } } +#endif + #ifdef DEBUG_HTTP xmlGenericError(xmlGenericErrorContext, "xmlNanoHTTPConnectHost: unable to connect to '%s'.\n", @@ -1144,11 +1188,38 @@ xmlNanoHTTPOpenRedir(const char *URL, char **contentType, char **redir) { int xmlNanoHTTPRead(void *ctx, void *dest, int len) { xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; +#ifdef HAVE_ZLIB_H + int bytes_read = 0; + int orig_avail_in; + int z_ret; +#endif if (ctx == NULL) return(-1); if (dest == NULL) return(-1); if (len <= 0) return(0); +#ifdef HAVE_ZLIB_H + if (ctxt->usesGzip == 1) { + if (ctxt->strm == NULL) return(0); + + ctxt->strm->next_out = dest; + ctxt->strm->avail_out = len; + + do { + orig_avail_in = ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr - bytes_read; + ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read); + + z_ret = inflate(ctxt->strm, Z_NO_FLUSH); + bytes_read += orig_avail_in - ctxt->strm->avail_in; + + if (z_ret != Z_OK) break; + } while (ctxt->strm->avail_out > 0 && xmlNanoHTTPRecv(ctxt) > 0); + + ctxt->inrptr += bytes_read; + return(len - ctxt->strm->avail_out); + } +#endif + while (ctxt->inptr - ctxt->inrptr < len) { if (xmlNanoHTTPRecv(ctxt) <= 0) break; } @@ -1263,6 +1334,9 @@ retry: if (ctxt->query != NULL) blen += strlen(ctxt->query) + 1; blen += strlen(method) + strlen(ctxt->path) + 24; +#ifdef HAVE_ZLIB_H + blen += 23; +#endif bp = (char*)xmlMallocAtomic(blen); if ( bp == NULL ) { xmlNanoHTTPFreeCtxt( ctxt ); @@ -1291,6 +1365,10 @@ retry: p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n", ctxt->hostname); +#ifdef HAVE_ZLIB_H + p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n"); +#endif + if (contentType != NULL && *contentType) p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType); @@ -2177,6 +2177,9 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, if (val != 0) { COPY_BUF(0,buffer,nbchars,val); } + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) { if (xmlParserDebugEntities) xmlGenericError(xmlGenericErrorContext, @@ -2187,6 +2190,9 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (ent->content != NULL) { COPY_BUF(0,buffer,nbchars,ent->content[0]); + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "predefined entity has no content\n"); @@ -3449,12 +3455,10 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { get_more_space: while (*in == 0x20) in++; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more_space; } if (*in == '<') { @@ -3490,12 +3494,10 @@ get_more: } ctxt->input->col = ccol; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more; } if (*in == ']') { @@ -3537,12 +3539,16 @@ get_more: ctxt->input->cur = in; if (*in == 0xD) { in++; + if (!*in) /* if end of current chunk return */ + return; if (*in == 0xA) { ctxt->input->cur = in; in++; ctxt->input->line++; ctxt->input->col = 1; continue; /* while */ } + if (!*in) /* if end of current chunk return */ + return; in--; } if (*in == '<') { @@ -3856,12 +3862,10 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { in = ctxt->input->cur; do { if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); } get_more: ccol = ctxt->input->col; @@ -3873,12 +3877,10 @@ get_more: } ctxt->input->col = ccol; if (*in == 0xA) { - ctxt->input->line++; ctxt->input->col = 1; - in++; - while (*in == 0xA) { + do { ctxt->input->line++; ctxt->input->col = 1; in++; - } + } while (*in == 0xA); goto get_more; } nbchar = in - ctxt->input->cur; @@ -3929,6 +3931,8 @@ get_more: ctxt->input->line++; ctxt->input->col = 1; continue; /* while */ } + if (!*in) /* if end of current chunk return */ + return; in--; } SHRINK; @@ -8889,6 +8893,13 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { xmlChar *version; /* + * This value for standalone indicates that the document has an + * XML declaration but it does not have a standalone attribute. + * It will be overwritten later if a standalone attribute is found. + */ + ctxt->input->standalone = -2; + + /* * We know that '<?xml' is here. */ SKIP(5); diff --git a/parserInternals.c b/parserInternals.c index f3fcd6f..9e9e03f 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1206,50 +1206,13 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, } return (0); - } else { - if ((input->length == 0) || (input->buf == NULL)) { - /* - * When parsing a static memory array one must know the - * size to be able to convert the buffer. - */ - xmlErrInternal(ctxt, "switching encoding : no input\n", NULL); - return (-1); - } else { - int processed; - - /* - * Shrink the current input buffer. - * Move it as the raw buffer and create a new input buffer - */ - processed = input->cur - input->base; - - input->buf->raw = xmlBufferCreate(); - xmlBufferAdd(input->buf->raw, input->cur, - input->length - processed); - input->buf->buffer = xmlBufferCreate(); - - /* - * convert as much as possible of the raw input - * to the parser reading buffer. - */ - nbchars = xmlCharEncInFunc(input->buf->encoder, - input->buf->buffer, - input->buf->raw); - if (nbchars < 0) { - xmlErrInternal(ctxt, - "switching encoding: encoder error\n", - NULL); - return (-1); - } - - /* - * Conversion succeeded, get rid of the old buffer - */ - if ((input->free != NULL) && (input->base != NULL)) - input->free((xmlChar *) input->base); - input->base = input->cur = input->buf->buffer->content; - input->end = &input->base[input->buf->buffer->use]; - } + } else if (input->length == 0) { + /* + * When parsing a static memory array one must know the + * size to be able to convert the buffer. + */ + xmlErrInternal(ctxt, "switching encoding : no input\n", NULL); + return (-1); } return (0); } @@ -1492,8 +1455,13 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) { if (ctxt == NULL) return(NULL); buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE); if (buf == NULL) { - __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", - (const char *) filename); + if (filename == NULL) + __xmlLoaderErr(ctxt, + "failed to load external entity: NULL filename \n", + NULL); + else + __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", + (const char *) filename); return(NULL); } @@ -1912,7 +1880,7 @@ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, int found = 0; if ((seq == NULL) || (node == NULL)) - return (-1); + return ((unsigned long) -1); /* Do a binary search for the key */ lower = 1; @@ -46,26 +46,43 @@ #define XML_STREAM_STEP_FINAL 2 #define XML_STREAM_STEP_ROOT 4 #define XML_STREAM_STEP_ATTR 8 +#define XML_STREAM_STEP_NODE 16 +#define XML_STREAM_STEP_IN_SET 32 /* -* TODO: This is used on _xmlStreamCtxt, so don't use any values -* from xmlPatternFlags. +* NOTE: Those private flags (XML_STREAM_xxx) are used +* in _xmlStreamCtxt->flag. They extend the public +* xmlPatternFlags, so be carefull not to interfere with the +* reserved values for xmlPatternFlags. */ +#define XML_STREAM_FINAL_IS_ANY_NODE 1<<14 +#define XML_STREAM_FROM_ROOT 1<<15 #define XML_STREAM_DESC 1<<16 +/* +* XML_STREAM_ANY_NODE is used for comparison against +* xmlElementType enums, to indicate a node of any type. +*/ +#define XML_STREAM_ANY_NODE 100 + #define XML_PATTERN_NOTPATTERN (XML_PATTERN_XPATH | \ XML_PATTERN_XSSEL | \ XML_PATTERN_XSFIELD) -#define XML_STREAM_XS_IDC(item) (item->flags & \ +#define XML_STREAM_XS_IDC(c) ((c)->flags & \ (XML_PATTERN_XSSEL | XML_PATTERN_XSFIELD)) +#define XML_STREAM_XS_IDC_SEL(c) ((c)->flags & XML_PATTERN_XSSEL) + +#define XML_STREAM_XS_IDC_FIELD(c) ((c)->flags & XML_PATTERN_XSFIELD) + typedef struct _xmlStreamStep xmlStreamStep; typedef xmlStreamStep *xmlStreamStepPtr; struct _xmlStreamStep { int flags; /* properties of that step */ const xmlChar *name; /* first string value if NULL accept all */ const xmlChar *ns; /* second string value */ + int nodeType; /* type of node */ }; typedef struct _xmlStreamComp xmlStreamComp; @@ -690,6 +707,7 @@ rollback: #define CUR (*ctxt->cur) #define SKIP(val) ctxt->cur += (val) #define NXT(val) ctxt->cur[(val)] +#define PEEKPREV(val) ctxt->cur[-(val)] #define CUR_PTR ctxt->cur #define SKIP_BLANKS \ @@ -884,6 +902,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) { xmlChar *name = NULL; xmlChar *URL = NULL; + SKIP_BLANKS; name = xmlPatScanNCName(ctxt); if (name == NULL) { if (CUR == '*') { @@ -901,6 +920,13 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) { xmlChar *prefix = name; NEXT; + + if (IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + xmlFree(prefix); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -967,25 +993,39 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { xmlChar *token = NULL; xmlChar *name = NULL; xmlChar *URL = NULL; + int hasBlanks = 0; SKIP_BLANKS; if (CUR == '.') { + /* + * Context node. + */ NEXT; PUSH(XML_OP_ELEM, NULL, NULL); return; } + if (CUR == '@') { + /* + * Attribute test. + */ + if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) { + ERROR5(NULL, NULL, NULL, + "Unexpected attribute axis in '%s'.\n", ctxt->base); + ctxt->error = 1; + return; + } + NEXT; + xmlCompileAttributeTest(ctxt); + if (ctxt->error != 0) + goto error; + return; + } name = xmlPatScanNCName(ctxt); if (name == NULL) { if (CUR == '*') { NEXT; PUSH(XML_OP_ALL, NULL, NULL); return; - } else if (CUR == '@') { - NEXT; - xmlCompileAttributeTest(ctxt); - if (ctxt->error != 0) - goto error; - return; } else { ERROR(NULL, NULL, NULL, "xmlCompileStepPattern : Name expected\n"); @@ -993,13 +1033,21 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { return; } } - SKIP_BLANKS; + if (IS_BLANK_CH(CUR)) { + hasBlanks = 1; + SKIP_BLANKS; + } if (CUR == ':') { NEXT; if (CUR != ':') { xmlChar *prefix = name; - int i; + int i; + if (hasBlanks || IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -1060,6 +1108,11 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { int i; NEXT; + if (IS_BLANK_CH(CUR)) { + ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL); + ctxt->error = 1; + goto error; + } /* * This is a namespace match */ @@ -1104,13 +1157,19 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) { } else if (xmlStrEqual(name, (const xmlChar *) "attribute")) { xmlFree(name); name = NULL; + if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) { + ERROR5(NULL, NULL, NULL, + "Unexpected attribute axis in '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } xmlCompileAttributeTest(ctxt); if (ctxt->error != 0) goto error; return; } else { - ERROR(NULL, NULL, NULL, - "xmlCompileStepPattern : 'child' or 'attribute' expected\n"); + ERROR5(NULL, NULL, NULL, + "The 'element' or 'attribute' axis is expected.\n", NULL); ctxt->error = 1; goto error; } @@ -1167,20 +1226,41 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { NEXT; NEXT; NEXT; + /* Check for incompleteness. */ + SKIP_BLANKS; + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } } if (CUR == '@') { NEXT; xmlCompileAttributeTest(ctxt); SKIP_BLANKS; + /* TODO: check for incompleteness */ if (CUR != 0) { xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } } else { if (CUR == '/') { PUSH(XML_OP_ROOT, NULL, NULL); NEXT; + /* Check for incompleteness. */ + SKIP_BLANKS; + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; + } } xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; SKIP_BLANKS; while (CUR == '/') { if (NXT(1) == '/') { @@ -1189,13 +1269,21 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) { NEXT; SKIP_BLANKS; xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } else { PUSH(XML_OP_PARENT, NULL, NULL); NEXT; SKIP_BLANKS; - if (CUR != 0) { - xmlCompileStepPattern(ctxt); + if (CUR == 0) { + ERROR5(NULL, NULL, NULL, + "Incomplete expression '%s'.\n", ctxt->base); + ctxt->error = 1; + goto error; } + xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; } } } @@ -1208,6 +1296,107 @@ error: return; } +/** + * xmlCompileIDCXPathPath: + * @ctxt: the compilation context + * + * Compile the Path Pattern and generates a precompiled + * form suitable for fast matching. + * + * [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + */ +static void +xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) { + SKIP_BLANKS; + if (CUR == '/') { + ERROR5(NULL, NULL, NULL, + "Unexpected selection of the document root in '%s'.\n", + ctxt->base); + goto error; + } + ctxt->comp->flags |= PAT_FROM_CUR; + + if (CUR == '.') { + /* "." - "self::node()" */ + NEXT; + SKIP_BLANKS; + if (CUR == 0) { + /* + * Selection of the context node. + */ + PUSH(XML_OP_ELEM, NULL, NULL); + return; + } + if (CUR != '/') { + /* TODO: A more meaningful error message. */ + ERROR5(NULL, NULL, NULL, + "Unexpected token after '.' in '%s'.\n", ctxt->base); + goto error; + } + /* "./" - "self::node()/" */ + NEXT; + SKIP_BLANKS; + if (CUR == '/') { + if (IS_BLANK_CH(PEEKPREV(1))) { + /* + * Disallow "./ /" + */ + ERROR5(NULL, NULL, NULL, + "Unexpected '/' token in '%s'.\n", ctxt->base); + goto error; + } + /* ".//" - "self:node()/descendant-or-self::node()/" */ + PUSH(XML_OP_ANCESTOR, NULL, NULL); + NEXT; + SKIP_BLANKS; + } + if (CUR == 0) + goto error_unfinished; + } + /* + * Process steps. + */ + do { + xmlCompileStepPattern(ctxt); + if (ctxt->error != 0) + goto error; + SKIP_BLANKS; + if (CUR != '/') + break; + PUSH(XML_OP_PARENT, NULL, NULL); + NEXT; + SKIP_BLANKS; + if (CUR == '/') { + /* + * Disallow subsequent '//'. + */ + ERROR5(NULL, NULL, NULL, + "Unexpected subsequent '//' in '%s'.\n", + ctxt->base); + goto error; + } + if (CUR == 0) + goto error_unfinished; + + } while (CUR != 0); + + if (CUR != 0) { + ERROR5(NULL, NULL, NULL, + "Failed to compile expression '%s'.\n", ctxt->base); + ctxt->error = 1; + } + return; +error: + ctxt->error = 1; + return; + +error_unfinished: + ctxt->error = 1; + ERROR5(NULL, NULL, NULL, + "Unfinished expression '%s'.\n", ctxt->base); + return; +} + /************************************************************************ * * * The streaming code * @@ -1334,7 +1523,7 @@ xmlFreeStreamComp(xmlStreamCompPtr comp) { */ static int xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, - const xmlChar *ns, int flags) { + const xmlChar *ns, int nodeType, int flags) { xmlStreamStepPtr cur; if (comp->nbStep >= comp->maxStep) { @@ -1352,6 +1541,7 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, cur->flags = flags; cur->name = name; cur->ns = ns; + cur->nodeType = nodeType; return(comp->nbStep - 1); } @@ -1366,7 +1556,8 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name, static int xmlStreamCompile(xmlPatternPtr comp) { xmlStreamCompPtr stream; - int i, s = 0, root = 0, flags = 0; + int i, s = 0, root = 0, flags = 0, prevs = -1; + xmlStepOp step; if ((comp == NULL) || (comp->steps == NULL)) return(-1); @@ -1380,6 +1571,8 @@ xmlStreamCompile(xmlPatternPtr comp) { stream = xmlNewStreamComp(0); if (stream == NULL) return(-1); + /* Note that the stream will have no steps in this case. */ + stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE; comp->stream = stream; return(0); } @@ -1392,19 +1585,13 @@ xmlStreamCompile(xmlPatternPtr comp) { xmlDictReference(stream->dict); } - /* - * Skip leading ./ on relative paths - */ - i = 0; - while ((comp->flags & PAT_FROM_CUR) && (comp->nbStep > i + 2) && - (comp->steps[i].op == XML_OP_ELEM) && - (comp->steps[i].value == NULL) && - (comp->steps[i].value2 == NULL) && - (comp->steps[i + 1].op == XML_OP_PARENT)) { - i += 2; - } + i = 0; + if (comp->flags & PAT_FROM_ROOT) + stream->flags |= XML_STREAM_FROM_ROOT; + for (;i < comp->nbStep;i++) { - switch (comp->steps[i].op) { + step = comp->steps[i]; + switch (step.op) { case XML_OP_END: break; case XML_OP_ROOT: @@ -1413,51 +1600,95 @@ xmlStreamCompile(xmlPatternPtr comp) { root = 1; break; case XML_OP_NS: - s = xmlStreamCompAddStep(stream, NULL, - comp->steps[i].value, flags); - flags = 0; + s = xmlStreamCompAddStep(stream, NULL, step.value, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; case XML_OP_ATTR: flags |= XML_STREAM_STEP_ATTR; - s = xmlStreamCompAddStep(stream, comp->steps[i].value, - comp->steps[i].value2, flags); + prevs = -1; + s = xmlStreamCompAddStep(stream, + step.value, step.value2, XML_ATTRIBUTE_NODE, flags); flags = 0; if (s < 0) goto error; break; - case XML_OP_ELEM: - if ((comp->steps[i].value == NULL) && - (comp->steps[i].value2 == NULL) && - (comp->nbStep > i + 2) && - (comp->steps[i + 1].op == XML_OP_PARENT)) { - i++; - continue; - } + case XML_OP_ELEM: + if ((step.value == NULL) && (step.value2 == NULL)) { + /* + * We have a "." or "self::node()" here. + * Eliminate redundant self::node() tests like in "/./." + * or "//./" + * The only case we won't eliminate is "//.", i.e. if + * self::node() is the last node test and we had + * continuation somewhere beforehand. + */ + if ((comp->nbStep == i + 1) && + (flags & XML_STREAM_STEP_DESC)) { + /* + * Mark the special case where the expression resolves + * to any type of node. + */ + if (comp->nbStep == i + 1) { + stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE; + } + flags |= XML_STREAM_STEP_NODE; + s = xmlStreamCompAddStep(stream, NULL, NULL, + XML_STREAM_ANY_NODE, flags); + if (s < 0) + goto error; + flags = 0; + /* + * If there was a previous step, mark it to be added to + * the result node-set; this is needed since only + * the last step will be marked as "final" and only + * "final" nodes are added to the resulting set. + */ + if (prevs != -1) { + stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET; + prevs = -1; + } + break; + + } else { + /* Just skip this one. */ + continue; + } + } + /* An element node. */ + s = xmlStreamCompAddStep(stream, step.value, step.value2, + XML_ELEMENT_NODE, flags); + if (s < 0) + goto error; + prevs = s; + flags = 0; + break; case XML_OP_CHILD: - s = xmlStreamCompAddStep(stream, comp->steps[i].value, - comp->steps[i].value2, flags); - flags = 0; + /* An element node child. */ + s = xmlStreamCompAddStep(stream, step.value, step.value2, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; case XML_OP_ALL: - s = xmlStreamCompAddStep(stream, NULL, NULL, flags); - flags = 0; + s = xmlStreamCompAddStep(stream, NULL, NULL, + XML_ELEMENT_NODE, flags); if (s < 0) goto error; + prevs = s; + flags = 0; break; - case XML_OP_PARENT: - if ((comp->nbStep > i + 1) && - (comp->steps[i + 1].op == XML_OP_ELEM) && - (comp->steps[i + 1].value == NULL) && - (comp->steps[i + 1].value2 == NULL)) { - i++; - continue; - } + case XML_OP_PARENT: break; case XML_OP_ANCESTOR: + /* Skip redundant continuations. */ + if (flags & XML_STREAM_STEP_DESC) + break; flags |= XML_STREAM_STEP_DESC; /* * Mark the expression as having "//". @@ -1481,6 +1712,8 @@ xmlStreamCompile(xmlPatternPtr comp) { stream->steps[0].flags |= XML_STREAM_STEP_DESC; } } + if (stream->nbStep <= s) + goto error; stream->steps[s].flags |= XML_STREAM_STEP_FINAL; if (root) stream->steps[0].flags |= XML_STREAM_STEP_ROOT; @@ -1603,7 +1836,7 @@ xmlStreamCtxtAddState(xmlStreamCtxtPtr comp, int idx, int level) { static int xmlStreamPushInternal(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns, - xmlElementType nodeType) { + int nodeType) { int ret = 0, err = 0, final = 0, tmp, i, m, match, step, desc; xmlStreamCompPtr comp; #ifdef DEBUG_STREAMING @@ -1615,16 +1848,34 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, while (stream != NULL) { comp = stream->comp; - if ((name == NULL) && (ns == NULL)) { + + if ((nodeType == XML_ELEMENT_NODE) && + (name == NULL) && (ns == NULL)) { + /* We have a document node here (or a reset). */ stream->nbState = 0; stream->level = 0; stream->blockLevel = -1; - if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) { - tmp = xmlStreamCtxtAddState(stream, 0, 0); - if (tmp < 0) - err++; - if (comp->nbStep == 0) + if (comp->flags & XML_STREAM_FROM_ROOT) { + if (comp->nbStep == 0) { + /* TODO: We have a "/." here? */ ret = 1; + } else { + if ((comp->nbStep == 1) && + (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) && + (comp->steps[0].flags & XML_STREAM_STEP_DESC)) + { + /* + * In the case of "//." the document node will match + * as well. + */ + ret = 1; + } else if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) { + /* TODO: Do we need this ? */ + tmp = xmlStreamCtxtAddState(stream, 0, 0); + if (tmp < 0) + err++; + } + } } stream = stream->next; continue; /* while */ @@ -1647,7 +1898,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, * or traditional XPath expressions, this will match if * we are at the first level only, otherwise on every level. */ - if ((nodeType == XML_ELEMENT_NODE) && + if ((nodeType != XML_ATTRIBUTE_NODE) && (((stream->flags & XML_PATTERN_NOTPATTERN) == 0) || (stream->level == 0))) { ret = 1; @@ -1662,6 +1913,19 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, stream->level++; goto stream_next; } + + if ((nodeType != XML_ELEMENT_NODE) && + (nodeType != XML_ATTRIBUTE_NODE) && + ((comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) == 0)) { + /* + * No need to process nodes of other types if we don't + * resolve to those types. + * TODO: Do we need to block the context here? + */ + stream->level++; + goto stream_next; + } + /* * Check evolution of existing states */ @@ -1710,14 +1974,24 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, /* * Check for correct node-type. */ - if ((nodeType == XML_ATTRIBUTE_NODE) && - ((comp->steps[step].flags & XML_STREAM_STEP_ATTR) == 0)) - goto next_state; + if (comp->steps[step].nodeType != nodeType) { + if (comp->steps[step].nodeType == XML_ATTRIBUTE_NODE) { + /* + * Block this expression for deeper evaluation. + */ + if ((comp->flags & XML_STREAM_DESC) == 0) + stream->blockLevel = stream->level +1; + goto next_state; + } else if (comp->steps[step].nodeType != XML_STREAM_ANY_NODE) + goto next_state; + } /* * Compare local/namespace-name. */ match = 0; - if (comp->dict) { + if (comp->steps[step].nodeType == XML_STREAM_ANY_NODE) { + match = 1; + } else if (comp->dict) { if (comp->steps[step].name == NULL) { if (comp->steps[step].ns == NULL) match = 1; @@ -1756,7 +2030,15 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream, stream->level + 1); } } - } + if ((ret != 1) && + (comp->steps[step].flags & XML_STREAM_STEP_IN_SET)) { + /* + * Check if we have a special case like "foo/bar//.", where + * "foo" is selected as well. + */ + ret = 1; + } + } if (((comp->flags & XML_STREAM_DESC) == 0) && ((! match) || final)) { /* @@ -1774,6 +2056,8 @@ next_state: /* * Re/enter the expression. + * Don't reenter if it's an absolute expression like "/foo", + * except "//foo". */ if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) goto stream_next; @@ -1816,14 +2100,19 @@ compare: /* * Check expected node-type. */ - if ((nodeType == XML_ATTRIBUTE_NODE) && - ((comp->steps[0].flags & XML_STREAM_STEP_ATTR) == 0)) - goto stream_next; + if (comp->steps[0].nodeType != nodeType) { + if (nodeType == XML_ATTRIBUTE_NODE) + goto stream_next; + else if (comp->steps[0].nodeType != XML_STREAM_ANY_NODE) + goto stream_next; + } /* * Compare local/namespace-name. */ match = 0; - if (comp->steps[0].name == NULL) { + if (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) { + match = 1; + } else if (comp->steps[0].name == NULL) { if (comp->steps[0].ns == NULL) match = 1; else { @@ -1840,12 +2129,20 @@ compare: match = ((xmlStrEqual(comp->steps[0].name, name)) && (xmlStrEqual(comp->steps[0].ns, ns))); } - if (match) { - final = comp->steps[0].flags & XML_STREAM_STEP_FINAL; + final = comp->steps[0].flags & XML_STREAM_STEP_FINAL; + if (match) { if (final) ret = 1; else xmlStreamCtxtAddState(stream, 1, stream->level); + if ((ret != 1) && + (comp->steps[0].flags & XML_STREAM_STEP_IN_SET)) { + /* + * Check if we have a special case like "foo//.", where + * "foo" is selected as well. + */ + ret = 1; + } } if (((comp->flags & XML_STREAM_DESC) == 0) && ((! match) || final)) { @@ -1855,7 +2152,7 @@ compare: */ stream->blockLevel = stream->level; } - + stream_next: stream = stream->next; } /* while stream != NULL */ @@ -1879,6 +2176,7 @@ stream_next: * to come from the dictionary. * Both @name and @ns being NULL means the / i.e. the root of the document. * This can also act as a reset. + * Otherwise the function will act as if it has been given an element-node. * * Returns: -1 in case of error, 1 if the current state in the stream is a * match and 0 otherwise. @@ -1886,7 +2184,35 @@ stream_next: int xmlStreamPush(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns) { - return (xmlStreamPushInternal(stream, name, ns, XML_ELEMENT_NODE)); + return (xmlStreamPushInternal(stream, name, ns, (int) XML_ELEMENT_NODE)); +} + +/** + * xmlStreamPushNode: + * @stream: the stream context + * @name: the current name + * @ns: the namespace name + * @nodeType: the type of the node being pushed + * + * Push new data onto the stream. NOTE: if the call xmlPatterncompile() + * indicated a dictionary, then strings for name and ns will be expected + * to come from the dictionary. + * Both @name and @ns being NULL means the / i.e. the root of the document. + * This can also act as a reset. + * Different from xmlStreamPush() this function can be fed with nodes of type: + * element-, attribute-, text-, cdata-section-, comment- and + * processing-instruction-node. + * + * Returns: -1 in case of error, 1 if the current state in the stream is a + * match and 0 otherwise. + */ +int +xmlStreamPushNode(xmlStreamCtxtPtr stream, + const xmlChar *name, const xmlChar *ns, + int nodeType) +{ + return (xmlStreamPushInternal(stream, name, ns, + nodeType)); } /** @@ -1900,6 +2226,7 @@ xmlStreamPush(xmlStreamCtxtPtr stream, * to come from the dictionary. * Both @name and @ns being NULL means the / i.e. the root of the document. * This can also act as a reset. +* Otherwise the function will act as if it has been given an attribute-node. * * Returns: -1 in case of error, 1 if the current state in the stream is a * match and 0 otherwise. @@ -1907,7 +2234,7 @@ xmlStreamPush(xmlStreamCtxtPtr stream, int xmlStreamPushAttr(xmlStreamCtxtPtr stream, const xmlChar *name, const xmlChar *ns) { - return (xmlStreamPushInternal(stream, name, ns, XML_ATTRIBUTE_NODE)); + return (xmlStreamPushInternal(stream, name, ns, (int) XML_ATTRIBUTE_NODE)); } /** @@ -1921,11 +2248,9 @@ xmlStreamPushAttr(xmlStreamCtxtPtr stream, int xmlStreamPop(xmlStreamCtxtPtr stream) { int i, lev; - int ret; - + if (stream == NULL) return(-1); - ret = 0; while (stream != NULL) { /* * Reset block-level. @@ -1935,7 +2260,7 @@ xmlStreamPop(xmlStreamCtxtPtr stream) { stream->level--; if (stream->level < 0) - ret = -1; + return(-1); /* * Check evolution of existing states */ @@ -1952,6 +2277,31 @@ xmlStreamPop(xmlStreamCtxtPtr stream) { return(0); } +/** + * xmlStreamWantsAnyNode: + * @streamCtxt: the stream context + * + * Query if the streaming pattern additionally needs to be fed with + * text-, cdata-section-, comment- and processing-instruction-nodes. + * If the result is 0 then only element-nodes and attribute-nodes + * need to be pushed. + * + * Returns: 1 in case of need of nodes of the above described types, + * 0 otherwise. -1 on API errors. + */ +int +xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt) +{ + if (streamCtxt == NULL) + return(-1); + while (streamCtxt != NULL) { + if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) + return(1); + streamCtxt = streamCtxt->next; + } + return(0); +} + /************************************************************************ * * * The public interfaces * @@ -2008,7 +2358,10 @@ xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags, cur->flags = flags; ctxt->comp = cur; - xmlCompilePathPattern(ctxt); + if (XML_STREAM_XS_IDC(cur)) + xmlCompileIDCXPathPath(ctxt); + else + xmlCompilePathPattern(ctxt); if (ctxt->error != 0) goto error; xmlFreePatParserContext(ctxt); diff --git a/python/libxml.py b/python/libxml.py index 86bdd92..0c2a19a 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -211,7 +211,8 @@ class SAXCallback: pass def warning(self, msg): - print msg + #print msg + pass def error(self, msg): raise parserError(msg) diff --git a/python/libxml2-py.c b/python/libxml2-py.c index b656d7f..b5bf52f 100644 --- a/python/libxml2-py.c +++ b/python/libxml2-py.c @@ -1497,15 +1497,15 @@ libxml_xmlSchemaValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { int c_retval; xmlSchemaValidCtxtPtr ctxt; PyObject *pyobj_ctxt; - xmlDocPtr doc; - PyObject *pyobj_doc; + xmlDocPtr instance; + PyObject *pyobj_instance; - if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_doc)) + if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_instance)) return(NULL); ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt); - doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); + instance = (xmlDocPtr) PyxmlNode_Get(pyobj_instance); - c_retval = xmlSchemaValidateDoc(ctxt, doc); + c_retval = xmlSchemaValidateDoc(ctxt, instance); py_retval = libxml_intWrap((int) c_retval); return(py_retval); } @@ -5874,6 +5874,21 @@ libxml_xmlUCSIsTibetan(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_UNICODE_ENABLED) */ +PyObject * +libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + xmlChar * c_retval; + xmlChar * utf; + int len; + + if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len)) + return(NULL); + + c_retval = xmlUTF8Strndup(utf, len); + py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval); + return(py_retval); +} + #if defined(LIBXML_LEGACY_ENABLED) PyObject * libxml_xmlNewGlobalNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -7689,6 +7704,28 @@ libxml_xmlReaderNewMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_READER_ENABLED) */ +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) +PyObject * +libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + xmlTextReaderPtr reader; + PyObject *pyobj_reader; + xmlSchemaValidCtxtPtr ctxt; + PyObject *pyobj_ctxt; + int options; + + if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderSchemaValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options)) + return(NULL); + reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader); + ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt); + + c_retval = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options); + py_retval = libxml_intWrap((int) c_retval); + return(py_retval); +} + +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */ #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) PyObject * libxml_xmlNewProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -7783,7 +7820,7 @@ libxml_htmlInitAutoClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBU } #endif /* defined(LIBXML_HTML_ENABLED) */ -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) PyObject * libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -7800,7 +7837,7 @@ libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args return(py_retval); } -#endif /* defined(LIBXML_READER_ENABLED) */ +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */ #if defined(LIBXML_UNICODE_ENABLED) PyObject * libxml_xmlUCSIsTamil(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -10749,21 +10786,6 @@ libxml_xmlIsRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(py_retval); } -PyObject * -libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - xmlChar * c_retval; - xmlChar * utf; - int len; - - if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len)) - return(NULL); - - c_retval = xmlUTF8Strndup(utf, len); - py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval); - return(py_retval); -} - #if defined(LIBXML_XPATH_ENABLED) PyObject * libxml_xmlXPathGetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -12028,20 +12050,6 @@ libxml_xmlNodeSetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(Py_None); } -PyObject * -libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - xmlNodePtr cur; - PyObject *pyobj_cur; - - if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur)) - return(NULL); - cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur); - - xmlUnlinkNode(cur); - Py_INCREF(Py_None); - return(Py_None); -} - #if defined(LIBXML_DEBUG_ENABLED) PyObject * libxml_xmlBoolToText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -13675,7 +13683,7 @@ libxml_xmlDictCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_ return(Py_None); } -#if defined(LIBXML_READER_ENABLED) +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) PyObject * libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -13692,7 +13700,7 @@ libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args return(py_retval); } -#endif /* defined(LIBXML_READER_ENABLED) */ +#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */ PyObject * libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -14076,6 +14084,20 @@ libxml_xmlURISetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } PyObject * +libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + xmlNodePtr cur; + PyObject *pyobj_cur; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur)) + return(NULL); + cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur); + + xmlUnlinkNode(cur); + Py_INCREF(Py_None); + return(Py_None); +} + +PyObject * libxml_xmlCreateEntityParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; xmlParserCtxtPtr c_retval; diff --git a/python/setup.py b/python/setup.py index ff06a9c..a41ab3f 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.22", + version = "2.6.23", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", @@ -7331,7 +7331,6 @@ xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc) * * parse a schema definition resource and build an internal * XML Shema struture which can be used to validate instances. - * *WARNING* this interface is highly subject to change * * Returns the internal XML RelaxNG structure built from the resource or * NULL in case of error diff --git a/result/HTML/53867.html b/result/HTML/53867.html new file mode 100644 index 0000000..acdad7c --- /dev/null +++ b/result/HTML/53867.html @@ -0,0 +1,66 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<html><head><style> +....... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +</style></head></html> diff --git a/result/HTML/53867.html.err b/result/HTML/53867.html.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/result/HTML/53867.html.err diff --git a/result/HTML/53867.html.sax b/result/HTML/53867.html.sax new file mode 100644 index 0000000..81a9f15 --- /dev/null +++ b/result/HTML/53867.html.sax @@ -0,0 +1,26 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(style) +SAX.cdata( +....... +....................., 1000) +SAX.cdata(.............................., 1000) +SAX.cdata(.............................., 1000) +SAX.cdata(................ +............., 977) +SAX.endElement(style) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.endDocument() diff --git a/result/XPath/tests/nodespat b/result/XPath/tests/nodespat new file mode 100644 index 0000000..1efd87f --- /dev/null +++ b/result/XPath/tests/nodespat @@ -0,0 +1,94 @@ + +======================== +Expression: /. +Object is a Node Set : +Set contains 1 nodes: +1 / + +======================== +Expression: //. +Object is a Node Set : +Set contains 12 nodes: +1 / +2 ELEMENT root +3 ELEMENT foo +4 TEXT + content=txt +5 COMMENT + content=hello +6 CDATA_SECTION + content=data +7 PI target + content=data +8 ELEMENT bar +9 TEXT + content=txt +10 COMMENT + content=hello +11 CDATA_SECTION + content=data +12 PI target + content=data + +======================== +Expression: /root//. +Object is a Node Set : +Set contains 11 nodes: +1 ELEMENT root +2 ELEMENT foo +3 TEXT + content=txt +4 COMMENT + content=hello +5 CDATA_SECTION + content=data +6 PI target + content=data +7 ELEMENT bar +8 TEXT + content=txt +9 COMMENT + content=hello +10 CDATA_SECTION + content=data +11 PI target + content=data + +======================== +Expression: //.//./././/. +Object is a Node Set : +Set contains 12 nodes: +1 / +2 ELEMENT root +3 ELEMENT foo +4 TEXT + content=txt +5 COMMENT + content=hello +6 CDATA_SECTION + content=data +7 PI target + content=data +8 ELEMENT bar +9 TEXT + content=txt +10 COMMENT + content=hello +11 CDATA_SECTION + content=data +12 PI target + content=data + +======================== +Expression: /root//././/bar//. +Object is a Node Set : +Set contains 5 nodes: +1 ELEMENT bar +2 TEXT + content=txt +3 COMMENT + content=hello +4 CDATA_SECTION + content=data +5 PI target + content=data diff --git a/result/c14n/exc-without-comments/test-2 b/result/c14n/exc-without-comments/test-2 new file mode 100644 index 0000000..0b8a0cb --- /dev/null +++ b/result/c14n/exc-without-comments/test-2 @@ -0,0 +1,11 @@ +<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> + <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod> + <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod> + <Reference URI="#ndid:1234-5678-0987"> + <Transforms> + <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform> + </Transforms> + <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod> + <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue> + </Reference> + </SignedInfo>
\ No newline at end of file diff --git a/result/noent/ns7 b/result/noent/ns7 new file mode 100644 index 0000000..b5089e1 --- /dev/null +++ b/result/noent/ns7 @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<xml:test/> diff --git a/result/ns7 b/result/ns7 new file mode 100644 index 0000000..b5089e1 --- /dev/null +++ b/result/ns7 @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<xml:test/> diff --git a/result/ns7.rde b/result/ns7.rde new file mode 100644 index 0000000..16f5351 --- /dev/null +++ b/result/ns7.rde @@ -0,0 +1 @@ +0 1 xml:test 1 0 diff --git a/result/ns7.rdr b/result/ns7.rdr new file mode 100644 index 0000000..16f5351 --- /dev/null +++ b/result/ns7.rdr @@ -0,0 +1 @@ +0 1 xml:test 1 0 diff --git a/result/ns7.sax b/result/ns7.sax new file mode 100644 index 0000000..6020be9 --- /dev/null +++ b/result/ns7.sax @@ -0,0 +1,5 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElement(xml:test) +SAX.endElement(xml:test) +SAX.endDocument() diff --git a/result/ns7.sax2 b/result/ns7.sax2 new file mode 100644 index 0000000..2a2c714 --- /dev/null +++ b/result/ns7.sax2 @@ -0,0 +1,5 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.startElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace', 0, 0, 0) +SAX.endElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace') +SAX.endDocument() diff --git a/result/regexp/* b/result/regexp/* deleted file mode 100644 index b730347..0000000 --- a/result/regexp/* +++ /dev/null @@ -1 +0,0 @@ -Ops: 0 nodes, 0 cons diff --git a/result/regexp/hard b/result/regexp/hard index f348c08..28d6164 100644 --- a/result/regexp/hard +++ b/result/regexp/hard @@ -5,3 +5,8 @@ aaabbbb: Ok a0b: Ok aa0aaa: Fail b0aaa: Ok +Regexp: (\d{1,3}\.){3}\d{1,3} +1.2.3.4: Ok +1.22.333.44: Ok +1.2.3: Fail +1..2.3: Fail diff --git a/result/schemas/bug303566_1_1.err b/result/schemas/bug303566_1_1.err index 43515ea..9156981 100644 --- a/result/schemas/bug303566_1_1.err +++ b/result/schemas/bug303566_1_1.err @@ -1 +1 @@ -./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of key reference 'PartRefCountryDummy'. +./test/schemas/bug303566_1.xml:9: Schemas validity error : Element 'Part': No match found for key-sequence ['B'] of keyref 'PartRefCountryDummy'. diff --git a/result/schemas/bug312957_1_0.err b/result/schemas/bug312957_1_0.err index 5ab33fb..5ea089b 100644 --- a/result/schemas/bug312957_1_0.err +++ b/result/schemas/bug312957_1_0.err @@ -1 +1 @@ -./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of key reference 'sibling_key_ref'. +./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of keyref 'sibling_key_ref'. diff --git a/result/schemas/bug321475_1_0 b/result/schemas/bug321475_1_0 new file mode 100644 index 0000000..f943041 --- /dev/null +++ b/result/schemas/bug321475_1_0 @@ -0,0 +1 @@ +./test/schemas/bug321475_0.xml validates diff --git a/result/schemas/bug321475_1_0.err b/result/schemas/bug321475_1_0.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/result/schemas/bug321475_1_0.err diff --git a/result/schemas/bug322411_1_0 b/result/schemas/bug322411_1_0 new file mode 100644 index 0000000..79560fb --- /dev/null +++ b/result/schemas/bug322411_1_0 @@ -0,0 +1 @@ +./test/schemas/bug322411_0.xml validates diff --git a/result/schemas/bug322411_1_0.err b/result/schemas/bug322411_1_0.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/result/schemas/bug322411_1_0.err diff --git a/result/schemas/bug323510_1_0 b/result/schemas/bug323510_1_0 new file mode 100644 index 0000000..c33d685 --- /dev/null +++ b/result/schemas/bug323510_1_0 @@ -0,0 +1 @@ +./test/schemas/bug323510_0.xml fails to validate diff --git a/result/schemas/bug323510_1_0.err b/result/schemas/bug323510_1_0.err new file mode 100644 index 0000000..1655070 --- /dev/null +++ b/result/schemas/bug323510_1_0.err @@ -0,0 +1 @@ +./test/schemas/bug323510_0.xml:2: element foo: Schemas validity error : Element 'foo': Missing child element(s). Expected is ( bar ). diff --git a/result/schemas/decimal-1_1_0 b/result/schemas/decimal-1_1_0 new file mode 100644 index 0000000..041b31d --- /dev/null +++ b/result/schemas/decimal-1_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-1_0.xml fails to validate diff --git a/result/schemas/decimal-1_1_0.err b/result/schemas/decimal-1_1_0.err new file mode 100644 index 0000000..7f4fa9c --- /dev/null +++ b/result/schemas/decimal-1_1_0.err @@ -0,0 +1,8 @@ +./test/schemas/decimal-1_0.xml:16: element val: Schemas validity error : Element 'val': '.' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:17: element val: Schemas validity error : Element 'val': '-' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:18: element val: Schemas validity error : Element 'val': '+' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:19: element val: Schemas validity error : Element 'val': '*' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:20: element val: Schemas validity error : Element 'val': '- 1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:21: element val: Schemas validity error : Element 'val': '+ 1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:22: element val: Schemas validity error : Element 'val': '+ 0' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-1_0.xml:23: element val: Schemas validity error : Element 'val': '- 0' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/decimal-2_1_0 b/result/schemas/decimal-2_1_0 new file mode 100644 index 0000000..f68ca92 --- /dev/null +++ b/result/schemas/decimal-2_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-2_0.xml fails to validate diff --git a/result/schemas/decimal-2_1_0.err b/result/schemas/decimal-2_1_0.err new file mode 100644 index 0000000..fe663c2 --- /dev/null +++ b/result/schemas/decimal-2_1_0.err @@ -0,0 +1,4 @@ +./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-0.1' is less than the minimum value allowed ('0'). +./test/schemas/decimal-2_0.xml:12: element val: Schemas validity error : Element 'val': '-0.1' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'minInclusive'] The value '-1' is less than the minimum value allowed ('0'). +./test/schemas/decimal-2_0.xml:13: element val: Schemas validity error : Element 'val': '-1' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/decimal-3_1_0 b/result/schemas/decimal-3_1_0 new file mode 100644 index 0000000..5601535 --- /dev/null +++ b/result/schemas/decimal-3_1_0 @@ -0,0 +1 @@ +./test/schemas/decimal-3_0.xml fails to validate diff --git a/result/schemas/decimal-3_1_0.err b/result/schemas/decimal-3_1_0.err new file mode 100644 index 0000000..bba8cf9 --- /dev/null +++ b/result/schemas/decimal-3_1_0.err @@ -0,0 +1,8 @@ +./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.123' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:12: element val: Schemas validity error : Element 'val': '0.123' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '0.023' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:13: element val: Schemas validity error : Element 'val': '0.023' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '123' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:14: element val: Schemas validity error : Element 'val': '123' is not a valid value of the atomic type 'myDecimal'. +./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': [facet 'totalDigits'] The value '12.3' has more digits than are allowed ('2'). +./test/schemas/decimal-3_0.xml:15: element val: Schemas validity error : Element 'val': '12.3' is not a valid value of the atomic type 'myDecimal'. diff --git a/result/schemas/derivation-ok-extension-err_0_0.err b/result/schemas/derivation-ok-extension-err_0_0.err index 164c1f3..a0fba52 100644 --- a/result/schemas/derivation-ok-extension-err_0_0.err +++ b/result/schemas/derivation-ok-extension-err_0_0.err @@ -1 +1 @@ -./test/schemas/derivation-ok-extension-err_0.xsd:9: element attribute: Schemas parser error : local complex type, attribute decl. 'barA_1': Duplicate attribute use specified. +./test/schemas/derivation-ok-extension-err_0.xsd:6: element complexType: Schemas parser error : local complex type: Duplicate attribute use 'barA_1'. diff --git a/result/schemas/derivation-ok-extension_0_0.err b/result/schemas/derivation-ok-extension_0_0.err index e07739e..1314232 100644 --- a/result/schemas/derivation-ok-extension_0_0.err +++ b/result/schemas/derivation-ok-extension_0_0.err @@ -1 +1 @@ -./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Attribute use prohibitions are pointless when extending a type. +./test/schemas/derivation-ok-extension_0.xsd:10: element attribute: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}attribute': Skipping attribute use prohibition, since it is pointless when extending a type. diff --git a/result/schemas/derivation-ok-restriction-2-1-1_0_0.err b/result/schemas/derivation-ok-restriction-2-1-1_0_0.err index 49977e4..bd38dd2 100644 --- a/result/schemas/derivation-ok-restriction-2-1-1_0_0.err +++ b/result/schemas/derivation-ok-restriction-2-1-1_0_0.err @@ -1,6 +1,6 @@ -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base type is missing. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:16: element attribute: Schemas parser error : local complex type, attribute decl. 'barB_1': The 'optional' use is inconsistent with a matching 'required' use of the base type. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:23: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:25: element attribute: Schemas parser error : local complex type, attribute decl. 'barC_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:30: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_1': Neither a matching attribute use, nor a matching wildcard in the base type does exist. -./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:32: element attribute: Schemas parser error : local complex type, attribute decl. 'barD_2': Neither a matching attribute use, nor a matching wildcard in the base type does exist. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barB_1': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barC_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_1': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type, attribute use 'barD_2': Neither a matching attribute use, nor a matching wildcard exists in the base complex type definition '{http://FOO}typeA'. +./test/schemas/derivation-ok-restriction-2-1-1_0.xsd:6: element complexType: Schemas parser error : local complex type: A matching attribute use for the 'required' attribute use 'barB_3' of the base complex type definition '{http://FOO}typeA' is missing. diff --git a/result/schemas/derivation-ok-restriction-4-1-err_0_0.err b/result/schemas/derivation-ok-restriction-4-1-err_0_0.err index 8cacb07..72283fb 100644 --- a/result/schemas/derivation-ok-restriction-4-1-err_0_0.err +++ b/result/schemas/derivation-ok-restriction-4-1-err_0_0.err @@ -1,3 +1,3 @@ -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The type has an attribute wildcard, but the base type complex type 'base.type.A' does not have one. -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base type complex type 'base.type.B'. -./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:57: element complexType: Schemas parser error : complex type 'type.C': The 'process contents' of the attribute wildcard is weaker than the one in the base type complex type 'base.type.C'. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:33: element complexType: Schemas parser error : complex type 'type.A': The complex type definition has an attribute wildcard, but the base complex type definition '{http://FOO}base.type.A' does not have one. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:45: element complexType: Schemas parser error : complex type 'type.B': The attribute wildcard is not a valid subset of the wildcard in the base complex type definition '{http://FOO}base.type.B'. +./test/schemas/derivation-ok-restriction-4-1-err_0.xsd:65: element complexType: Schemas parser error : complex type 'base.type.C': The {process contents} of the attribute wildcard is weaker than the one in the base complex type definition '{http://FOO}base.type.C'. diff --git a/result/schemas/element-err_0_0.err b/result/schemas/element-err_0_0.err index 575102c..70524f6 100644 --- a/result/schemas/element-err_0_0.err +++ b/result/schemas/element-err_0_0.err @@ -1,20 +1,20 @@ ./test/schemas/element-err_0.xsd:8: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'name' is required but missing. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'ref' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'minOccurs' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'maxOccurs' is not allowed. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attribute 'form' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'ref' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'minOccurs' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'maxOccurs' is not allowed. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'form' is not allowed. ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'final': The value 'fantasy' is not valid. Expected is '(#all | List of (extension | restriction))'. ./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'. -./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : element decl. '{http://FOO}foo': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/element-err_0.xsd:14: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'minOccurs': The value must not be greater than the value of 'maxOccurs'. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'ref' and 'name' are mutually exclusive. ./test/schemas/element-err_0.xsd:22: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'abstract': Only the attributes 'minOccurs', 'maxOccurs' and 'id' are allowed in addition to 'ref'. ./test/schemas/element-err_0.xsd:23: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?). ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'maxOccurs': The value must be greater than or equal to 1. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'abstract' is not allowed. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'substitutionGroup' is not allowed. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'final' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'abstract' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'substitutionGroup' is not allowed. +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'final' is not allowed. ./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'block': The value 'flute' is not valid. Expected is '(#all | List of (extension | restriction | substitution))'. -./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : element decl. '{http://FOO}myomy': The attributes 'default' and 'fixed' are mutually exclusive. -./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : element decl. '{http://FOO}myomy': The attribute 'type' and the <complexType> child are mutually exclusive. -./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : element decl. '{http://FOO}myomy': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)). +./test/schemas/element-err_0.xsd:30: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/element-err_0.xsd:31: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <complexType> child are mutually exclusive. +./test/schemas/element-err_0.xsd:32: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The content is not valid. Expected is (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*)). diff --git a/result/schemas/idc-keyref-err1_1_0 b/result/schemas/idc-keyref-err1_1_0 new file mode 100644 index 0000000..d4333a9 --- /dev/null +++ b/result/schemas/idc-keyref-err1_1_0 @@ -0,0 +1 @@ +./test/schemas/idc-keyref-err1_0.xml fails to validate diff --git a/result/schemas/idc-keyref-err1_1_0.err b/result/schemas/idc-keyref-err1_1_0.err new file mode 100644 index 0000000..8e9cb20 --- /dev/null +++ b/result/schemas/idc-keyref-err1_1_0.err @@ -0,0 +1 @@ +./test/schemas/idc-keyref-err1_0.xml:12: Schemas validity error : Element '{urn:test:foo}Ref': No match found for key-sequence ['L4'] of keyref '{urn:test:foo}LinkKeyRef'. diff --git a/result/schemas/include3_0_0.err b/result/schemas/include3_0_0.err index 59d7d1d..27bb5d0 100644 --- a/result/schemas/include3_0_0.err +++ b/result/schemas/include3_0_0.err @@ -1 +1 @@ -./test/schemas/include3_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration with the name 'bar' does already exist. +test/schemas/include3_0.inc:4: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': A global element declaration '{http://FOO}bar' does already exist. diff --git a/result/schemas/restriction-attr1_0_0.err b/result/schemas/restriction-attr1_0_0.err index c08d41d..cdf003d 100644 --- a/result/schemas/restriction-attr1_0_0.err +++ b/result/schemas/restriction-attr1_0_0.err @@ -1 +1 @@ -./test/schemas/restriction-attr1_0.xsd:8: element attribute: Schemas parser error : local complex type, attribute decl. 'barA': The 'optional' use is inconsistent with a matching 'required' use of the base type. +./test/schemas/restriction-attr1_0.xsd:5: element complexType: Schemas parser error : local complex type, attribute use 'barA': The 'optional' attribute use is inconsistent with the corresponding 'required' attribute use of the base complex type definition '{http://FOO}typeA'. diff --git a/result/schemas/scc-no-xmlns_0_0.err b/result/schemas/scc-no-xmlns_0_0.err index fe882be..aad2b68 100644 --- a/result/schemas/scc-no-xmlns_0_0.err +++ b/result/schemas/scc-no-xmlns_0_0.err @@ -1 +1 @@ -./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of type 'xs:NCName' must not match 'xmlns'. +./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'name': The value of the attribute must not match 'xmlns'. diff --git a/result/schemas/scc-no-xsi_0_0.err b/result/schemas/scc-no-xsi_0_0.err index a57132c..e04e3e4 100644 --- a/result/schemas/scc-no-xsi_0_0.err +++ b/result/schemas/scc-no-xsi_0_0.err @@ -1 +1 @@ -./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : attribute decl. '{http://www.w3.org/2001/XMLSchema-instance}bar': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'. +./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The target namespace must not match 'http://www.w3.org/2001/XMLSchema-instance'. diff --git a/result/schemas/src-attribute1_0_0.err b/result/schemas/src-attribute1_0_0.err index ceafdbe..368d97c 100644 --- a/result/schemas/src-attribute1_0_0.err +++ b/result/schemas/src-attribute1_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : attribute decl. 'bar': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attributes 'default' and 'fixed' are mutually exclusive. diff --git a/result/schemas/src-attribute2_0_0.err b/result/schemas/src-attribute2_0_0.err index 7206544..ac6df6f 100644 --- a/result/schemas/src-attribute2_0_0.err +++ b/result/schemas/src-attribute2_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute', attribute 'use': The value must be 'optional' if the attribute 'default' is present as well. +./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The value of the attribute 'use' must be 'optional' if the attribute 'default' is present. diff --git a/result/schemas/src-attribute3-1_0_0.err b/result/schemas/src-attribute3-1_0_0.err index 6cf4404..3345b3c 100644 --- a/result/schemas/src-attribute3-1_0_0.err +++ b/result/schemas/src-attribute3-1_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attributes 'ref' and 'name' are mutually exclusive. +./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'name' is not allowed. diff --git a/result/schemas/src-attribute3-2-form_0_0.err b/result/schemas/src-attribute3-2-form_0_0.err index 5b3c7db..ad3667b 100644 --- a/result/schemas/src-attribute3-2-form_0_0.err +++ b/result/schemas/src-attribute3-2-form_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'form' is not allowed. +./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'form' is not allowed. diff --git a/result/schemas/src-attribute3-2-st_0_0.err b/result/schemas/src-attribute3-2-st_0_0.err index 797b8c1..ae85e0a 100644 --- a/result/schemas/src-attribute3-2-st_0_0.err +++ b/result/schemas/src-attribute3-2-st_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : attribute use '{http://foo}bar': The content is not valid. Expected is (annotation?). +./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The content is not valid. Expected is (annotation?). diff --git a/result/schemas/src-attribute3-2-type_0_0.err b/result/schemas/src-attribute3-2-type_0_0.err index 3a43d47..50016d8 100644 --- a/result/schemas/src-attribute3-2-type_0_0.err +++ b/result/schemas/src-attribute3-2-type_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : attribute use '{http://foo}bar': The attribute 'type' is not allowed. +./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' is not allowed. diff --git a/result/schemas/src-attribute4_0_0.err b/result/schemas/src-attribute4_0_0.err index a401799..cac6718 100644 --- a/result/schemas/src-attribute4_0_0.err +++ b/result/schemas/src-attribute4_0_0.err @@ -1 +1 @@ -./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : attribute decl. '{http://foo}bar': The attribute 'type' and the <simpleType> child are mutually exclusive. +./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}attribute': The attribute 'type' and the <simpleType> child are mutually exclusive. diff --git a/result/schemas/src-element1_0_0.err b/result/schemas/src-element1_0_0.err index ab39e7a..9d8b198 100644 --- a/result/schemas/src-element1_0_0.err +++ b/result/schemas/src-element1_0_0.err @@ -1 +1 @@ -./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : element decl. '{http://foo}foo': The attributes 'default' and 'fixed' are mutually exclusive. +./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attributes 'default' and 'fixed' are mutually exclusive. diff --git a/result/schemas/src-element3_0_0.err b/result/schemas/src-element3_0_0.err index fc60d9d..b8bd817 100644 --- a/result/schemas/src-element3_0_0.err +++ b/result/schemas/src-element3_0_0.err @@ -1,2 +1,2 @@ -./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : element decl. '{http://foo}foo': The attribute 'type' and the <complexType> child are mutually exclusive. -./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : element decl. '{http://foo}bar': The attribute 'type' and the <simpleType> child are mutually exclusive. +./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <complexType> child are mutually exclusive. +./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': The attribute 'type' and the <simpleType> child are mutually exclusive. @@ -6,11 +6,16 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else +#include <stdio.h> +#endif + #if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> #endif #include <string.h> -#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -31,11 +36,16 @@ #define LOGFILE "runsuite.log" static FILE *logfile = NULL; -static int verbose = 0;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
+static int verbose = 0; + + + +#if defined(_WIN32) && !defined(__CYGWIN__) + +#define vsnprintf _vsnprintf + +#define snprintf _snprintf + #endif /************************************************************************ @@ -83,7 +93,6 @@ static int nb_internals = 0; static int nb_schematas = 0; static int nb_unimplemented = 0; static int nb_leaks = 0; -static long libxmlMemoryAllocatedBase = 0; static int extraMemoryFromResolver = 0; static int @@ -225,7 +234,6 @@ initializeLibxml2(void) { xmlSchemaInitTypes(); xmlRelaxNGInitTypes(); #endif - libxmlMemoryAllocatedBase = xmlMemUsed(); } static xmlNodePtr @@ -931,9 +939,17 @@ xstcTestGroup(xmlNodePtr cur, const char *base) { } instance = getNext(cur, "./ts:instanceTest[1]"); while (instance != NULL) { - xstcTestInstance(instance, schemas, path, base); + if (schemas != NULL) { + xstcTestInstance(instance, schemas, path, base); + } else { + /* + * We'll automatically mark the instances as failed + * if the schema was broken. + */ + nb_errors++; + } instance = getNext(instance, - "following-sibling::ts:instanceTest[1]"); + "following-sibling::ts:instanceTest[1]"); } } else if (xmlStrEqual(validity, BAD_CAST "invalid")) { nb_schematas++; @@ -1033,7 +1049,7 @@ done: int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { - int res, ret = 0; + int ret = 0; int old_errors, old_tests, old_leaks; logfile = fopen(LOGFILE, "w"); @@ -1051,7 +1067,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = xsdTest(); + xsdTest(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1062,7 +1078,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = rngTest1(); + rngTest1(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1073,7 +1089,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; - res = rngTest2(); + rngTest2(); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests, no errors\n", nb_tests - old_tests); else @@ -1086,8 +1102,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet", + xstcMetadata("xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet", "xstc/Tests/Metadata/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", @@ -1104,8 +1119,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet", + xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet", "xstc/Tests/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", @@ -1122,8 +1136,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { old_leaks = nb_leaks; nb_internals = 0; nb_schematas = 0; - res = xstcMetadata( - "xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet", + xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet", "xstc/Tests/"); if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) printf("Ran %d tests (%d schemata), no errors\n", @@ -11,11 +11,16 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else +#include <stdio.h> +#endif + #if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> #endif #include <string.h> -#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -204,7 +209,6 @@ static void globfree(glob_t *pglob) { static int nb_tests = 0; static int nb_errors = 0; static int nb_leaks = 0; -static long libxmlMemoryAllocatedBase = 0; static int extraMemoryFromResolver = 0; static int @@ -536,7 +540,6 @@ initializeLibxml2(void) { xmlSchemaInitTypes(); xmlRelaxNGInitTypes(); #endif - libxmlMemoryAllocatedBase = xmlMemUsed(); } @@ -2926,14 +2929,15 @@ schemasOneTest(const char *sch, unlink(temp); free(temp); - if (err != NULL) { + if ((ret != 0) && (err != NULL)) { if (compareFileMem(err, testErrors, testErrorsSize)) { fprintf(stderr, "Error for %s on %s failed\n", filename, sch); ret = 1; + } else { + ret = 0; } } - xmlSchemaFreeValidCtxt(ctxt); xmlFreeDoc(doc); return(ret); @@ -3029,8 +3033,8 @@ schemasTest(const char *filename, nb_tests++; ret = schemasOneTest(filename, instance, result, err, options, schemas); - if (res != 0) - ret = res; + if (ret != 0) + res = ret; } } globfree(&globbuf); diff --git a/schematron.c b/schematron.c index 9cb5027..98184ac 100644 --- a/schematron.c +++ b/schematron.c @@ -562,7 +562,7 @@ xmlSchematronFree(xmlSchematronPtr schema) xmlFreeDoc(schema->doc); if (schema->namespaces != NULL) - xmlFree(schema->namespaces); + xmlFree((char **) schema->namespaces); xmlSchematronFreeRules(schema->rules); xmlSchematronFreePatterns(schema->patterns); @@ -709,7 +709,7 @@ xmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt) xmlXPathFreeContext(ctxt->xctxt); } if (ctxt->namespaces != NULL) - xmlFree(ctxt->namespaces); + xmlFree((char **) ctxt->namespaces); xmlDictFree(ctxt->dict); xmlFree(ctxt); } @@ -809,7 +809,7 @@ xmlSchematronAddNamespace(xmlSchematronParserCtxtPtr ctxt, const xmlChar **tmp; tmp = (const xmlChar **) - xmlRealloc(ctxt->namespaces, ctxt->maxNamespaces * 4 * + xmlRealloc((xmlChar **) ctxt->namespaces, ctxt->maxNamespaces * 4 * sizeof(const xmlChar *)); if (tmp == NULL) { xmlSchematronPErrMemory(NULL, "allocating parser namespaces", diff --git a/test/HTML/53867.html b/test/HTML/53867.html new file mode 100644 index 0000000..ac27999 --- /dev/null +++ b/test/HTML/53867.html @@ -0,0 +1,69 @@ +<html> +<head> +<style> +....... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +</style> +</head> +</html> diff --git a/test/XPath/docs/nodes b/test/XPath/docs/nodes new file mode 100644 index 0000000..a863df0 --- /dev/null +++ b/test/XPath/docs/nodes @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<root><foo>txt<!--hello--><![CDATA[data]]><?target data?><bar>txt<!--hello--><![CDATA[data]]><?target data?></bar></foo></root>
\ No newline at end of file diff --git a/test/XPath/tests/nodespat b/test/XPath/tests/nodespat new file mode 100644 index 0000000..c157a3e --- /dev/null +++ b/test/XPath/tests/nodespat @@ -0,0 +1,5 @@ +/. +//. +/root//. +//.//./././/. +/root//././/bar//.
\ No newline at end of file diff --git a/test/c14n/exc-without-comments/test-2.xml b/test/c14n/exc-without-comments/test-2.xml new file mode 100644 index 0000000..83d15a7 --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> + <SignedInfo> + <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <Reference URI="#ndid:1234-5678-0987"> + <Transforms> + <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + </Transforms> + <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue> + </Reference> + </SignedInfo> + <SignatureValue>...</SignatureValue> + <KeyInfo> + <X509Data> + <X509Certificate>...</X509Certificate> + </X509Data> + </KeyInfo> +</Signature> diff --git a/test/c14n/exc-without-comments/test-2.xpath b/test/c14n/exc-without-comments/test-2.xpath new file mode 100644 index 0000000..e57652f --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xpath @@ -0,0 +1,6 @@ +<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> +(//. | //@* | //namespace::*) +[ + ancestor-or-self::ds:SignedInfo +] +</XPath>
\ No newline at end of file diff --git a/test/ns7 b/test/ns7 new file mode 100644 index 0000000..d32b3b4 --- /dev/null +++ b/test/ns7 @@ -0,0 +1 @@ +<xml:test/> diff --git a/test/regexp/hard b/test/regexp/hard index 40c6d2d..ddb4cfd 100644 --- a/test/regexp/hard +++ b/test/regexp/hard @@ -5,3 +5,8 @@ aaabbbb a0b aa0aaa b0aaa +=>(\d{1,3}\.){3}\d{1,3} +1.2.3.4 +1.22.333.44 +1.2.3 +1..2.3 diff --git a/test/schemas/bug321475_0.xml b/test/schemas/bug321475_0.xml new file mode 100644 index 0000000..6190231 --- /dev/null +++ b/test/schemas/bug321475_0.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<animation xmlns="http://www.collada.org/2005/11/COLLADASchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.collada.org/2005/11/COLLADASchema bug321475.xsd"> + <asset/> + <source/> + <sampler/> + <channel/> +</animation> + diff --git a/test/schemas/bug321475_1.xsd b/test/schemas/bug321475_1.xsd new file mode 100644 index 0000000..b714a0d --- /dev/null +++ b/test/schemas/bug321475_1.xsd @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<xs:schema targetNamespace="http://www.collada.org/2005/11/COLLADASchema" + xmlns="http://www.collada.org/2005/11/COLLADASchema" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + elementFormDefault="qualified" version="1.4.0" xml:lang="EN"> + <xs:element name="animation"> + <xs:complexType> + <xs:sequence> + <xs:element ref="asset" minOccurs="0"/> + <xs:choice> + <xs:sequence> + <xs:element ref="source" maxOccurs="unbounded"/> + <xs:choice> + <xs:sequence> + <xs:element ref="sampler" maxOccurs="unbounded"/> + <xs:element ref="channel" maxOccurs="unbounded"/> + <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:element ref="animation" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + <xs:sequence> + <xs:element ref="sampler" maxOccurs="unbounded"/> + <xs:element ref="channel" maxOccurs="unbounded"/> + <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:element ref="animation" maxOccurs="unbounded"/> + </xs:choice> + <xs:element ref="extra" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="id" type="xs:ID"/> + <xs:attribute name="name" type="xs:NCName"/> + </xs:complexType> + </xs:element> + + <xs:element name="extra"/> + <xs:element name="asset"/> + <xs:element name="channel"/> + <xs:element name="sampler"/> + <xs:element name="source"/> + <xs:element name="technique"/> +</xs:schema> + + + + +
\ No newline at end of file diff --git a/test/schemas/bug322411_0.xml b/test/schemas/bug322411_0.xml new file mode 100644 index 0000000..f883648 --- /dev/null +++ b/test/schemas/bug322411_0.xml @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> +<ELEMENTS> + <ELEMENT> + <items> + <item>1</item> + <item>2</item> + <item>3</item> + <item>4</item> + <item>5</item> + <!-- Some dupls. --> + <item>dupl1</item> + <item>dupl2</item> + <item>dupl3</item> + <item>dupl4</item> + <item>dupl5</item> + <item>dupl6</item> + <item>dupl7</item> + <item>dupl8</item> + <item>dupl9</item> + <item>dupl10</item> + <item>dupl11</item> + + <item>6</item> + <item>7</item> + <item>8</item> + <item>9</item> + <item>10</item> + <item>11</item> + <items> + <item>12</item> + <item>13</item> + <item>14</item> + <item>15</item> + <!-- Some dupls. --> + <item>dupl1</item> + <item>dupl2</item> + <item>dupl3</item> + <item>dupl4</item> + <item>dupl5</item> + <item>dupl6</item> + <item>dupl7</item> + <item>dupl8</item> + <item>dupl9</item> + <item>dupl10</item> + <item>dupl11</item> + + <item>16</item> + <item>17</item> + <item>18</item> + <item>19</item> + <item>20</item> + <item>21</item> + </items> + <items> + <item>22</item> + <item>23</item> + <item>24</item> + <item>25</item> + <item>26</item> + <item>27</item> + <item>28</item> + <item>29</item> + <item>30</item> + <item>31</item> + <item>32</item> + <item>33</item> + <item>34</item> + <item>35</item> + <item>36</item> + <item>37</item> + <item>38</item> + <item>39</item> + <item>40</item> + <item>41</item> + <!-- Some dupls. --> + <item>dupl1</item> + <item>dupl2</item> + <item>dupl3</item> + <item>dupl4</item> + <item>dupl5</item> + <item>dupl6</item> + <item>dupl7</item> + <item>dupl8</item> + <item>dupl9</item> + <item>dupl10</item> + <item>dupl11</item> + </items> + </items> + <!-- Keyrefs. --> + <ref>41</ref> + </ELEMENT> +</ELEMENTS> + diff --git a/test/schemas/bug322411_1.xsd b/test/schemas/bug322411_1.xsd new file mode 100644 index 0000000..383dee6 --- /dev/null +++ b/test/schemas/bug322411_1.xsd @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="items"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="item" maxOccurs="unbounded" type="xsd:string"/> + <xsd:element ref="items" minOccurs="0" maxOccurs="2"/> + </xsd:sequence> + </xsd:complexType> + <xsd:unique name="ItemUnique"> + <xsd:selector xpath="item"/> + <xsd:field xpath="."/> + </xsd:unique> + </xsd:element> + + <xsd:element name="ELEMENTS"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="ELEMENT"> + <xsd:complexType> + <xsd:sequence> + <xsd:element ref="items"/> + <xsd:element name="ref" type="xsd:string" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + <xsd:keyref name="ItemRef" refer="ItemUnique"> + <xsd:selector xpath="ref"/> + <xsd:field xpath="."/> + </xsd:keyref> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> +</xsd:schema> diff --git a/test/schemas/bug323510_0.xml b/test/schemas/bug323510_0.xml new file mode 100644 index 0000000..ce7647d --- /dev/null +++ b/test/schemas/bug323510_0.xml @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<foo/> + diff --git a/test/schemas/bug323510_1.xsd b/test/schemas/bug323510_1.xsd new file mode 100644 index 0000000..8b047ce --- /dev/null +++ b/test/schemas/bug323510_1.xsd @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xs:element name="foo"> + <xs:complexType> + <xs:sequence> + <xs:element name="bar" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + +</xs:schema>
\ No newline at end of file diff --git a/test/schemas/decimal-1.xml b/test/schemas/decimal-1.xml new file mode 100644 index 0000000..4568ff1 --- /dev/null +++ b/test/schemas/decimal-1.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- test the values: + - BAD + + BAD + 1. + .1 + 0. + .0 + - 1 BAD + + 1 BAD + . BAD + 000 ! + --> +<foo + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="decimal-1.xsd"> + <!-- The good ones. --> + <val> 0. </val> + <val> .0 </val> + <val> .10 </val> + <val> 01. </val> + <val> 000 </val> + <val>123456789012345678</val> + <val>-123456789012345678</val> + <val>0.123456789012345678</val> + <val>-0.123456789012345678</val> + <!-- The bad ones. --> + <val>.</val> + <val>-</val> + <val>+</val> + <val>*</val> + <val>- 1</val> + <val>+ 1</val> + <val>+ 0</val> + <val>- 0</val> + <!--ref>0.0</ref--> +</foo> diff --git a/test/schemas/decimal-1.xsd b/test/schemas/decimal-1.xsd new file mode 100644 index 0000000..830ca3e --- /dev/null +++ b/test/schemas/decimal-1.xsd @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:simpleType name="myDecimal"> + <xsd:restriction base="xsd:decimal"> + <xsd:totalDigits value="18"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:element name="foo"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/> + <xsd:element name="ref" type="myDecimal" minOccurs="0"/> + </xsd:sequence> + </xsd:complexType> + + <!--xsd:key name="myKey"> + <xsd:selector xpath="val"/> + <xsd:field xpath="."/> + </xsd:key> + + <xsd:keyref name="myKeyRef" refer="myKey"> + <xsd:selector xpath="ref"/> + <xsd:field xpath="."/> + </xsd:keyref--> + </xsd:element> + +</xsd:schema> diff --git a/test/schemas/decimal-1_0.xml b/test/schemas/decimal-1_0.xml new file mode 100644 index 0000000..7bf3719 --- /dev/null +++ b/test/schemas/decimal-1_0.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<foo + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="decimal-1.xsd"> + <!-- The good ones. --> + <val> 0. </val> + <val> .0 </val> + <val> .10 </val> + <val> 01. </val> + <val> 000 </val> + <val>123456789012345678</val> + <val>-123456789012345678</val> + <val>0.123456789012345678</val> + <val>-0.123456789012345678</val> + <!-- The bad ones. --> + <val>.</val> + <val>-</val> + <val>+</val> + <val>*</val> + <val>- 1</val> + <val>+ 1</val> + <val>+ 0</val> + <val>- 0</val> +</foo> diff --git a/test/schemas/decimal-1_1.xsd b/test/schemas/decimal-1_1.xsd new file mode 100644 index 0000000..f598c86 --- /dev/null +++ b/test/schemas/decimal-1_1.xsd @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:simpleType name="myDecimal"> + <xsd:restriction base="xsd:decimal"> + <xsd:totalDigits value="18"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:element name="foo"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + + </xsd:element> + +</xsd:schema> diff --git a/test/schemas/decimal-2_0.xml b/test/schemas/decimal-2_0.xml new file mode 100644 index 0000000..166f781 --- /dev/null +++ b/test/schemas/decimal-2_0.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<foo + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="decimal-2.xsd"> + <!-- The good ones. --> + <val>0.1</val> + <val>0.001</val> + <val>0.0</val> + <val>-0.0</val> + <val>1</val> + <!-- The bad ones. --> + <val>-0.1</val> + <val>-1</val> +</foo> diff --git a/test/schemas/decimal-2_1.xsd b/test/schemas/decimal-2_1.xsd new file mode 100644 index 0000000..cc71670 --- /dev/null +++ b/test/schemas/decimal-2_1.xsd @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:simpleType name="myDecimal"> + <xsd:restriction base="xsd:decimal"> + <xsd:minInclusive value="0"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:element name="foo"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/test/schemas/decimal-3_0.xml b/test/schemas/decimal-3_0.xml new file mode 100644 index 0000000..fec1ed3 --- /dev/null +++ b/test/schemas/decimal-3_0.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<foo + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="decimal-3.xsd"> + <!-- The good ones. --> + <val>0.12</val> + <val>0.0</val> + <val>0.02</val> + <val>12</val> + <val>1.2</val> + <!-- The bad ones. --> + <val>0.123</val> + <val>0.023</val> + <val>123</val> + <val>12.3</val> +</foo> + diff --git a/test/schemas/decimal-3_1.xsd b/test/schemas/decimal-3_1.xsd new file mode 100644 index 0000000..23ae8f7 --- /dev/null +++ b/test/schemas/decimal-3_1.xsd @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:simpleType name="myDecimal"> + <xsd:restriction base="xsd:decimal"> + <xsd:totalDigits value="2"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:element name="foo"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/test/schemas/idc-keyref-err1_0.xml b/test/schemas/idc-keyref-err1_0.xml new file mode 100644 index 0000000..64a1d0b --- /dev/null +++ b/test/schemas/idc-keyref-err1_0.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<Foo + xmlns="urn:test:foo" + xmlns:foo="urn:test:foo" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="urn:test:foo idc-keyref_1.xsd"> + + <Def> + <Link foo:linkKey="L4"/> + </Def> + + <Ref foo:linkRef="L4"/> + +</Foo>
\ No newline at end of file diff --git a/test/schemas/idc-keyref-err1_1.xsd b/test/schemas/idc-keyref-err1_1.xsd new file mode 100644 index 0000000..43c769f --- /dev/null +++ b/test/schemas/idc-keyref-err1_1.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<xs:schema + targetNamespace="urn:test:foo" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:foo="urn:test:foo" + elementFormDefault="qualified" + attributeFormDefault="qualified"> + + <xs:element name="Link"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="linkKey" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + + + <!-- --> + <xs:element name="Foo"> + <xs:complexType> + <xs:sequence> + + <xs:element name="Def"> + <xs:complexType> + <xs:sequence> + <xs:element ref="foo:Link"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Ref"> + <xs:complexType> + <xs:attribute name="linkRef" use="required"/> + </xs:complexType> + </xs:element> + + </xs:sequence> + </xs:complexType> + + <xs:key name="LinkKey"> + <xs:selector xpath=".//foo:Link | .//foo:Link"/> + <xs:field xpath="@foo:linkKey"/> + </xs:key> + + <xs:keyref name="LinkKeyRef" refer="foo:LinkKey"> + <xs:selector xpath=".//foo:Ref"/> + <xs:field xpath="@foo:linkRef"/> + </xs:keyref> + </xs:element> + +</xs:schema>
\ No newline at end of file @@ -8,7 +8,12 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else #include <stdio.h> +#endif + #include <string.h> #include <libxml/xmlerror.h> #include <libxml/relaxng.h> @@ -278,7 +283,7 @@ static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return('a'); if (no == 1) return(' '); - if (no == 2) return('ø'); + if (no == 2) return((xmlChar) 'ø'); return(0); } @@ -291,7 +296,7 @@ static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(0); if (no == 1) return(1); if (no == 2) return(122); - return(-1); + return((unsigned int) -1); } static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -303,7 +308,7 @@ static unsigned long gen_unsigned_long(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(0); if (no == 1) return(1); if (no == 2) return(122); - return(-1); + return((unsigned long) -1); } static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -689,6 +694,24 @@ static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) { static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED) + +#define gen_nb_xmlExpCtxtPtr 1 +static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +#define gen_nb_xmlExpNodePtr 1 +static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} + +#endif + #define gen_nb_xmlHashDeallocator 2 static void test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) { @@ -2929,6 +2952,59 @@ test_htmlDocDumpMemory(void) { static int +test_htmlDocDumpMemoryFormat(void) { + int test_ret = 0; + +#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) + int mem_base; + xmlDocPtr cur; /* the document */ + int n_cur; + xmlChar ** mem; /* OUT: the memory pointer */ + int n_mem; + int * size; /* OUT: the memory length */ + int n_size; + int format; /* should formatting spaces been added */ + int n_format; + + for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) { + for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) { + for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) { + for (n_format = 0;n_format < gen_nb_int;n_format++) { + mem_base = xmlMemBlocks(); + cur = gen_xmlDocPtr(n_cur, 0); + mem = gen_xmlChar_ptr_ptr(n_mem, 1); + size = gen_int_ptr(n_size, 2); + format = gen_int(n_format, 3); + + htmlDocDumpMemoryFormat(cur, mem, size, format); + call_tests++; + des_xmlDocPtr(n_cur, cur, 0); + des_xmlChar_ptr_ptr(n_mem, mem, 1); + des_int_ptr(n_size, size, 2); + des_int(n_format, format, 3); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in htmlDocDumpMemoryFormat", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_cur); + printf(" %d", n_mem); + printf(" %d", n_size); + printf(" %d", n_format); + printf("\n"); + } + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int test_htmlGetMetaEncoding(void) { int test_ret = 0; @@ -3535,11 +3611,12 @@ static int test_HTMLtree(void) { int test_ret = 0; - if (quiet == 0) printf("Testing HTMLtree : 17 of 17 functions ...\n"); + if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n"); test_ret += test_htmlDocContentDumpFormatOutput(); test_ret += test_htmlDocContentDumpOutput(); test_ret += test_htmlDocDump(); test_ret += test_htmlDocDumpMemory(); + test_ret += test_htmlDocDumpMemoryFormat(); test_ret += test_htmlGetMetaEncoding(); test_ret += test_htmlIsBooleanAttr(); test_ret += test_htmlNewDoc(); @@ -16960,11 +17037,100 @@ test_xmlStreamPushAttr(void) { return(test_ret); } + +static int +test_xmlStreamPushNode(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr stream; /* the stream context */ + int n_stream; + xmlChar * name; /* the current name */ + int n_name; + xmlChar * ns; /* the namespace name */ + int n_ns; + int nodeType; /* the type of the node being pushed */ + int n_nodeType; + + for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) { + for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) { + mem_base = xmlMemBlocks(); + stream = gen_xmlStreamCtxtPtr(n_stream, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + ns = gen_const_xmlChar_ptr(n_ns, 2); + nodeType = gen_int(n_nodeType, 3); + + ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_stream, stream, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2); + des_int(n_nodeType, nodeType, 3); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamPushNode", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_stream); + printf(" %d", n_name); + printf(" %d", n_ns); + printf(" %d", n_nodeType); + printf("\n"); + } + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int +test_xmlStreamWantsAnyNode(void) { + int test_ret = 0; + +#if defined(LIBXML_PATTERN_ENABLED) + int mem_base; + int ret_val; + xmlStreamCtxtPtr streamCtxt; /* the stream context */ + int n_streamCtxt; + + for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) { + mem_base = xmlMemBlocks(); + streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0); + + ret_val = xmlStreamWantsAnyNode(streamCtxt); + desret_int(ret_val); + call_tests++; + des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlStreamWantsAnyNode", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_streamCtxt); + printf("\n"); + } + } + function_tests++; +#endif + + return(test_ret); +} + static int test_pattern(void) { int test_ret = 0; - if (quiet == 0) printf("Testing pattern : 8 of 13 functions ...\n"); + if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n"); test_ret += test_xmlPatternFromRoot(); test_ret += test_xmlPatternGetStreamCtxt(); test_ret += test_xmlPatternMatch(); @@ -16975,6 +17141,8 @@ test_pattern(void) { test_ret += test_xmlStreamPop(); test_ret += test_xmlStreamPush(); test_ret += test_xmlStreamPushAttr(); + test_ret += test_xmlStreamPushNode(); + test_ret += test_xmlStreamWantsAnyNode(); if (test_ret != 0) printf("Module pattern: %d errors\n", test_ret); @@ -17757,6 +17925,7 @@ test_xmlSchematronNewParserCtxt(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronPtr 1 static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17764,6 +17933,8 @@ static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATT } static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronNewValidCtxt(void) { @@ -17774,6 +17945,7 @@ test_xmlSchematronNewValidCtxt(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronParserCtxtPtr 1 static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17781,6 +17953,8 @@ static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUT } static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronParse(void) { @@ -17791,6 +17965,7 @@ test_xmlSchematronParse(void) { return(test_ret); } +#ifdef LIBXML_SCHEMATRON_ENABLED #define gen_nb_xmlSchematronValidCtxtPtr 1 static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { @@ -17798,6 +17973,8 @@ static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_ } static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { } +#endif + static int test_xmlSchematronValidateDoc(void) { @@ -25337,28 +25514,28 @@ test_xmlValidGetPotentialChildren(void) { int ret_val; xmlElementContent * ctree; /* an element content tree */ int n_ctree; - xmlChar ** list; /* an array to store the list of child names */ - int n_list; + xmlChar ** names; /* an array to store the list of child names */ + int n_names; int * len; /* a pointer to the number of element in the list */ int n_len; int max; /* the size of the array */ int n_max; for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) { for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) { for (n_max = 0;n_max < gen_nb_int;n_max++) { mem_base = xmlMemBlocks(); ctree = gen_xmlElementContent_ptr(n_ctree, 0); - list = gen_const_xmlChar_ptr_ptr(n_list, 1); + names = gen_const_xmlChar_ptr_ptr(n_names, 1); len = gen_int_ptr(n_len, 2); max = gen_int(n_max, 3); - ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)list, len, max); + ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max); desret_int(ret_val); call_tests++; des_xmlElementContent_ptr(n_ctree, ctree, 0); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 1); + des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1); des_int_ptr(n_len, len, 2); des_int(n_max, max, 3); xmlResetLastError(); @@ -25367,7 +25544,7 @@ test_xmlValidGetPotentialChildren(void) { xmlMemBlocks() - mem_base); test_ret++; printf(" %d", n_ctree); - printf(" %d", n_list); + printf(" %d", n_names); printf(" %d", n_len); printf(" %d", n_max); printf("\n"); @@ -27508,6 +27685,47 @@ test_xmlNormalizeWindowsPath(void) { static int +test_xmlOutputBufferCreateBuffer(void) { + int test_ret = 0; + +#if defined(LIBXML_OUTPUT_ENABLED) + int mem_base; + xmlOutputBufferPtr ret_val; + xmlBufferPtr buffer; /* a xmlBufferPtr */ + int n_buffer; + xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */ + int n_encoder; + + for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) { + for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) { + mem_base = xmlMemBlocks(); + buffer = gen_xmlBufferPtr(n_buffer, 0); + encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1); + + ret_val = xmlOutputBufferCreateBuffer(buffer, encoder); + desret_xmlOutputBufferPtr(ret_val); + call_tests++; + des_xmlBufferPtr(n_buffer, buffer, 0); + des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_buffer); + printf(" %d", n_encoder); + printf("\n"); + } + } + } + function_tests++; +#endif + + return(test_ret); +} + + +static int test_xmlOutputBufferCreateFd(void) { int test_ret = 0; @@ -28215,7 +28433,7 @@ static int test_xmlIO(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlIO : 38 of 47 functions ...\n"); + if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n"); test_ret += test_xmlAllocOutputBuffer(); test_ret += test_xmlAllocParserInputBuffer(); test_ret += test_xmlCheckFilename(); @@ -28236,6 +28454,7 @@ test_xmlIO(void) { test_ret += test_xmlIOHTTPRead(); test_ret += test_xmlNoNetExternalEntityLoader(); test_ret += test_xmlNormalizeWindowsPath(); + test_ret += test_xmlOutputBufferCreateBuffer(); test_ret += test_xmlOutputBufferCreateFd(); test_ret += test_xmlOutputBufferCreateFile(); test_ret += test_xmlOutputBufferCreateFilename(); @@ -31629,6 +31848,64 @@ test_xmlTextReaderSchemaValidate(void) { return(test_ret); } +#ifdef LIBXML_READER_ENABLED + +#define gen_nb_xmlSchemaValidCtxtPtr 1 +static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + return(NULL); +} +static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +} +#endif + + +static int +test_xmlTextReaderSchemaValidateCtxt(void) { + int test_ret = 0; + +#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) + int mem_base; + int ret_val; + xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */ + int n_reader; + xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */ + int n_ctxt; + int options; /* options (not used yet) */ + int n_options; + + for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) { + for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { + for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) { + mem_base = xmlMemBlocks(); + reader = gen_xmlTextReaderPtr(n_reader, 0); + ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1); + options = gen_parseroptions(n_options, 2); + + ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options); + desret_int(ret_val); + call_tests++; + des_xmlTextReaderPtr(n_reader, reader, 0); + des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1); + des_parseroptions(n_options, options, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_reader); + printf(" %d", n_ctxt); + printf(" %d", n_options); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + static int test_xmlTextReaderSetErrorHandler(void) { @@ -31854,7 +32131,7 @@ static int test_xmlreader(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlreader : 73 of 83 functions ...\n"); + if (quiet == 0) printf("Testing xmlreader : 74 of 84 functions ...\n"); test_ret += test_xmlNewTextReader(); test_ret += test_xmlNewTextReaderFilename(); test_ret += test_xmlReaderForDoc(); @@ -31923,6 +32200,7 @@ test_xmlreader(void) { test_ret += test_xmlTextReaderRelaxNGSetSchema(); test_ret += test_xmlTextReaderRelaxNGValidate(); test_ret += test_xmlTextReaderSchemaValidate(); + test_ret += test_xmlTextReaderSchemaValidateCtxt(); test_ret += test_xmlTextReaderSetErrorHandler(); test_ret += test_xmlTextReaderSetParserProp(); test_ret += test_xmlTextReaderSetSchema(); @@ -31935,16 +32213,6 @@ test_xmlreader(void) { printf("Module xmlreader: %d errors\n", test_ret); return(test_ret); } -#ifdef LIBXML_REGEXP_ENABLED - -#define gen_nb_xmlExpCtxtPtr 1 -static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlExpCtxtNbCons(void) { @@ -32013,16 +32281,6 @@ test_xmlExpCtxtNbNodes(void) { return(test_ret); } -#ifdef LIBXML_REGEXP_ENABLED - -#define gen_nb_xmlExpNodePtr 1 -static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlExpDump(void) { @@ -32084,27 +32342,27 @@ test_xmlExpGetLanguage(void) { int n_ctxt; xmlExpNodePtr exp; /* the expression */ int n_exp; - xmlChar ** list; /* where to store the tokens */ - int n_list; + xmlChar ** langList; /* where to store the tokens */ + int n_langList; int len; /* the allocated lenght of @list */ int n_len; for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) { for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) { for (n_len = 0;n_len < gen_nb_int;n_len++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0); exp = gen_xmlExpNodePtr(n_exp, 1); - list = gen_const_xmlChar_ptr_ptr(n_list, 2); + langList = gen_const_xmlChar_ptr_ptr(n_langList, 2); len = gen_int(n_len, 3); - ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)list, len); + ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len); desret_int(ret_val); call_tests++; des_xmlExpCtxtPtr(n_ctxt, ctxt, 0); des_xmlExpNodePtr(n_exp, exp, 1); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2); + des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2); des_int(n_len, len, 3); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { @@ -32113,7 +32371,7 @@ test_xmlExpGetLanguage(void) { test_ret++; printf(" %d", n_ctxt); printf(" %d", n_exp); - printf(" %d", n_list); + printf(" %d", n_langList); printf(" %d", n_len); printf("\n"); } @@ -32139,27 +32397,27 @@ test_xmlExpGetStart(void) { int n_ctxt; xmlExpNodePtr exp; /* the expression */ int n_exp; - xmlChar ** list; /* where to store the tokens */ - int n_list; + xmlChar ** tokList; /* where to store the tokens */ + int n_tokList; int len; /* the allocated lenght of @list */ int n_len; for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) { for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) { - for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr_ptr;n_list++) { + for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) { for (n_len = 0;n_len < gen_nb_int;n_len++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0); exp = gen_xmlExpNodePtr(n_exp, 1); - list = gen_const_xmlChar_ptr_ptr(n_list, 2); + tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2); len = gen_int(n_len, 3); - ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)list, len); + ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len); desret_int(ret_val); call_tests++; des_xmlExpCtxtPtr(n_ctxt, ctxt, 0); des_xmlExpNodePtr(n_exp, exp, 1); - des_const_xmlChar_ptr_ptr(n_list, (const xmlChar **)list, 2); + des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2); des_int(n_len, len, 3); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { @@ -32168,7 +32426,7 @@ test_xmlExpGetStart(void) { test_ret++; printf(" %d", n_ctxt); printf(" %d", n_exp); - printf(" %d", n_list); + printf(" %d", n_tokList); printf(" %d", n_len); printf("\n"); } @@ -32965,6 +33223,16 @@ test_xmlSaveSetEscape(void) { static int +test_xmlSaveToBuffer(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int test_xmlSaveToFd(void) { int test_ret = 0; @@ -33028,12 +33296,13 @@ static int test_xmlsave(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlsave : 4 of 9 functions ...\n"); + if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n"); test_ret += test_xmlSaveClose(); test_ret += test_xmlSaveDoc(); test_ret += test_xmlSaveFlush(); test_ret += test_xmlSaveSetAttrEscape(); test_ret += test_xmlSaveSetEscape(); + test_ret += test_xmlSaveToBuffer(); test_ret += test_xmlSaveToFd(); test_ret += test_xmlSaveToFilename(); test_ret += test_xmlSaveTree(); @@ -33166,16 +33435,6 @@ test_xmlSchemaGetParserErrors(void) { return(test_ret); } -#ifdef LIBXML_SCHEMAS_ENABLED - -#define gen_nb_xmlSchemaValidCtxtPtr 1 -static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - return(NULL); -} -static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -} -#endif - static int test_xmlSchemaGetValidErrors(void) { @@ -33184,13 +33443,13 @@ test_xmlSchemaGetValidErrors(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlSchemaValidityErrorFunc * err; /* the error function result */ + xmlSchemaValidityErrorFunc * err; /* */ int n_err; - xmlSchemaValidityWarningFunc * warn; /* the warning function result */ + xmlSchemaValidityWarningFunc * warn; /* */ int n_warn; - void ** ctx; /* the functions context result */ + void ** ctx; /* */ int n_ctx; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33239,7 +33498,7 @@ test_xmlSchemaIsValid(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33432,7 +33691,7 @@ test_xmlSchemaSAXUnplug(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */ + xmlSchemaSAXPlugPtr plug; /* */ int n_plug; for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) { @@ -33470,6 +33729,16 @@ test_xmlSchemaSetParserErrors(void) { static int +test_xmlSchemaSetParserStructuredErrors(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + +static int test_xmlSchemaSetValidErrors(void) { int test_ret = 0; @@ -33486,9 +33755,9 @@ test_xmlSchemaSetValidOptions(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - int options; /* a combination of xmlSchemaValidOption */ + int options; /* */ int n_options; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33537,7 +33806,7 @@ test_xmlSchemaValidCtxtGetOptions(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33571,29 +33840,29 @@ test_xmlSchemaValidateDoc(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlDocPtr doc; /* a parsed document tree */ - int n_doc; + xmlDocPtr instance; /* */ + int n_instance; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { - for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) { mem_base = xmlMemBlocks(); ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0); - doc = gen_xmlDocPtr(n_doc, 1); + instance = gen_xmlDocPtr(n_instance, 1); - ret_val = xmlSchemaValidateDoc(ctxt, doc); + ret_val = xmlSchemaValidateDoc(ctxt, instance); desret_int(ret_val); call_tests++; des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0); - des_xmlDocPtr(n_doc, doc, 1); + des_xmlDocPtr(n_instance, instance, 1); xmlResetLastError(); if (mem_base != xmlMemBlocks()) { printf("Leak of %d blocks found in xmlSchemaValidateDoc", xmlMemBlocks() - mem_base); test_ret++; printf(" %d", n_ctxt); - printf(" %d", n_doc); + printf(" %d", n_instance); printf("\n"); } } @@ -33612,11 +33881,11 @@ test_xmlSchemaValidateFile(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - const char * filename; /* the URI of the instance */ + const char * filename; /* */ int n_filename; - int options; /* a future set of options, currently unused */ + int options; /* */ int n_options; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33660,9 +33929,9 @@ test_xmlSchemaValidateOneElement(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlNodePtr elem; /* an element node */ + xmlNodePtr elem; /* */ int n_elem; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33701,15 +33970,15 @@ test_xmlSchemaValidateStream(void) { #if defined(LIBXML_SCHEMAS_ENABLED) int mem_base; int ret_val; - xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */ + xmlSchemaValidCtxtPtr ctxt; /* */ int n_ctxt; - xmlParserInputBufferPtr input; /* the input to use for reading the data */ + xmlParserInputBufferPtr input; /* */ int n_input; - xmlCharEncoding enc; /* an optional encoding information */ + xmlCharEncoding enc; /* */ int n_enc; - xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */ + xmlSAXHandlerPtr sax; /* */ int n_sax; - void * user_data; /* the context to provide to the SAX handler. */ + void * user_data; /* */ int n_user_data; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) { @@ -33759,7 +34028,7 @@ static int test_xmlschemas(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xmlschemas : 14 of 23 functions ...\n"); + if (quiet == 0) printf("Testing xmlschemas : 14 of 24 functions ...\n"); test_ret += test_xmlSchemaDump(); test_ret += test_xmlSchemaGetParserErrors(); test_ret += test_xmlSchemaGetValidErrors(); @@ -33772,6 +34041,7 @@ test_xmlschemas(void) { test_ret += test_xmlSchemaSAXPlug(); test_ret += test_xmlSchemaSAXUnplug(); test_ret += test_xmlSchemaSetParserErrors(); + test_ret += test_xmlSchemaSetParserStructuredErrors(); test_ret += test_xmlSchemaSetValidErrors(); test_ret += test_xmlSchemaSetValidOptions(); test_ret += test_xmlSchemaSetValidStructuredErrors(); @@ -35579,7 +35849,7 @@ test_xmlStrncatNew(void) { int n_str1; xmlChar * str2; /* second xmlChar string */ int n_str2; - int len; /* the len of @str2 */ + int len; /* the len of @str2 or < 0 */ int n_len; for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) { @@ -2012,6 +2012,8 @@ xmlRemoveProp(xmlAttrPtr cur) { tmp = cur->parent->properties; if (tmp == cur) { cur->parent->properties = cur->next; + if (cur->next != NULL) + cur->next->prev = NULL; xmlFreeProp(cur); return(0); } @@ -2831,6 +2833,14 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } + if (cur == elem) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddNextSibling : cur == elem\n"); +#endif + return(NULL); + } + xmlUnlinkNode(elem); if (elem->type == XML_TEXT_NODE) { @@ -2854,12 +2864,16 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { /* check if an attribute with the same name exists */ xmlAttrPtr attr; + if (cur->type != XML_ATTRIBUTE_NODE) + return(NULL); if (elem->ns == NULL) - attr = xmlHasProp(cur->parent, elem->name); + attr = xmlHasNsProp(cur->parent, elem->name, NULL); else attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href); - if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) { + /* elem has already been unlinked so can never be attr */ + if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) attr); xmlFreeProp(attr); } } @@ -2911,6 +2925,14 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { return(NULL); } + if (cur == elem) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddPrevSibling : cur == elem\n"); +#endif + return(NULL); + } + xmlUnlinkNode(elem); if (elem->type == XML_TEXT_NODE) { @@ -2934,12 +2956,16 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) { /* check if an attribute with the same name exists */ xmlAttrPtr attr; + if (cur->type != XML_ATTRIBUTE_NODE) + return(NULL); if (elem->ns == NULL) - attr = xmlHasProp(cur->parent, elem->name); + attr = xmlHasNsProp(cur->parent, elem->name, NULL); else attr = xmlHasNsProp(cur->parent, elem->name, elem->ns->href); - if ((attr != NULL) && (attr != (xmlAttrPtr) elem)) { + /* elem has already been unlinked so can never be attr */ + if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) attr); xmlFreeProp(attr); } } @@ -3149,6 +3175,13 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { return(NULL); } + if (parent == cur) { +#ifdef DEBUG_TREE + xmlGenericError(xmlGenericErrorContext, + "xmlAddChild : parent == cur\n"); +#endif + return(NULL); + } /* * If cur is a TEXT node, merge its content with adjacent TEXT nodes * cur is then freed. @@ -3156,8 +3189,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { if (cur->type == XML_TEXT_NODE) { if ((parent->type == XML_TEXT_NODE) && (parent->content != NULL) && - (parent->name == cur->name) && - (parent != cur)) { + (parent->name == cur->name)) { xmlNodeAddContent(parent, cur->content); xmlFreeNode(cur); return(parent); @@ -3196,6 +3228,8 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { return(parent); } if (cur->type == XML_ATTRIBUTE_NODE) { + if (parent->type != XML_ELEMENT_NODE) + return(NULL); if (parent->properties == NULL) { parent->properties = (xmlAttrPtr) cur; } else { @@ -3203,13 +3237,16 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { xmlAttrPtr lastattr; if (cur->ns == NULL) - lastattr = xmlHasProp(parent, cur->name); + lastattr = xmlHasNsProp(parent, cur->name, NULL); else lastattr = xmlHasNsProp(parent, cur->name, cur->ns->href); - if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur)) { + if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur) && (lastattr->type != XML_ATTRIBUTE_DECL)) { /* different instance, destroy it (attributes must be unique) */ + xmlUnlinkNode((xmlNodePtr) lastattr); xmlFreeProp(lastattr); } + if (lastattr == (xmlAttrPtr) cur) + return(cur); /* find the end */ lastattr = parent->properties; while (lastattr->next != NULL) { @@ -3575,22 +3612,16 @@ xmlCopyNamespaceList(xmlNsPtr cur) { static xmlNodePtr xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent); -/** - * xmlCopyProp: - * @target: the element where the attribute will be grafted - * @cur: the attribute - * - * Do a copy of the attribute. - * - * Returns: a new #xmlAttrPtr, or NULL in case of error. - */ -xmlAttrPtr -xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { + +static xmlAttrPtr +xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) { xmlAttrPtr ret; if (cur == NULL) return(NULL); if (target != NULL) ret = xmlNewDocProp(target->doc, cur->name, NULL); + else if (doc != NULL) + ret = xmlNewDocProp(doc, cur->name, NULL); else if (cur->parent != NULL) ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL); else if (cur->children != NULL) @@ -3679,6 +3710,20 @@ xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { } /** + * xmlCopyProp: + * @target: the element where the attribute will be grafted + * @cur: the attribute + * + * Do a copy of the attribute. + * + * Returns: a new #xmlAttrPtr, or NULL in case of error. + */ +xmlAttrPtr +xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { + return xmlCopyPropInternal(NULL, target, cur); +} + +/** * xmlCopyPropList: * @target: the element where the attributes will be grafted * @cur: the first attribute @@ -3746,7 +3791,7 @@ xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, case XML_XINCLUDE_END: break; case XML_ATTRIBUTE_NODE: - return((xmlNodePtr) xmlCopyProp(parent, (xmlAttrPtr) node)); + return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node)); case XML_NAMESPACE_DECL: return((xmlNodePtr) xmlCopyNamespaceList((xmlNsPtr) node)); @@ -4861,8 +4906,8 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur) xmlBufferCat(buffer, tmp->content); break; case XML_ENTITY_REF_NODE: - xmlNodeBufGetContent(buffer, tmp->children); - break; + xmlNodeBufGetContent(buffer, tmp); + break; default: break; } @@ -6258,7 +6303,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) { */ int xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { - xmlAttrPtr prop, prev = NULL;; + xmlAttrPtr prop; if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL)) return(-1); @@ -6270,7 +6315,6 @@ xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { xmlFreeProp(prop); return(0); } - prev = prop; prop = prop->next; } return(-1); @@ -6287,7 +6331,7 @@ xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { */ int xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { - xmlAttrPtr prop, prev = NULL;; + xmlAttrPtr prop; if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL)) return(-1); @@ -6303,7 +6347,6 @@ xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { xmlFreeProp(prop); return(0); } - prev = prop; prop = prop->next; } return(-1); @@ -2130,9 +2130,11 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) int ix; int pos = 0; int nbslash = 0; + int len; xmlURIPtr ref = NULL; xmlURIPtr bas = NULL; xmlChar *bptr, *uptr, *vptr; + int remove_path = 0; if ((URI == NULL) || (*URI == 0)) return NULL; @@ -2173,63 +2175,101 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) * just return the URI */ if ((ref->scheme != NULL) && - ((bas->scheme == NULL) || - xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme) || - xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server))) { + ((bas->scheme == NULL) || + (xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) || + (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) { val = xmlStrdup (URI); goto done; } + if (xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path)) { + val = xmlStrdup(BAD_CAST ""); + goto done; + } + if (bas->path == NULL) { + val = xmlStrdup((xmlChar *)ref->path); + goto done; + } + if (ref->path == NULL) { + ref->path = (char *) "/"; + remove_path = 1; + } /* * At this point (at last!) we can compare the two paths * - * First we compare the two strings and find where they first differ + * First we take care of the special case where either of the + * two path components may be missing (bug 316224) */ - bptr = (xmlChar *)bas->path; - if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/')) - pos += 2; - if ((*bptr == '.') && (bptr[1] == '/')) - bptr += 2; - else if ((*bptr == '/') && (ref->path[pos] != '/')) - bptr++; - while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0)) - pos++; - - if (bptr[pos] == ref->path[pos]) { - val = NULL; /* if no differences, return NULL */ - goto done; /* (I can't imagine why anyone would do this) */ - } - - /* - * In URI, "back up" to the last '/' encountered. This will be the - * beginning of the "unique" suffix of URI - */ - ix = pos; - if ((ref->path[ix] == '/') && (ix > 0)) - ix--; - for (; ix > 0; ix--) { - if (ref->path[ix] == '/') - break; + if (bas->path == NULL) { + if (ref->path != NULL) { + uptr = (xmlChar *) ref->path; + if (*uptr == '/') + uptr++; + val = xmlStrdup(uptr); + } + goto done; } - if (ix == 0) { - uptr = (xmlChar *)ref->path; + bptr = (xmlChar *)bas->path; + if (ref->path == NULL) { + for (ix = 0; bptr[ix] != 0; ix++) { + if (bptr[ix] == '/') + nbslash++; + } + uptr = NULL; + len = 1; /* this is for a string terminator only */ } else { - ix++; - uptr = (xmlChar *)&ref->path[ix]; - } - /* - * In base, count the number of '/' from the differing point + * Next we compare the two strings and find where they first differ */ - if (bptr[pos] != ref->path[pos]) { /* check for trivial URI == base */ - for (; bptr[ix] != 0; ix++) { - if (bptr[ix] == '/') - nbslash++; + if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/')) + pos += 2; + if ((*bptr == '.') && (bptr[1] == '/')) + bptr += 2; + else if ((*bptr == '/') && (ref->path[pos] != '/')) + bptr++; + while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0)) + pos++; + + if (bptr[pos] == ref->path[pos]) { + val = xmlStrdup(BAD_CAST ""); + goto done; /* (I can't imagine why anyone would do this) */ } - } + /* + * In URI, "back up" to the last '/' encountered. This will be the + * beginning of the "unique" suffix of URI + */ + ix = pos; + if ((ref->path[ix] == '/') && (ix > 0)) + ix--; + else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == '/')) + ix -= 2; + for (; ix > 0; ix--) { + if (ref->path[ix] == '/') + break; + } + if (ix == 0) { + uptr = (xmlChar *)ref->path; + } else { + ix++; + uptr = (xmlChar *)&ref->path[ix]; + } + + /* + * In base, count the number of '/' from the differing point + */ + if (bptr[pos] != ref->path[pos]) {/* check for trivial URI == base */ + for (; bptr[ix] != 0; ix++) { + if (bptr[ix] == '/') + nbslash++; + } + } + len = xmlStrlen (uptr) + 1; + } + if (nbslash == 0) { - val = xmlStrdup (uptr); + if (uptr != NULL) + val = xmlStrdup (uptr); goto done; } @@ -2238,8 +2278,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) * length of the remainder of the URI, plus enough space * for the "../" groups, plus one for the terminator */ - ix = xmlStrlen (uptr) + 1; - val = (xmlChar *) xmlMalloc (ix + 3 * nbslash); + val = (xmlChar *) xmlMalloc (len + 3 * nbslash); if (val == NULL) { xmlGenericError(xmlGenericErrorContext, "xmlBuildRelativeURI: out of memory\n"); @@ -2257,12 +2296,25 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base) /* * Finish up with the end of the URI */ - memcpy (vptr, uptr, ix); + if (uptr != NULL) { + if ((vptr > val) && (len > 0) && + (uptr[0] == '/') && (vptr[-1] == '/')) { + memcpy (vptr, uptr + 1, len - 1); + vptr[len - 2] = 0; + } else { + memcpy (vptr, uptr, len); + vptr[len - 1] = 0; + } + } else { + vptr[len - 1] = 0; + } - done: +done: /* * Free the working variables */ + if (remove_path != 0) + ref->path = NULL; if (ref != NULL) xmlFreeURI (ref); if (bas != NULL) @@ -6760,7 +6760,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { /** * xmlValidGetPotentialChildren: * @ctree: an element content tree - * @list: an array to store the list of child names + * @names: an array to store the list of child names * @len: a pointer to the number of element in the list * @max: the size of the array * @@ -6770,32 +6770,33 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { */ int -xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list, +xmlValidGetPotentialChildren(xmlElementContent *ctree, + const xmlChar **names, int *len, int max) { int i; - if ((ctree == NULL) || (list == NULL) || (len == NULL)) + if ((ctree == NULL) || (names == NULL) || (len == NULL)) return(-1); if (*len >= max) return(*len); switch (ctree->type) { case XML_ELEMENT_CONTENT_PCDATA: for (i = 0; i < *len;i++) - if (xmlStrEqual(BAD_CAST "#PCDATA", list[i])) return(*len); - list[(*len)++] = BAD_CAST "#PCDATA"; + if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len); + names[(*len)++] = BAD_CAST "#PCDATA"; break; case XML_ELEMENT_CONTENT_ELEMENT: for (i = 0; i < *len;i++) - if (xmlStrEqual(ctree->name, list[i])) return(*len); - list[(*len)++] = ctree->name; + if (xmlStrEqual(ctree->name, names[i])) return(*len); + names[(*len)++] = ctree->name; break; case XML_ELEMENT_CONTENT_SEQ: - xmlValidGetPotentialChildren(ctree->c1, list, len, max); - xmlValidGetPotentialChildren(ctree->c2, list, len, max); + xmlValidGetPotentialChildren(ctree->c1, names, len, max); + xmlValidGetPotentialChildren(ctree->c2, names, len, max); break; case XML_ELEMENT_CONTENT_OR: - xmlValidGetPotentialChildren(ctree->c1, list, len, max); - xmlValidGetPotentialChildren(ctree->c2, list, len, max); + xmlValidGetPotentialChildren(ctree->c1, names, len, max); + xmlValidGetPotentialChildren(ctree->c2, names, len, max); break; } diff --git a/vms/config.vms b/vms/config.vms index b898bf1..6ecfa47 100755 --- a/vms/config.vms +++ b/vms/config.vms @@ -151,15 +151,6 @@ /* Define if you have the <zlib.h> header file. */ #undef HAVE_ZLIB_H -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Name of package */ #undef PACKAGE diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw index 61d15ab..4c3d018 100644 --- a/win32/Makefile.mingw +++ b/win32/Makefile.mingw @@ -126,6 +126,7 @@ XML_OBJS = $(XML_INTDIR)/c14n.o\ $(XML_INTDIR)/relaxng.o\ $(XML_INTDIR)/SAX.o\ $(XML_INTDIR)/SAX2.o\ + $(XML_INTDIR)/schematron.o\ $(XML_INTDIR)/threads.o\ $(XML_INTDIR)/tree.o\ $(XML_INTDIR)/uri.o\ @@ -172,6 +173,7 @@ XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ $(XML_INTDIR_A)/relaxng.o\ $(XML_INTDIR_A)/SAX.o\ $(XML_INTDIR_A)/SAX2.o\ + $(XML_INTDIR_A)/schematron.o\ $(XML_INTDIR_A)/threads.o\ $(XML_INTDIR_A)/tree.o\ $(XML_INTDIR_A)/uri.o\ @@ -209,7 +211,7 @@ UTILS = $(BINDIR)/xmllint.exe\ $(BINDIR)/testSchemas.exe\ $(BINDIR)/testURI.exe\ $(BINDIR)/testXPath.exe\ - $(BINDIR)/runtest.exe\
+ $(BINDIR)/runtest.exe\ $(BINDIR)/runsuite.exe ifeq ($(WITH_THREADS),yes) UTILS += $(BINDIR)/testThreadsWin32.exe diff --git a/win32/Makefile.mingw.orig b/win32/Makefile.mingw.orig new file mode 100644 index 0000000..61d15ab --- /dev/null +++ b/win32/Makefile.mingw.orig @@ -0,0 +1,336 @@ +# Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make. +# +# Take a look at the beginning and modify the variables to suit your +# environment. Having done that, you can do a +# +# nmake [all] to build the libxml and the accompanying utilities. +# nmake clean to remove all compiler output files and return to a +# clean state. +# nmake rebuild to rebuild everything from scratch. This basically does +# a 'nmake clean' and then a 'nmake all'. +# nmake install to install the library and its header files. +# +# November 2002, Igor Zlatkovic <igor@zlatkovic.com> + +# There should never be a need to modify anything below this line. +# ---------------------------------------------------------------- + +AUTOCONF = .\config.mingw +include $(AUTOCONF) + +# Names of various input and output components. +XML_NAME = xml2 +XML_BASENAME = lib$(XML_NAME) +XML_SO = $(XML_BASENAME).dll +XML_IMP = $(XML_BASENAME).lib +XML_A = $(XML_BASENAME).a + +# Place where we let the compiler put its output. +BINDIR = bin.mingw +XML_INTDIR = int.mingw +XML_INTDIR_A = int.a.mingw +UTILS_INTDIR = int.utils.mingw + +# The preprocessor and its options. +CPP = gcc.exe -E +CPPFLAGS += -I$(XML_SRCDIR)/include +ifeq ($(WITH_THREADS),1) +CPPFLAGS += -D_REENTRANT +endif + +# The compiler and its options. +CC = gcc.exe +CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS +CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) +ifneq ($(WITH_THREADS),no) +CFLAGS += -D_REENTRANT +endif +ifeq ($(WITH_THREADS),yes) +CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS +endif +ifeq ($(WITH_THREADS),ctls) +CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS +endif +ifeq ($(WITH_THREADS),native) +CFLAGS += -DHAVE_WIN32_THREADS +endif +ifeq ($(WITH_THREADS),posix) +CFLAGS += -DHAVE_PTHREAD_H +endif +ifeq ($(WITH_ZLIB),1) +CFLAGS += -DHAVE_ZLIB_H +endif + +# The linker and its options. +LD = gcc.exe +LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION) +LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION) +LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX) +LIBS = +ifeq ($(WITH_FTP),1) +CFLAGS += -D_WINSOCKAPI_ +LIBS += -lwsock32 +endif +ifeq ($(WITH_HTTP),1) +CFLAGS += -D_WINSOCKAPI_ +LIBS += -lwsock32 +endif +ifeq ($(WITH_ICONV),1) +LIBS += -liconv +endif +ifeq ($(WITH_ZLIB),1) +LIBS += -lzdll +endif +ifeq ($(WITH_THREADS),posix) +LIBS += -lpthreadGC +endif +ifeq ($(WITH_MODULES),1) +LIBS += -lkernel32 +endif + +# The archiver and its options. +AR = ar.exe +ARFLAGS = -r + +# Optimisation and debug symbols. +ifeq ($(DEBUG),1) +CFLAGS += -D_DEBUG -g +LDFLAGS += +else +CFLAGS += -DNDEBUG -O2 +LDFLAGS += +endif + + +# Libxml object files. +XML_OBJS = $(XML_INTDIR)/c14n.o\ + $(XML_INTDIR)/catalog.o\ + $(XML_INTDIR)/chvalid.o\ + $(XML_INTDIR)/debugXML.o\ + $(XML_INTDIR)/dict.o\ + $(XML_INTDIR)/DOCBparser.o\ + $(XML_INTDIR)/encoding.o\ + $(XML_INTDIR)/entities.o\ + $(XML_INTDIR)/error.o\ + $(XML_INTDIR)/globals.o\ + $(XML_INTDIR)/hash.o\ + $(XML_INTDIR)/HTMLparser.o\ + $(XML_INTDIR)/HTMLtree.o\ + $(XML_INTDIR)/legacy.o\ + $(XML_INTDIR)/list.o\ + $(XML_INTDIR)/nanoftp.o\ + $(XML_INTDIR)/nanohttp.o\ + $(XML_INTDIR)/parser.o\ + $(XML_INTDIR)/parserInternals.o\ + $(XML_INTDIR)/pattern.o\ + $(XML_INTDIR)/relaxng.o\ + $(XML_INTDIR)/SAX.o\ + $(XML_INTDIR)/SAX2.o\ + $(XML_INTDIR)/threads.o\ + $(XML_INTDIR)/tree.o\ + $(XML_INTDIR)/uri.o\ + $(XML_INTDIR)/valid.o\ + $(XML_INTDIR)/xinclude.o\ + $(XML_INTDIR)/xlink.o\ + $(XML_INTDIR)/xmlIO.o\ + $(XML_INTDIR)/xmlmemory.o\ + $(XML_INTDIR)/xmlreader.o\ + $(XML_INTDIR)/xmlregexp.o\ + $(XML_INTDIR)/xmlmodule.o\ + $(XML_INTDIR)/xmlsave.o\ + $(XML_INTDIR)/xmlschemas.o\ + $(XML_INTDIR)/xmlschemastypes.o\ + $(XML_INTDIR)/xmlunicode.o\ + $(XML_INTDIR)/xmlwriter.o\ + $(XML_INTDIR)/xpath.o\ + $(XML_INTDIR)/xpointer.o\ + $(XML_INTDIR)/xmlstring.o + +XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS))) + +# Static libxml object files. +XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\ + $(XML_INTDIR_A)/catalog.o\ + $(XML_INTDIR_A)/chvalid.o\ + $(XML_INTDIR_A)/debugXML.o\ + $(XML_INTDIR_A)/dict.o\ + $(XML_INTDIR_A)/DOCBparser.o\ + $(XML_INTDIR_A)/encoding.o\ + $(XML_INTDIR_A)/entities.o\ + $(XML_INTDIR_A)/error.o\ + $(XML_INTDIR_A)/globals.o\ + $(XML_INTDIR_A)/hash.o\ + $(XML_INTDIR_A)/HTMLparser.o\ + $(XML_INTDIR_A)/HTMLtree.o\ + $(XML_INTDIR_A)/legacy.o\ + $(XML_INTDIR_A)/list.o\ + $(XML_INTDIR_A)/nanoftp.o\ + $(XML_INTDIR_A)/nanohttp.o\ + $(XML_INTDIR_A)/parser.o\ + $(XML_INTDIR_A)/parserInternals.o\ + $(XML_INTDIR_A)/pattern.o\ + $(XML_INTDIR_A)/relaxng.o\ + $(XML_INTDIR_A)/SAX.o\ + $(XML_INTDIR_A)/SAX2.o\ + $(XML_INTDIR_A)/threads.o\ + $(XML_INTDIR_A)/tree.o\ + $(XML_INTDIR_A)/uri.o\ + $(XML_INTDIR_A)/valid.o\ + $(XML_INTDIR_A)/xinclude.o\ + $(XML_INTDIR_A)/xlink.o\ + $(XML_INTDIR_A)/xmlIO.o\ + $(XML_INTDIR_A)/xmlmemory.o\ + $(XML_INTDIR_A)/xmlreader.o\ + $(XML_INTDIR_A)/xmlregexp.o\ + $(XML_INTDIR_A)/xmlmodule.o\ + $(XML_INTDIR_A)/xmlsave.o\ + $(XML_INTDIR_A)/xmlschemas.o\ + $(XML_INTDIR_A)/xmlschemastypes.o\ + $(XML_INTDIR_A)/xmlunicode.o\ + $(XML_INTDIR_A)/xmlwriter.o\ + $(XML_INTDIR_A)/xpath.o\ + $(XML_INTDIR_A)/xpointer.o\ + $(XML_INTDIR_A)/xmlstring.o + +XML_SRCS_A = $(subst .o,.c,$(subst $(XML_INTDIR_A)/,$(XML_SRCDIR)/,$(XML_OBJS_A))) + +# Xmllint and friends executables. +UTILS = $(BINDIR)/xmllint.exe\ + $(BINDIR)/xmlcatalog.exe\ + $(BINDIR)/testAutomata.exe\ + $(BINDIR)/testC14N.exe\ + $(BINDIR)/testDocbook.exe\ + $(BINDIR)/testHTML.exe\ + $(BINDIR)/testReader.exe\ + $(BINDIR)/testRegexp.exe\ + $(BINDIR)/testModule.exe\ + $(BINDIR)/testRelax.exe\ + $(BINDIR)/testSAX.exe\ + $(BINDIR)/testSchemas.exe\ + $(BINDIR)/testURI.exe\ + $(BINDIR)/testXPath.exe\ + $(BINDIR)/runtest.exe\
+ $(BINDIR)/runsuite.exe +ifeq ($(WITH_THREADS),yes) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),ctls) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),native) +UTILS += $(BINDIR)/testThreadsWin32.exe +endif +ifeq ($(WITH_THREADS),posix) +UTILS += $(BINDIR)/testThreads.exe +endif + +all : dep libxml libxmla utils + +libxml : $(BINDIR)/$(XML_SO) + +libxmla : $(BINDIR)/$(XML_A) + +utils : $(UTILS) + +clean : + cmd.exe /C if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR) + cmd.exe /C if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A) + cmd.exe /C if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR) + cmd.exe /C if exist $(BINDIR) rmdir /S /Q $(BINDIR) + cmd.exe /C if exist depends.mingw del depends.mingw + +distclean : clean + cmd.exe /C if exist config.* del config.* + cmd.exe /C if exist Makefile del Makefile + +rebuild : clean all + +install-libs : all + cmd.exe /C if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml + cmd.exe /C if not exist $(BINPREFIX) mkdir $(BINPREFIX) + cmd.exe /C if not exist $(LIBPREFIX) mkdir $(LIBPREFIX) + cmd.exe /C copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml + cmd.exe /C copy $(BINDIR)\$(XML_SO) $(SOPREFIX) + cmd.exe /C copy $(BINDIR)\$(XML_A) $(LIBPREFIX) + cmd.exe /C copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX) + cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX) + +install : install-libs + cmd.exe /C copy $(BINDIR)\*.exe $(BINPREFIX) + +install-dist : install-libs + cmd.exe /C copy $(BINDIR)\xml*.exe $(BINPREFIX) + +# This is a target for me, to make a binary distribution. Not for the public use, +# keep your hands off :-) +BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION) +BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32 +bindist : all + $(MAKE) PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)/bin install-dist + cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt + + +# Creates the dependency file +dep : + $(CC) $(CFLAGS) -M $(XML_SRCS) > depends.mingw + + +# Makes the output directory. +$(BINDIR) : + cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR) + + +# Makes the libxml intermediate directory. +$(XML_INTDIR) : + cmd.exe /C if not exist $(XML_INTDIR) mkdir $(XML_INTDIR) + +# Makes the static libxml intermediate directory. +$(XML_INTDIR_A) : + cmd.exe /C if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A) + +# An implicit rule for libxml compilation. +$(XML_INTDIR)/%.o : $(XML_SRCDIR)/%.c + $(CC) $(CFLAGS) -o $@ -c $< + +# An implicit rule for static libxml compilation. +$(XML_INTDIR_A)/%.o : $(XML_SRCDIR)/%.c + $(CC) $(CFLAGS) -DLIBXML_STATIC -o $@ -c $< + + +# Compiles libxml source. Uses the implicit rule for commands. +$(XML_OBJS) : $(XML_INTDIR) + +# Compiles static libxml source. Uses the implicit rule for commands. +$(XML_OBJS_A) : $(XML_INTDIR_A) + +# Creates the libxml shared object. +XMLSO_LDFLAGS = $(LDFLAGS) -shared -Wl,--dll -Wl,--out-implib,$(BINDIR)/$(XML_IMP) +$(BINDIR)/$(XML_SO) : $(BINDIR) $(XML_OBJS) + $(LD) $(XMLSO_LDFLAGS) -o $(BINDIR)/$(XML_SO) $(XML_OBJS) $(LIBS) + +# Creates the libxml archive. +$(BINDIR)/$(XML_A) : $(BINDIR) $(XML_OBJS_A) + $(AR) $(ARFLAGS) $(BINDIR)\$(XML_A) $(XML_OBJS_A) + + +# Makes the utils intermediate directory. +$(UTILS_INTDIR) : + cmd.exe /C if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR) + +# An implicit rule for xmllint and friends. +ifeq ($(STATIC),1) +$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c + $(CC) -DLIBXML_STATIC $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< + $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) +else +$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c + $(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $< + $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS) +endif + +# Builds xmllint and friends. Uses the implicit rule for commands. +$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla + +# Source dependencies +#-include depends.mingw + diff --git a/win32/Makefile.mingw.rej b/win32/Makefile.mingw.rej new file mode 100644 index 0000000..219818c --- /dev/null +++ b/win32/Makefile.mingw.rej @@ -0,0 +1,17 @@ +*************** +*** 209,215 **** + $(BINDIR)/testSchemas.exe\ + $(BINDIR)/testURI.exe\ + $(BINDIR)/testXPath.exe\ +- $(BINDIR)/runtest.exe\ + $(BINDIR)/runsuite.exe + ifeq ($(WITH_THREADS),yes) + UTILS += $(BINDIR)/testThreadsWin32.exe +--- 211,217 ---- + $(BINDIR)/testSchemas.exe\ + $(BINDIR)/testURI.exe\ + $(BINDIR)/testXPath.exe\ ++ $(BINDIR)/runtest.exe\ + $(BINDIR)/runsuite.exe + ifeq ($(WITH_THREADS),yes) + UTILS += $(BINDIR)/testThreadsWin32.exe diff --git a/win32/configure.js b/win32/configure.js index 6c9909b..5d73f5a 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -44,6 +44,7 @@ var withIso8859x = false; var withZlib = false; var withDebug = true; var withMemDebug = false; +var withRunDebug = false; var withSchemas = true; var withSchematron = true; var withRegExps = true; @@ -126,6 +127,7 @@ function usage() txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n"; txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n"; txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n"; + txt += " run_debug: Enable memory debugger (" + (withRunDebug? "yes" : "no") + ")\n"; txt += " regexps: Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n"; txt += " modules: Enable module support (" + (withModules? "yes" : "no") + ")\n"; txt += " tree: Enable tree api (" + (withTree? "yes" : "no") + ")\n"; @@ -233,6 +235,7 @@ function discoverVersion() vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0")); vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0")); + vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0")); vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0")); vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0")); vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0")); @@ -321,6 +324,8 @@ function configureLibxml() of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0")); } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) { of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0")); + } else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) { + of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0")); } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) { of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0")); } else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) { @@ -462,6 +467,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { withDebug = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "mem_debug") withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "run_debug") + withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "schemas") withSchemas = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "schematron") @@ -634,6 +641,7 @@ txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n"; txtOut += " zlib support: " + boolToStr(withZlib) + "\n"; txtOut += " Debugging module: " + boolToStr(withDebug) + "\n"; txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; +txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n"; txtOut += " Regexp support: " + boolToStr(withRegExps) + "\n"; txtOut += " Module support: " + boolToStr(withModules) + "\n"; txtOut += " Tree support: " + boolToStr(withTree) + "\n"; diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index f7ab402..6100bda 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -290,6 +290,9 @@ htmlDocDump htmlDocDumpMemory #endif #ifdef LIBXML_HTML_ENABLED +htmlDocDumpMemoryFormat +#endif +#ifdef LIBXML_HTML_ENABLED htmlElementAllowedHere #endif #ifdef LIBXML_HTML_ENABLED @@ -1270,6 +1273,7 @@ xmlNodeSetSpacePreserve xmlNormalizeURIPath xmlNormalizeWindowsPath xmlOutputBufferClose +xmlOutputBufferCreateBuffer xmlOutputBufferCreateFd xmlOutputBufferCreateFile xmlOutputBufferCreateFilename @@ -1580,6 +1584,7 @@ xmlSaveFormatFileEnc xmlSaveFormatFileTo xmlSaveSetAttrEscape xmlSaveSetEscape +xmlSaveToBuffer xmlSaveToFd xmlSaveToFilename xmlSaveToIO @@ -1697,6 +1702,9 @@ xmlSchemaSAXUnplug xmlSchemaSetParserErrors #endif #ifdef LIBXML_SCHEMAS_ENABLED +xmlSchemaSetParserStructuredErrors +#endif +#ifdef LIBXML_SCHEMAS_ENABLED xmlSchemaSetValidErrors #endif #ifdef LIBXML_SCHEMAS_ENABLED @@ -1930,6 +1938,7 @@ xmlTextReaderRelaxNGSetSchema xmlTextReaderRelaxNGValidate #endif xmlTextReaderSchemaValidate +xmlTextReaderSchemaValidateCtxt xmlTextReaderSetErrorHandler xmlTextReaderSetParserProp xmlTextReaderSetSchema @@ -610,10 +610,12 @@ xmlFdRead (void * context, char * buffer, int len) { */ static int xmlFdWrite (void * context, const char * buffer, int len) { - int ret; + int ret = 0; - ret = write((int) (long) context, &buffer[0], len); - if (ret < 0) xmlIOErr(0, "write()"); + if (len > 0) { + ret = write((int) (long) context, &buffer[0], len); + if (ret < 0) xmlIOErr(0, "write()"); + } return(ret); } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -860,6 +862,28 @@ xmlFileFlush (void * context) { return(ret); } +#ifdef LIBXML_OUTPUT_ENABLED +/** + * xmlBufferWrite: + * @context: the xmlBuffer + * @buffer: the data to write + * @len: number of bytes to write + * + * Write @len bytes from @buffer to the xml buffer + * + * Returns the number of bytes written + */ +static int +xmlBufferWrite (void * context, const char * buffer, int len) { + int ret; + + ret = xmlBufferAdd((xmlBufferPtr) context, (const xmlChar *) buffer, len); + if (ret != 0) + return(-1); + return(len); +} +#endif + #ifdef HAVE_ZLIB_H /************************************************************************ * * @@ -2436,6 +2460,31 @@ xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) { return(ret); } + +/** + * xmlOutputBufferCreateBuffer: + * @buffer: a xmlBufferPtr + * @encoder: the encoding converter or NULL + * + * Create a buffered output for the progressive saving to a xmlBuffer + * + * Returns the new parser output or NULL + */ +xmlOutputBufferPtr +xmlOutputBufferCreateBuffer(xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder) { + xmlOutputBufferPtr ret; + + if (buffer == NULL) return(NULL); + + ret = xmlOutputBufferCreateIO((xmlOutputWriteCallback) + xmlBufferWrite, + (xmlOutputCloseCallback) + NULL, (void *) buffer, encoder); + + return(ret); +} + #endif /* LIBXML_OUTPUT_ENABLED */ /** diff --git a/xmlmodule.c b/xmlmodule.c index 6cc86ee..15bcf07 100644 --- a/xmlmodule.c +++ b/xmlmodule.c @@ -195,6 +195,10 @@ xmlModuleFree(xmlModulePtr module) #include <dlfcn.h> #endif +#ifndef RTLD_GLOBAL /* For Tru64 UNIX 4.0 */ +#define RTLD_GLOBAL 0 +#endif + /** * xmlModulePlatformOpen: * @name: path to the module @@ -277,10 +281,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) int rc; errno = 0; - rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol); - if ((-1 == rc) && (0 == errno)) { - rc = shl_findsym(handle, name, TYPE_DATA, symbol); - } + rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol); return rc; } diff --git a/xmlreader.c b/xmlreader.c index 7efa273..0bdf071 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -131,12 +131,13 @@ struct _xmlTextReader { /* Handling of RelaxNG validation */ xmlRelaxNGPtr rngSchemas; /* The Relax NG schemas */ xmlRelaxNGValidCtxtPtr rngValidCtxt;/* The Relax NG validation context */ - int rngValidErrors;/* The number of errors detected */ + int rngValidErrors;/* The number of errors detected */ xmlNodePtr rngFullNode; /* the node if RNG not progressive */ /* Handling of Schemas validation */ xmlSchemaPtr xsdSchemas; /* The Schemas schemas */ xmlSchemaValidCtxtPtr xsdValidCtxt;/* The Schemas validation context */ - int xsdValidErrors;/* The number of errors detected */ + int xsdPreserveCtxt; /* 1 if the context was provided by the user */ + int xsdValidErrors;/* The number of errors detected */ xmlSchemaSAXPlugPtr xsdPlug; /* the schemas plug in SAX pipeline */ #endif #ifdef LIBXML_XINCLUDE_ENABLED @@ -1200,8 +1201,14 @@ xmlTextReaderCollectSiblings(xmlNodePtr node) case XML_CDATA_SECTION_NODE: xmlBufferCat(buffer, node->content); break; - case XML_ELEMENT_NODE: - xmlBufferCat(buffer, xmlTextReaderCollectSiblings(node->children)); + case XML_ELEMENT_NODE: { + xmlChar *tmp; + + tmp = xmlTextReaderCollectSiblings(node->children); + xmlBufferCat(buffer, tmp); + xmlFree(tmp); + break; + } default: break; } @@ -1619,6 +1626,7 @@ xmlTextReaderNext(xmlTextReaderPtr reader) { return(xmlTextReaderRead(reader)); } +#ifdef LIBXML_WRITER_ENABLED /** * xmlTextReaderReadInnerXml: * @reader: the xmlTextReaderPtr used @@ -1657,9 +1665,14 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) xmlBufferFree(buff2); } resbuf = buff->content; + buff->content = NULL; + + xmlBufferFree(buff); return resbuf; } +#endif +#ifdef LIBXML_WRITER_ENABLED /** * xmlTextReaderReadOuterXml: * @reader: the xmlTextReaderPtr used @@ -1698,6 +1711,7 @@ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) xmlBufferFree(buff); return resbuf; } +#endif /** * xmlTextReaderReadString: @@ -2141,7 +2155,8 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } if (reader->xsdSchemas != NULL) { @@ -4086,15 +4101,17 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; - } + } return(0); - } + } if (reader->mode != XML_TEXTREADER_MODE_INITIAL) return(-1); if (reader->xsdPlug != NULL) { @@ -4102,9 +4119,11 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) { reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; @@ -4221,81 +4240,106 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) { } /** - * xmlTextReaderSchemaValidate: + * xmlTextReaderSchemaValidateInternal: * @reader: the xmlTextReaderPtr used * @xsd: the path to a W3C XSD schema or NULL + * @ctxt: the XML Schema validation context or NULL + * @options: options (not used yet) * - * Use W3C XSD schema to validate the document as it is processed. + * Validate the document as it is processed using XML Schema. * Activation is only possible before the first Read(). - * if @xsd is NULL, then RelaxNG validation is desactivated. + * If both @xsd and @ctxt are NULL then XML Schema validation is deactivated. * - * Returns 0 in case the schemas validation could be (des)activated and + * Returns 0 in case the schemas validation could be (de)activated and * -1 in case of error. */ -int -xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) { - xmlSchemaParserCtxtPtr ctxt; - +static int +xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader, + const char *xsd, + xmlSchemaValidCtxtPtr ctxt, + int options ATTRIBUTE_UNUSED) +{ if (reader == NULL) return(-1); - - if (xsd == NULL) { - if (reader->xsdPlug != NULL) { - xmlSchemaSAXUnplug(reader->xsdPlug); - reader->xsdPlug = NULL; - } - if (reader->xsdSchemas != NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - } - if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; - } - return(0); - } - if ((reader->mode != XML_TEXTREADER_MODE_INITIAL) || - (reader->ctxt == NULL)) + + if ((xsd != NULL) && (ctxt != NULL)) + return(-1); + + if (((xsd != NULL) || (ctxt != NULL)) && + ((reader->mode != XML_TEXTREADER_MODE_INITIAL) || + (reader->ctxt == NULL))) return(-1); + + /* Cleanup previous validation stuff. */ if (reader->xsdPlug != NULL) { xmlSchemaSAXUnplug(reader->xsdPlug); reader->xsdPlug = NULL; } if (reader->xsdValidCtxt != NULL) { - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + if (! reader->xsdPreserveCtxt) + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); reader->xsdValidCtxt = NULL; } + reader->xsdPreserveCtxt = 0; if (reader->xsdSchemas != NULL) { xmlSchemaFree(reader->xsdSchemas); reader->xsdSchemas = NULL; + } + + if ((xsd == NULL) && (ctxt == NULL)) { + /* We just want to deactivate the validation, so get out. */ + return(0); + } + + if (xsd != NULL) { + xmlSchemaParserCtxtPtr pctxt; + /* Parse the schema and create validation environment. */ + pctxt = xmlSchemaNewParserCtxt(xsd); + if (reader->errorFunc != NULL) { + xmlSchemaSetParserErrors(pctxt, + xmlTextReaderValidityErrorRelay, + xmlTextReaderValidityWarningRelay, + reader); + } + reader->xsdSchemas = xmlSchemaParse(pctxt); + xmlSchemaFreeParserCtxt(pctxt); + if (reader->xsdSchemas == NULL) + return(-1); + reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas); + if (reader->xsdValidCtxt == NULL) { + xmlSchemaFree(reader->xsdSchemas); + reader->xsdSchemas = NULL; + return(-1); + } + reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, + &(reader->ctxt->sax), + &(reader->ctxt->userData)); + if (reader->xsdPlug == NULL) { + xmlSchemaFree(reader->xsdSchemas); + reader->xsdSchemas = NULL; + xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); + reader->xsdValidCtxt = NULL; + return(-1); + } + } else { + /* Use the given validation context. */ + reader->xsdValidCtxt = ctxt; + reader->xsdPreserveCtxt = 1; + reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, + &(reader->ctxt->sax), + &(reader->ctxt->userData)); + if (reader->xsdPlug == NULL) { + reader->xsdValidCtxt = NULL; + reader->xsdPreserveCtxt = 0; + return(-1); + } } - ctxt = xmlSchemaNewParserCtxt(xsd); - if (reader->errorFunc != NULL) { - xmlSchemaSetParserErrors(ctxt, - xmlTextReaderValidityErrorRelay, - xmlTextReaderValidityWarningRelay, - reader); - } - reader->xsdSchemas = xmlSchemaParse(ctxt); - xmlSchemaFreeParserCtxt(ctxt); - if (reader->xsdSchemas == NULL) - return(-1); - reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas); - if (reader->xsdValidCtxt == NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - return(-1); - } - reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt, - &(reader->ctxt->sax), - &(reader->ctxt->userData)); - if (reader->xsdPlug == NULL) { - xmlSchemaFree(reader->xsdSchemas); - reader->xsdSchemas = NULL; - xmlSchemaFreeValidCtxt(reader->xsdValidCtxt); - reader->xsdValidCtxt = NULL; - return(-1); - } + /* + * Redirect the validation context's error channels to use + * the reader channels. + * TODO: In case the user provides the validation context we + * could make this redirection optional. + */ if (reader->errorFunc != NULL) { xmlSchemaSetValidErrors(reader->xsdValidCtxt, xmlTextReaderValidityErrorRelay, @@ -4311,6 +4355,45 @@ xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) { reader->validate = XML_TEXTREADER_VALIDATE_XSD; return(0); } + +/** + * xmlTextReaderSchemaValidateCtxt: + * @reader: the xmlTextReaderPtr used + * @ctxt: the XML Schema validation context or NULL + * @options: options (not used yet) + * + * Use W3C XSD schema context to validate the document as it is processed. + * Activation is only possible before the first Read(). + * If @ctxt is NULL, then XML Schema validation is deactivated. + * + * Returns 0 in case the schemas validation could be (de)activated and + * -1 in case of error. + */ +int +xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader, + xmlSchemaValidCtxtPtr ctxt, + int options) +{ + return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options)); +} + +/** + * xmlTextReaderSchemaValidate: + * @reader: the xmlTextReaderPtr used + * @xsd: the path to a W3C XSD schema or NULL + * + * Use W3C XSD schema to validate the document as it is processed. + * Activation is only possible before the first Read(). + * If @xsd is NULL, then XML Schema validation is deactivated. + * + * Returns 0 in case the schemas validation could be (de)activated and + * -1 in case of error. + */ +int +xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) +{ + return(xmlTextReaderSchemaValidateInternal(reader, xsd, NULL, 0)); +} #endif /** diff --git a/xmlregexp.c b/xmlregexp.c index 45b917b..de581f0 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -42,6 +42,8 @@ /* #define DEBUG_PUSH */ /* #define DEBUG_COMPACTION */ +#define MAX_PUSH 10000000 + #define ERROR(str) \ ctxt->error = XML_REGEXP_COMPILE_ERROR; \ xmlRegexpErrCompile(ctxt, str); @@ -73,20 +75,20 @@ typedef enum { XML_REGEXP_EPSILON = 1, XML_REGEXP_CHARVAL, XML_REGEXP_RANGES, - XML_REGEXP_SUBREG, + XML_REGEXP_SUBREG, /* used for () sub regexps */ XML_REGEXP_STRING, XML_REGEXP_ANYCHAR, /* . */ XML_REGEXP_ANYSPACE, /* \s */ XML_REGEXP_NOTSPACE, /* \S */ XML_REGEXP_INITNAME, /* \l */ - XML_REGEXP_NOTINITNAME, /* \l */ + XML_REGEXP_NOTINITNAME, /* \L */ XML_REGEXP_NAMECHAR, /* \c */ XML_REGEXP_NOTNAMECHAR, /* \C */ XML_REGEXP_DECIMAL, /* \d */ - XML_REGEXP_NOTDECIMAL, /* \d */ + XML_REGEXP_NOTDECIMAL, /* \D */ XML_REGEXP_REALCHAR, /* \w */ - XML_REGEXP_NOTREALCHAR, /* \w */ - XML_REGEXP_LETTER, + XML_REGEXP_NOTREALCHAR, /* \W */ + XML_REGEXP_LETTER = 100, XML_REGEXP_LETTER_UPPERCASE, XML_REGEXP_LETTER_LOWERCASE, XML_REGEXP_LETTER_TITLECASE, @@ -201,6 +203,7 @@ struct _xmlRegTrans { int to; int counter; int count; + int nd; }; struct _xmlAutomataState { @@ -326,6 +329,7 @@ struct _xmlRegExecCtxt { xmlRegStatePtr errState; /* the error state */ xmlChar *errString; /* the string raising the error */ int *errCounts; /* counters at the error state */ + int nbPush; }; #define REGEXP_ALL_COUNTER 0x123456 @@ -335,6 +339,9 @@ static void xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top); static void xmlRegFreeState(xmlRegStatePtr state); static void xmlRegFreeAtom(xmlRegAtomPtr atom); static int xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr); +static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint); +static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, + int neg, int start, int end, const xmlChar *blockName); /************************************************************************ * * @@ -417,6 +424,9 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) { ret->nbCounters = ctxt->nbCounters; ret->counters = ctxt->counters; ret->determinist = ctxt->determinist; + if (ret->determinist == -1) { + xmlRegexpIsDeterminist(ret); + } if ((ret->determinist != 0) && (ret->nbCounters == 0) && @@ -569,7 +579,6 @@ xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) { i, j, trans->atom->no, trans->to, atomno, targetno); printf(" previous to is %d\n", prev); #endif - ret->determinist = 0; if (transdata != NULL) xmlFree(transdata); xmlFree(transitions); @@ -1016,6 +1025,12 @@ xmlRegPrintTrans(FILE *output, xmlRegTransPtr trans) { fprintf(output, "removed\n"); return; } + if (trans->nd != 0) { + if (trans->nd == 2) + fprintf(output, "last not determinist, "); + else + fprintf(output, "not determinist, "); + } if (trans->counter >= 0) { fprintf(output, "counted %d, ", trans->counter); } @@ -1235,7 +1250,7 @@ xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target, static void xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, xmlRegAtomPtr atom, xmlRegStatePtr target, - int counter, int count, int nchk) { + int counter, int count) { int nrtrans; @@ -1253,19 +1268,17 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, * so, silently ignore this request. */ - if (nchk == 0) { - for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) { - xmlRegTransPtr trans = &(state->trans[nrtrans]); - if ((trans->atom == atom) && - (trans->to == target->no) && - (trans->counter == counter) && - (trans->count == count)) { + for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) { + xmlRegTransPtr trans = &(state->trans[nrtrans]); + if ((trans->atom == atom) && + (trans->to == target->no) && + (trans->counter == counter) && + (trans->count == count)) { #ifdef DEBUG_REGEXP_GRAPH - printf("Ignoring duplicate transition from %d to %d\n", - state->no, target->no); + printf("Ignoring duplicate transition from %d to %d\n", + state->no, target->no); #endif - return; - } + return; } } @@ -1308,6 +1321,7 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, state->trans[state->nbTrans].to = target->no; state->trans[state->nbTrans].counter = counter; state->trans[state->nbTrans].count = count; + state->trans[state->nbTrans].nd = 0; state->nbTrans++; xmlRegStateAddTransTo(ctxt, target, state->no); } @@ -1359,9 +1373,9 @@ xmlFAGenerateAllTransition(xmlRegParserCtxtPtr ctxt, ctxt->state = to; } if (lax) - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER); else - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER); } /** @@ -1379,7 +1393,7 @@ xmlFAGenerateEpsilonTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1); } /** @@ -1398,7 +1412,7 @@ xmlFAGenerateCountedEpsilonTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1); } /** @@ -1417,7 +1431,7 @@ xmlFAGenerateCountedTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePush(ctxt, to); ctxt->state = to; } - xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter, 0); + xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter); } /** @@ -1450,6 +1464,14 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, * Generate an epsilon transition to link to the target */ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to); +#ifdef DV + } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) && + (atom->quant != XML_REGEXP_QUANT_ONCE)) { + to = xmlRegNewState(ctxt); + xmlRegStatePush(ctxt, to); + ctxt->state = to; + xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to); +#endif } switch (atom->quant) { case XML_REGEXP_QUANT_OPT: @@ -1504,8 +1526,8 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, } else { newstate = xmlRegNewState(ctxt); xmlRegStatePush(ctxt, newstate); - ctxt->state = newstate; } + ctxt->state = newstate; xmlFAGenerateCountedTransition(ctxt, atom->stop, newstate, counter); } @@ -1513,7 +1535,8 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, break; } return(0); - } else if ((atom->min == 0) && (atom->max == 0) && + } + if ((atom->min == 0) && (atom->max == 0) && (atom->quant == XML_REGEXP_QUANT_RANGE)) { /* * we can discard the atom and generate an epsilon transition instead @@ -1530,21 +1553,20 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, ctxt->state = to; xmlRegFreeAtom(atom); return(0); - } else { - if (to == NULL) { - to = xmlRegNewState(ctxt); - if (to != NULL) - xmlRegStatePush(ctxt, to); - else { - return(-1); - } - } - if (xmlRegAtomPush(ctxt, atom) < 0) { + } + if (to == NULL) { + to = xmlRegNewState(ctxt); + if (to != NULL) + xmlRegStatePush(ctxt, to); + else { return(-1); } - xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1, 0); - ctxt->state = to; } + if (xmlRegAtomPush(ctxt, atom) < 0) { + return(-1); + } + xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1); + ctxt->state = to; switch (atom->quant) { case XML_REGEXP_QUANT_OPT: atom->quant = XML_REGEXP_QUANT_ONCE; @@ -1553,11 +1575,11 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, case XML_REGEXP_QUANT_MULT: atom->quant = XML_REGEXP_QUANT_ONCE; xmlFAGenerateEpsilonTransition(ctxt, from, to); - xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1); break; case XML_REGEXP_QUANT_PLUS: atom->quant = XML_REGEXP_QUANT_ONCE; - xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1, 0); + xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1); break; default: break; @@ -1614,7 +1636,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr, xmlRegStateAddTrans(ctxt, from, NULL, ctxt->states[newto], - -1, to->trans[transnr].count, 0); + -1, to->trans[transnr].count); } else { #ifdef DEBUG_REGEXP_GRAPH printf("Found epsilon trans %d from %d to %d\n", @@ -1637,10 +1659,10 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr, if (to->trans[transnr].counter >= 0) { xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, ctxt->states[newto], - to->trans[transnr].counter, -1, 1); + to->trans[transnr].counter, -1); } else { xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, - ctxt->states[newto], counter, -1, 1); + ctxt->states[newto], counter, -1); } } } @@ -1869,12 +1891,175 @@ xmlFAEliminateEpsilonTransitions(xmlRegParserCtxtPtr ctxt) { } +static int +xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) { + int ret = 0; + + if ((range1->type == XML_REGEXP_RANGES) || + (range2->type == XML_REGEXP_RANGES) || + (range2->type == XML_REGEXP_SUBREG) || + (range1->type == XML_REGEXP_SUBREG) || + (range1->type == XML_REGEXP_STRING) || + (range2->type == XML_REGEXP_STRING)) + return(-1); + + /* put them in order */ + if (range1->type > range2->type) { + xmlRegRangePtr tmp; + + tmp = range1; + range1 = range2; + range2 = tmp; + } + if ((range1->type == XML_REGEXP_ANYCHAR) || + (range2->type == XML_REGEXP_ANYCHAR)) { + ret = 1; + } else if ((range1->type == XML_REGEXP_EPSILON) || + (range2->type == XML_REGEXP_EPSILON)) { + return(0); + } else if (range1->type == range2->type) { + if ((range1->type != XML_REGEXP_CHARVAL) || + (range1->end < range2->start) || + (range2->end < range1->start)) + ret = 1; + else + ret = 0; + } else if (range1->type == XML_REGEXP_CHARVAL) { + int codepoint; + int neg = 0; + + /* + * just check all codepoints in the range for acceptance, + * this is usually way cheaper since done only once at + * compilation than testing over and over at runtime or + * pushing too many states when evaluating. + */ + if (((range1->neg == 0) && (range2->neg != 0)) || + ((range1->neg != 0) && (range2->neg == 0))) + neg = 1; + + for (codepoint = range1->start;codepoint <= range1->end ;codepoint++) { + ret = xmlRegCheckCharacterRange(range2->type, codepoint, + 0, range2->start, range2->end, + range2->blockName); + if (ret < 0) + return(-1); + if (((neg == 1) && (ret == 0)) || + ((neg == 0) && (ret == 1))) + return(1); + } + return(0); + } else if ((range1->type == XML_REGEXP_BLOCK_NAME) || + (range2->type == XML_REGEXP_BLOCK_NAME)) { + if (range1->type == range2->type) { + ret = xmlStrEqual(range1->blockName, range2->blockName); + } else { + /* + * comparing a block range with anything else is way + * too costly, and maintining the table is like too much + * memory too, so let's force the automata to save state + * here. + */ + return(1); + } + } else if ((range1->type < XML_REGEXP_LETTER) || + (range2->type < XML_REGEXP_LETTER)) { + if ((range1->type == XML_REGEXP_ANYSPACE) && + (range2->type == XML_REGEXP_NOTSPACE)) + ret = 0; + else if ((range1->type == XML_REGEXP_INITNAME) && + (range2->type == XML_REGEXP_NOTINITNAME)) + ret = 0; + else if ((range1->type == XML_REGEXP_NAMECHAR) && + (range2->type == XML_REGEXP_NOTNAMECHAR)) + ret = 0; + else if ((range1->type == XML_REGEXP_DECIMAL) && + (range2->type == XML_REGEXP_NOTDECIMAL)) + ret = 0; + else if ((range1->type == XML_REGEXP_REALCHAR) && + (range2->type == XML_REGEXP_NOTREALCHAR)) + ret = 0; + else { + /* same thing to limit complexity */ + return(1); + } + } else { + ret = 0; + /* range1->type < range2->type here */ + switch (range1->type) { + case XML_REGEXP_LETTER: + /* all disjoint except in the subgroups */ + if ((range2->type == XML_REGEXP_LETTER_UPPERCASE) || + (range2->type == XML_REGEXP_LETTER_LOWERCASE) || + (range2->type == XML_REGEXP_LETTER_TITLECASE) || + (range2->type == XML_REGEXP_LETTER_MODIFIER) || + (range2->type == XML_REGEXP_LETTER_OTHERS)) + ret = 1; + break; + case XML_REGEXP_MARK: + if ((range2->type == XML_REGEXP_MARK_NONSPACING) || + (range2->type == XML_REGEXP_MARK_SPACECOMBINING) || + (range2->type == XML_REGEXP_MARK_ENCLOSING)) + ret = 1; + break; + case XML_REGEXP_NUMBER: + if ((range2->type == XML_REGEXP_NUMBER_DECIMAL) || + (range2->type == XML_REGEXP_NUMBER_LETTER) || + (range2->type == XML_REGEXP_NUMBER_OTHERS)) + ret = 1; + break; + case XML_REGEXP_PUNCT: + if ((range2->type == XML_REGEXP_PUNCT_CONNECTOR) || + (range2->type == XML_REGEXP_PUNCT_DASH) || + (range2->type == XML_REGEXP_PUNCT_OPEN) || + (range2->type == XML_REGEXP_PUNCT_CLOSE) || + (range2->type == XML_REGEXP_PUNCT_INITQUOTE) || + (range2->type == XML_REGEXP_PUNCT_FINQUOTE) || + (range2->type == XML_REGEXP_PUNCT_OTHERS)) + ret = 1; + break; + case XML_REGEXP_SEPAR: + if ((range2->type == XML_REGEXP_SEPAR_SPACE) || + (range2->type == XML_REGEXP_SEPAR_LINE) || + (range2->type == XML_REGEXP_SEPAR_PARA)) + ret = 1; + break; + case XML_REGEXP_SYMBOL: + if ((range2->type == XML_REGEXP_SYMBOL_MATH) || + (range2->type == XML_REGEXP_SYMBOL_CURRENCY) || + (range2->type == XML_REGEXP_SYMBOL_MODIFIER) || + (range2->type == XML_REGEXP_SYMBOL_OTHERS)) + ret = 1; + break; + case XML_REGEXP_OTHER: + if ((range2->type == XML_REGEXP_OTHER_CONTROL) || + (range2->type == XML_REGEXP_OTHER_FORMAT) || + (range2->type == XML_REGEXP_OTHER_PRIVATE)) + ret = 1; + break; + default: + if ((range2->type >= XML_REGEXP_LETTER) && + (range2->type < XML_REGEXP_BLOCK_NAME)) + ret = 0; + else { + /* safety net ! */ + return(1); + } + } + } + if (((range1->neg == 0) && (range2->neg != 0)) || + ((range1->neg != 0) && (range2->neg == 0))) + ret = !ret; + return(1); +} + /** * xmlFACompareAtoms: * @atom1: an atom * @atom2: an atom * - * Compares two atoms to check whether they are equivalents + * Compares two atoms to check whether they intersect in some ways, + * this is used by xmlFAComputesDeterminism only * * Returns 1 if yes and 0 otherwise */ @@ -1887,28 +2072,65 @@ xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2) { if ((atom1 == NULL) || (atom2 == NULL)) return(0); - if (atom1->type != atom2->type) + if ((atom1->type == XML_REGEXP_RANGES) && + (atom2->type == XML_REGEXP_CHARVAL)) { + } else if ((atom1->type == XML_REGEXP_CHARVAL) && + (atom2->type == XML_REGEXP_RANGES)) { + xmlRegAtomPtr tmp; + tmp = atom1; + atom1 = atom2; + atom2 = tmp; + } else if (atom1->type != atom2->type) { return(0); + } switch (atom1->type) { case XML_REGEXP_STRING: ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep, (xmlChar *)atom2->valuep); break; case XML_REGEXP_EPSILON: - return(1); + goto not_determinist; case XML_REGEXP_CHARVAL: - ret = atom1->codepoint == atom2->codepoint; + ret = (atom1->codepoint == atom2->codepoint); break; case XML_REGEXP_RANGES: - TODO; - return(0); + if (atom2->type == XML_REGEXP_CHARVAL) { + ret = xmlRegCheckCharacter(atom1, atom2->codepoint); + if (ret < 0) + return(-1); + break; + } else { + int i, j, res; + xmlRegRangePtr r1, r2; + + /* + * need to check that none of the ranges eventually matches + */ + for (i = 0;i < atom1->nbRanges;i++) { + for (j = 0;j < atom2->nbRanges;j++) { + r1 = atom1->ranges[i]; + r2 = atom2->ranges[j]; + res = xmlFACompareRanges(r1, r2); + if (res == 1) { + ret = 1; + goto done; + } + } + } + ret = 0; + } + break; default: - return(1); + goto not_determinist; } +done: if (atom1->neg != atom2->neg) { ret = !ret; } - return(ret); + if (ret == 0) + return(0); +not_determinist: + return(1); } /** @@ -1923,12 +2145,18 @@ static int xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, int to, xmlRegAtomPtr atom) { int ret = 1; - int transnr; + int res; + int transnr, nbTrans; xmlRegTransPtr t1; if (state == NULL) return(ret); - for (transnr = 0;transnr < state->nbTrans;transnr++) { + /* + * don't recurse on transitions potentially added in the course of + * the elimination. + */ + nbTrans = state->nbTrans; + for (transnr = 0;transnr < nbTrans;transnr++) { t1 = &(state->trans[transnr]); /* * check transitions conflicting with the one looked at @@ -1936,16 +2164,21 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state, if (t1->atom == NULL) { if (t1->to == -1) continue; - ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], + res = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], to, atom); - if (ret == 0) - return(0); + if (res == 0) { + ret = 0; + /* t1->nd = 1; */ + } continue; } if (t1->to != to) continue; - if (xmlFACompareAtoms(t1->atom, atom)) - return(0); + if (xmlFACompareAtoms(t1->atom, atom)) { + ret = 0; + /* mark the transition as non-deterministic */ + t1->nd = 1; + } } return(ret); } @@ -1962,7 +2195,7 @@ static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { int statenr, transnr; xmlRegStatePtr state; - xmlRegTransPtr t1, t2; + xmlRegTransPtr t1, t2, last; int i; int ret = 1; @@ -1974,8 +2207,7 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { return(ctxt->determinist); /* - * Check for all states that there aren't 2 transitions - * with the same atom and a different target. + * First cleanup the automata removing cancelled transitions */ for (statenr = 0;statenr < ctxt->nbStates;statenr++) { state = ctxt->states[statenr]; @@ -1989,8 +2221,10 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { * Determinism checks in case of counted or all transitions * will have to be handled separately */ - if (t1->atom == NULL) + if (t1->atom == NULL) { + /* t1->nd = 1; */ continue; + } if (t1->to == -1) /* eliminated */ continue; for (i = 0;i < transnr;i++) { @@ -2001,10 +2235,46 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { if (t1->to == t2->to) { if (xmlFACompareAtoms(t1->atom, t2->atom)) t2->to = -1; /* eliminated */ - } else { - /* not determinist ! */ - if (xmlFACompareAtoms(t1->atom, t2->atom)) - ret = 0; + } + } + } + } + } + + /* + * Check for all states that there aren't 2 transitions + * with the same atom and a different target. + */ + for (statenr = 0;statenr < ctxt->nbStates;statenr++) { + state = ctxt->states[statenr]; + if (state == NULL) + continue; + if (state->nbTrans < 2) + continue; + last = NULL; + for (transnr = 0;transnr < state->nbTrans;transnr++) { + t1 = &(state->trans[transnr]); + /* + * Determinism checks in case of counted or all transitions + * will have to be handled separately + */ + if (t1->atom == NULL) { + continue; + } + if (t1->to == -1) /* eliminated */ + continue; + for (i = 0;i < transnr;i++) { + t2 = &(state->trans[i]); + if (t2->to == -1) /* eliminated */ + continue; + if (t2->atom != NULL) { + /* not determinist ! */ + if (xmlFACompareAtoms(t1->atom, t2->atom)) { + ret = 0; + /* mark the transitions as non-deterministic ones */ + t1->nd = 1; + t2->nd = 1; + last = t1; } } else if (t1->to != -1) { /* @@ -2013,16 +2283,39 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) { */ ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to], t2->to, t2->atom); + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) return(0); + */ + if (ret == 0) { + t1->nd = 1; + /* t2->nd = 1; */ + last = t1; + } } } + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) - break; + break; */ + } + + /* + * mark specifically the last non-deterministic transition + * from a state since there is no need to set-up rollback + * from it + */ + if (last != NULL) { + last->nd = 2; } + + /* don't shortcut the computation so all non deterministic + transition get marked down if (ret == 0) - break; + break; */ } + ctxt->determinist = ret; return(ret); } @@ -2336,6 +2629,12 @@ xmlFARegExecSave(xmlRegExecCtxtPtr exec) { xmlFARegDebugExec(exec); exec->transno--; #endif +#ifdef MAX_PUSH + if (exec->nbPush > MAX_PUSH) { + return; + } + exec->nbPush++; +#endif if (exec->maxRollbacks == 0) { exec->maxRollbacks = 4; @@ -2422,10 +2721,11 @@ static int xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { xmlRegExecCtxt execval; xmlRegExecCtxtPtr exec = &execval; - int ret, codepoint = 0, len; + int ret, codepoint = 0, len, deter; exec->inputString = content; exec->index = 0; + exec->nbPush = 0; exec->determinist = 1; exec->maxRollbacks = 0; exec->nbRollbacks = 0; @@ -2482,6 +2782,7 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { continue; atom = trans->atom; ret = 0; + deter = 1; if (trans->count >= 0) { int count; xmlRegCounterPtr counter; @@ -2497,6 +2798,8 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { trans->count, count, counter->min, counter->max); #endif ret = ((count >= counter->min) && (count <= counter->max)); + if ((ret) && (counter->min != counter->max)) + deter = 0; } else if (atom == NULL) { fprintf(stderr, "epsilon transition left at runtime\n"); exec->status = -2; @@ -2509,7 +2812,15 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { /* * this is a multiple input sequence + * If there is a counter associated increment it now. + * before potentially saving and rollback */ + if (trans->counter >= 0) { +#ifdef DEBUG_REGEXP_EXEC + printf("Increasing count %d\n", trans->counter); +#endif + exec->counts[trans->counter]++; + } if (exec->state->nbTrans > exec->transno + 1) { xmlFARegExecSave(exec); } @@ -2559,6 +2870,12 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { if (ret == 0) { goto rollback; } + if (trans->counter >= 0) { +#ifdef DEBUG_REGEXP_EXEC + printf("Decreasing count %d\n", trans->counter); +#endif + exec->counts[trans->counter]--; + } } else if ((ret == 0) && (atom->min == 0) && (atom->max > 0)) { /* * we don't match on the codepoint, but minOccurs of 0 @@ -2576,7 +2893,17 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) { ret = 1; } if (ret == 1) { - if (exec->state->nbTrans > exec->transno + 1) { + if ((trans->nd == 1) || + ((trans->count >= 0) && (deter == 0) && + (exec->state->nbTrans > exec->transno + 1))) { +#ifdef DEBUG_REGEXP_EXEC + if (trans->nd == 1) + printf("Saving on nd transition atom %d for %c at %d\n", + trans->atom->no, codepoint, exec->index); + else + printf("Saving on counted transition count %d for %c at %d\n", + trans->count, codepoint, exec->index); +#endif xmlFARegExecSave(exec); } if (trans->counter >= 0) { @@ -2613,6 +2940,10 @@ rollback: * Failed to find a way out */ exec->determinist = 0; +#ifdef DEBUG_REGEXP_EXEC + printf("rollback from state %d on %d:%c\n", exec->state->no, + codepoint,codepoint); +#endif xmlFARegExecRollBack(exec); } progress: @@ -2632,8 +2963,11 @@ progress: xmlFree(exec->counts); if (exec->status == 0) return(1); - if (exec->status == -1) + if (exec->status == -1) { + if (exec->nbPush > MAX_PUSH) + return(-1); return(0); + } return(exec->status); } @@ -2708,6 +3042,7 @@ xmlRegNewExecCtxt(xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data) { exec->inputStack = NULL; exec->errStateNo = -1; exec->errString = NULL; + exec->nbPush = 0; return(exec); } @@ -3344,7 +3679,7 @@ xmlRegExecPushString2(xmlRegExecCtxtPtr exec, const xmlChar *value, ret = xmlRegExecPushStringInternal(exec, str, data, 1); if (str != buf) - xmlFree(buf); + xmlFree(str); return(ret); } @@ -4784,11 +5119,11 @@ xmlNewAutomata(void) { /* initialize the parser */ ctxt->end = NULL; ctxt->start = ctxt->state = xmlRegNewState(ctxt); - ctxt->start->type = XML_REGEXP_START_STATE; if (ctxt->start == NULL) { xmlFreeAutomata(ctxt); return(NULL); } + ctxt->start->type = XML_REGEXP_START_STATE; if (xmlRegStatePush(ctxt, ctxt->start) < 0) { xmlRegFreeState(ctxt->start); xmlFreeAutomata(ctxt); @@ -5081,7 +5416,7 @@ xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; @@ -5147,7 +5482,7 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; @@ -5236,7 +5571,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; return(to); @@ -5298,7 +5633,7 @@ xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, to = xmlRegNewState(am); xmlRegStatePush(am, to); } - xmlRegStateAddTrans(am, from, atom, to, counter, -1, 0); + xmlRegStateAddTrans(am, from, atom, to, counter, -1); xmlRegAtomPush(am, atom); am->state = to; return(to); @@ -6134,7 +6469,7 @@ tail: * xmlExpGetLanguage: * @ctxt: the expression context * @exp: the expression - * @list: where to store the tokens + * @langList: where to store the tokens * @len: the allocated lenght of @list * * Find all the strings used in @exp and store them in @list @@ -6144,10 +6479,10 @@ tail: */ int xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, - const xmlChar**list, int len) { - if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0)) + const xmlChar**langList, int len) { + if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0)) return(-1); - return(xmlExpGetLanguageInt(ctxt, exp, list, len, 0)); + return(xmlExpGetLanguageInt(ctxt, exp, langList, len, 0)); } static int @@ -6200,7 +6535,7 @@ tail: * xmlExpGetStart: * @ctxt: the expression context * @exp: the expression - * @list: where to store the tokens + * @tokList: where to store the tokens * @len: the allocated lenght of @list * * Find all the strings that appears at the start of the languages @@ -6212,10 +6547,10 @@ tail: */ int xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, - const xmlChar**list, int len) { - if ((ctxt == NULL) || (exp == NULL) || (list == NULL) || (len <= 0)) + const xmlChar**tokList, int len) { + if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0)) return(-1); - return(xmlExpGetStartInt(ctxt, exp, list, len, 0)); + return(xmlExpGetStartInt(ctxt, exp, tokList, len, 0)); } /** @@ -6861,10 +7196,10 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { len = xmlExpGetStartInt(ctxt, sub, tab, ctxt->tabSize, 0); while (len < 0) { const xmlChar **temp; - temp = (const xmlChar **) xmlRealloc(tab, ctxt->tabSize * 2 * + temp = (const xmlChar **) xmlRealloc((xmlChar **) tab, ctxt->tabSize * 2 * sizeof(const xmlChar *)); if (temp == NULL) { - xmlFree(tab); + xmlFree((xmlChar **) tab); return(NULL); } tab = temp; @@ -6875,14 +7210,14 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { tmp = xmlExpStringDeriveInt(ctxt, exp, tab[i]); if ((tmp == NULL) || (tmp == forbiddenExp)) { xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp); } tmp2 = xmlExpStringDeriveInt(ctxt, sub, tab[i]); if ((tmp2 == NULL) || (tmp2 == forbiddenExp)) { xmlExpFree(ctxt, tmp); xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp); } tmp3 = xmlExpExpDeriveInt(ctxt, tmp, tmp2); @@ -6891,7 +7226,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { if ((tmp3 == NULL) || (tmp3 == forbiddenExp)) { xmlExpFree(ctxt, ret); - xmlFree(tab); + xmlFree((xmlChar **) tab); return(tmp3); } @@ -6900,12 +7235,12 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) { else { ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, tmp3, NULL, 0, 0); if (ret == NULL) { - xmlFree(tab); + xmlFree((xmlChar **) tab); return(NULL); } } } - xmlFree(tab); + xmlFree((xmlChar **) tab); return(ret); } @@ -344,9 +344,9 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt) ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0; } - if (xmlSaveNoEmptyTags) { - ctxt->options |= XML_SAVE_NO_EMPTY; - } + if (xmlSaveNoEmptyTags) { + ctxt->options |= XML_SAVE_NO_EMPTY; + } } /** @@ -400,10 +400,10 @@ xmlNewSaveCtxt(const char *encoding, int options) * Use the options */ - /* Re-check this option as it may already have been set */ - if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) { - options |= XML_SAVE_NO_EMPTY; - } + /* Re-check this option as it may already have been set */ + if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) { + options |= XML_SAVE_NO_EMPTY; + } ret->options = options; if (options & XML_SAVE_FORMAT) @@ -1111,6 +1111,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); return; } + if (cur->type == XML_DOCUMENT_FRAG_NODE) { + xhtmlNodeListDumpOutput(ctxt, cur->children); + return; + } buf = ctxt->buf; if (cur->type == XML_ELEMENT_DECL) { xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur); @@ -1473,13 +1477,36 @@ xmlSaveToFilename(const char *filename, const char *encoding, int options) * with the encoding and the options given * * Returns a new serialization context or NULL in case of error. + */ + xmlSaveCtxtPtr xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options) { - TODO - return(NULL); + xmlSaveCtxtPtr ret; + xmlOutputBufferPtr out_buff; + xmlCharEncodingHandlerPtr handler; + + ret = xmlNewSaveCtxt(encoding, options); + if (ret == NULL) return(NULL); + + if (encoding != NULL) { + handler = xmlFindCharEncodingHandler(encoding); + if (handler == NULL) { + xmlFree(ret); + return(NULL); + } + } else + handler = NULL; + out_buff = xmlOutputBufferCreateBuffer(buffer, handler); + if (out_buff == NULL) { + xmlFree(ret); + if (handler) xmlCharEncCloseFunc(handler); + return(NULL); + } + + ret->buf = out_buff; + return(ret); } - */ /** * xmlSaveToIO: diff --git a/xmlschemas.c b/xmlschemas.c index abc4802..0da3564 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -17,10 +17,32 @@ * against their types. * - Eliminate item creation for: ?? * + * URGENT TODO: + * - For xsi-driven schema acquisition, augment the IDCs after every + * acquisition episode (xmlSchemaAugmentIDC). + * * NOTES: * - Elimated item creation for: <restriction>, <extension>, * <simpleContent>, <complexContent>, <list>, <union> * + * PROBLEMS: + * - http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0337.html + * IDC XPath expression and chameleon includes: the targetNamespace is changed, so + * XPath will have trouble to resolve to this namespace, since not known. + * + * + * CONSTRAINTS: + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) + * Status: complete + * (1.2) + * In xmlSchemaGroupDefReferenceTermFixup() and + * (2) + * In xmlSchemaParseModelGroup() + * TODO: Actually this should go to component-level checks, + * but is done here due to performance. Move it to an other layer + * is schema construction via an API is implemented. */ #define IN_LIBXML #include "libxml.h" @@ -58,20 +80,24 @@ /* #define DEBUG_AUTOMATA 1 */ -#define DEBUG_ATTR_VALIDATION 0 +/* #define DEBUG_IDC */ -/* #define DEBUG_IDC 1 */ +/* #define DEBUG_IDC_NODE_TABLE */ -/* #define DEBUG_INCLUDES 1 */ +#ifdef DEBUG_IDC + #ifndef DEBUG_IDC_NODE_TABLE + #define DEBUG_IDC_NODE_TABLE + #endif +#endif /* #define ENABLE_PARTICLE_RESTRICTION 1 */ -/* #define ENABLE_SCHEMA_SPACES */ - -/* #define ENABLE_REDEFINE */ +#define ENABLE_REDEFINE /* #define ENABLE_NAMED_LOCALS */ +/* #define ENABLE_IDC_NODE_TABLES_TEST */ + #define DUMP_CONTENT_MODEL #ifdef LIBXML_READER_ENABLED @@ -98,101 +124,160 @@ static const xmlChar *xmlSchemaInstanceNs = (const xmlChar *) static const xmlChar *xmlNamespaceNs = (const xmlChar *) "http://www.w3.org/2000/xmlns/"; -static const xmlChar *xmlSchemaElemDesElemDecl = (const xmlChar *) - "element decl."; -static const xmlChar *xmlSchemaElemDesAttrDecl = (const xmlChar *) - "attribute decl."; -static const xmlChar *xmlSchemaElemDesAttrRef = (const xmlChar *) - "attribute use"; -static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *) - "model group"; - -#define IS_SCHEMA(node, type) \ - ((node != NULL) && (node->ns != NULL) && \ - (xmlStrEqual(node->name, (const xmlChar *) type)) && \ - (xmlStrEqual(node->ns->href, xmlSchemaNs))) +/* +* Come casting macros. +*/ +#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr) +#define PCTXT_CAST (xmlSchemaParserCtxtPtr) +#define VCTXT_CAST (xmlSchemaValidCtxtPtr) +#define WXS_BASIC_CAST (xmlSchemaBasicItemPtr) +#define WXS_TREE_CAST (xmlSchemaTreeItemPtr) +#define WXS_PTC_CAST (xmlSchemaParticlePtr) +#define WXS_TYPE_CAST (xmlSchemaTypePtr) +#define WXS_ELEM_CAST (xmlSchemaElementPtr) +#define WXS_ATTR_GROUP_CAST (xmlSchemaAttributeGroupPtr) +#define WXS_ATTR_CAST (xmlSchemaAttributePtr) +#define WXS_ATTR_USE_CAST (xmlSchemaAttributeUsePtr) +#define WXS_ATTR_PROHIB_CAST (xmlSchemaAttributeUseProhibPtr) +#define WXS_MODEL_GROUPDEF_CAST (xmlSchemaModelGroupDefPtr) +#define WXS_MODEL_GROUP_CAST (xmlSchemaModelGroupPtr) +#define WXS_IDC_CAST (xmlSchemaIDCPtr) +#define WXS_QNAME_CAST (xmlSchemaQNameRefPtr) +#define WXS_LIST_CAST (xmlSchemaItemListPtr) -#define FREE_AND_NULL(str) \ - if (str != NULL) { \ - xmlFree((xmlChar *) str); \ - str = NULL; \ - } +/* +* Macros to query common properties of components. +*/ +#define WXS_ITEM_NODE(i) xmlSchemaGetComponentNode(WXS_BASIC_CAST (i)) -#define IS_ANYTYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType == XML_SCHEMAS_ANYTYPE)) +#define WXS_ITEM_TYPE_NAME(i) xmlSchemaGetComponentTypeStr(WXS_BASIC_CAST (i)) +/* +* Macros for element declarations. +*/ +#define WXS_ELEM_TYPEDEF(e) (e)->subtypes -#define IS_COMPLEX_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_COMPLEX) || \ - (item->builtInType == XML_SCHEMAS_ANYTYPE)) +#define WXS_SUBST_HEAD(item) (item)->refDecl +/* +* Macros for attribute declarations. +*/ +#define WXS_ATTR_TYPEDEF(a) (a)->subtypes +/* +* Macros for attribute uses. +*/ +#define WXS_ATTRUSE_DECL(au) WXS_ATTR_CAST (WXS_ATTR_USE_CAST (au))->attrDecl -#define IS_SIMPLE_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType != XML_SCHEMAS_ANYTYPE))) +#define WXS_ATTRUSE_TYPEDEF(au) WXS_ATTR_TYPEDEF(WXS_ATTRUSE_DECL( WXS_ATTR_USE_CAST au)) -#define IS_ANY_SIMPLE_TYPE(item) \ - ((item->type == XML_SCHEMA_TYPE_BASIC) && \ - (item->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) +#define WXS_ATTRUSE_DECL_NAME(au) (WXS_ATTRUSE_DECL(au))->name -#define IS_NOT_TYPEFIXED(item) \ - ((item->type != XML_SCHEMA_TYPE_BASIC) && \ - ((item->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0)) +#define WXS_ATTRUSE_DECL_TNS(au) (WXS_ATTRUSE_DECL(au))->targetNamespace +/* +* Macros for attribute groups. +*/ +#define WXS_ATTR_GROUP_HAS_REFS(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) +#define WXS_ATTR_GROUP_EXPANDED(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) +/* +* Macros for particles. +*/ +#define WXS_PARTICLE(p) WXS_PTC_CAST (p) -#define TYPE_IS_NOT_FIXEDUP_1(item) \ - (((item)->type != XML_SCHEMA_TYPE_BASIC) && \ - (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0)) +#define WXS_PARTICLE_TERM(p) (WXS_PARTICLE(p))->children -#define HAS_COMPLEX_CONTENT(item) \ - ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \ - (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \ - (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS)) +#define WXS_PARTICLE_MODEL(p) WXS_MODEL_GROUP_CAST WXS_PARTICLE(p)->children +/* +* Macros for model groups definitions. +*/ +#define WXS_MODELGROUPDEF_MODEL(mgd) (WXS_MODEL_GROUP_CAST (mgd))->children +/* +* Macros for model groups. +*/ +#define WXS_IS_MODEL_GROUP(i) \ + (((i)->type == XML_SCHEMA_TYPE_SEQUENCE) || \ + ((i)->type == XML_SCHEMA_TYPE_CHOICE) || \ + ((i)->type == XML_SCHEMA_TYPE_ALL)) -#define HAS_SIMPLE_CONTENT(item) \ - ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \ - (item->contentType == XML_SCHEMA_CONTENT_BASIC)) +#define WXS_MODELGROUP_PARTICLE(mg) WXS_PTC_CAST (mg)->children +/* +* Macros for schema buckets. +*/ +#define WXS_IS_BUCKET_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \ + ((t) == XML_SCHEMA_SCHEMA_REDEFINE)) -#define HAS_MIXED_CONTENT(item) (item->contentType == XML_SCHEMA_CONTENT_MIXED) +#define WXS_IS_BUCKET_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \ + ((t) == XML_SCHEMA_SCHEMA_IMPORT)) -#define IS_PARTICLE_EMPTIABLE(item) \ - (xmlSchemaIsParticleEmptiable((xmlSchemaParticlePtr) item->subtypes)) +#define WXS_IMPBUCKET(b) ((xmlSchemaImportPtr) (b)) -#define GET_NODE(item) xmlSchemaGetComponentNode((xmlSchemaBasicItemPtr) item) +#define WXS_INCBUCKET(b) ((xmlSchemaIncludePtr) (b)) +/* +* Macros for complex/simple types. +*/ +#define WXS_IS_ANYTYPE(i) \ + (( (i)->type == XML_SCHEMA_TYPE_BASIC) && \ + ( (WXS_TYPE_CAST (i))->builtInType == XML_SCHEMAS_ANYTYPE)) -#define GET_LIST_ITEM_TYPE(item) item->subtypes +#define WXS_IS_COMPLEX(i) \ + (((i)->type == XML_SCHEMA_TYPE_COMPLEX) || \ + ((i)->builtInType == XML_SCHEMAS_ANYTYPE)) -#define VARIETY_ATOMIC(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC) -#define VARIETY_LIST(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) -#define VARIETY_UNION(item) (item->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) +#define WXS_IS_SIMPLE(item) \ + ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \ + ((item->type == XML_SCHEMA_TYPE_BASIC) && \ + (item->builtInType != XML_SCHEMAS_ANYTYPE))) -#define IS_MODEL_GROUP(item) \ - ((item->type == XML_SCHEMA_TYPE_SEQUENCE) || \ - (item->type == XML_SCHEMA_TYPE_CHOICE) || \ - (item->type == XML_SCHEMA_TYPE_ALL)) +#define WXS_IS_ANY_SIMPLE_TYPE(i) \ + (((i)->type == XML_SCHEMA_TYPE_BASIC) && \ + ((i)->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) -#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED) +#define WXS_IS_RESTRICTION(t) \ + ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION) -#define ELEM_TYPE(item) item->subtypes +#define WXS_IS_EXTENSION(t) \ + ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION) -#define GET_PARTICLE(item) (xmlSchemaParticlePtr) item->subtypes; +#define WXS_IS_TYPE_NOT_FIXED(i) \ + (((i)->type != XML_SCHEMA_TYPE_BASIC) && \ + (((i)->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0)) -#define SUBST_GROUP_AFF(item) (item)->refDecl +#define WXS_IS_TYPE_NOT_FIXED_1(item) \ + (((item)->type != XML_SCHEMA_TYPE_BASIC) && \ + (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0)) +/* +* Macros for exclusively for complex types. +*/ +#define WXS_HAS_COMPLEX_CONTENT(item) \ + ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \ + (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \ + (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS)) -#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr) +#define WXS_HAS_SIMPLE_CONTENT(item) \ + ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \ + (item->contentType == XML_SCHEMA_CONTENT_BASIC)) -#if 0 -#define WXS_GET_NEXT(item) \ - xmlSchemaGetNextComponent((xmlSchemaBasicItemPtr) item) -#endif +#define WXS_HAS_MIXED_CONTENT(item) \ + (item->contentType == XML_SCHEMA_CONTENT_MIXED) -#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0)) +#define WXS_EMPTIABLE(t) \ + (xmlSchemaIsParticleEmptiable(WXS_PTC_CAST (t)->subtypes)) -#define HFAILURE if (res == -1) goto exit_failure; +#define WXS_TYPE_CONTENTTYPE(t) (t)->subtypes -#define HERROR if (res != 0) goto exit_error; +#define WXS_TYPE_PARTICLE(t) WXS_PTC_CAST (t)->subtypes -#define HSTOP(ctx) if ((ctx)->stop) goto exit; +#define WXS_TYPE_PARTICLE_TERM(t) WXS_PARTICLE_TERM(WXS_TYPE_PARTICLE(t)) +/* +* Macros for exclusively for simple types. +*/ +#define WXS_LIST_ITEMTYPE(t) (t)->subtypes + +#define WXS_IS_ATOMIC(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC) + +#define WXS_IS_LIST(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_LIST) +#define WXS_IS_UNION(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_UNION) +/* +* Misc parser context macros. +*/ #define WXS_CONSTRUCTOR(ctx) (ctx)->constructor #define WXS_HAS_BUCKETS(ctx) \ @@ -201,47 +286,57 @@ static const xmlChar *xmlSchemaElemModelGrDef = (const xmlChar *) #define WXS_SUBST_GROUPS(ctx) WXS_CONSTRUCTOR((ctx))->substGroups -#define WXS_SCHEMA_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket +#define WXS_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket #define WXS_SCHEMA(ctx) (ctx)->schema -#define ADD_LOCAL_ITEM(ctx, item) \ - xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->locals), item) - -#define ADD_GLOBAL_ITEM(ctx, item) \ - xmlSchemaAddItem(&(WXS_SCHEMA_BUCKET(ctx)->globals), item) +#define WXS_ADD_LOCAL(ctx, item) \ + xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->locals), 10, item) -#define WXS_ADD_PENDING_ITEM(ctx, item) \ - xmlSchemaAddItem(&((ctx)->constructor->pending), item) +#define WXS_ADD_GLOBAL(ctx, item) \ + xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->globals), 5, item) -#define WXS_IS_RESTRICTION(t) \ - ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION) +#define WXS_ADD_PENDING(ctx, item) \ + xmlSchemaAddItemSize(&((ctx)->constructor->pending), 10, item) +/* +* xmlSchemaItemList macros. +*/ +#define WXS_ILIST_IS_EMPTY(l) ((l == NULL) || ((l)->nbItems == 0)) +/* +* Misc macros. +*/ +#define IS_SCHEMA(node, type) \ + ((node != NULL) && (node->ns != NULL) && \ + (xmlStrEqual(node->name, (const xmlChar *) type)) && \ + (xmlStrEqual(node->ns->href, xmlSchemaNs))) -#define WXS_IS_EXTENSION(t) \ - ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION) +#define FREE_AND_NULL(str) if ((str) != NULL) { xmlFree((xmlChar *) (str)); str = NULL; } /* -* @b: The schema bucket +* Since we put the default/fixed values into the dict, we can +* use pointer comparison for those values. +* REMOVED: (xmlStrEqual((v1), (v2))) */ -#define WXS_IS_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \ - ((t) == XML_SCHEMA_SCHEMA_REDEFINE)) +#define WXS_ARE_DEFAULT_STR_EQUAL(v1, v2) ((v1) == (v2)) -#define WXS_IS_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \ - ((t) == XML_SCHEMA_SCHEMA_IMPORT)) +#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED) + +#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0)) + +#define HFAILURE if (res == -1) goto exit_failure; -#define IMPBUCKET_CAST(b) ((xmlSchemaImportPtr) (b)) -#define INCBUCKET_CAST(b) ((xmlSchemaIncludePtr) (b)) +#define HERROR if (res != 0) goto exit_error; +#define HSTOP(ctx) if ((ctx)->stop) goto exit; +/* +* Some flags used for various schema constraints. +*/ #define SUBSET_RESTRICTION 1<<0 #define SUBSET_EXTENSION 1<<1 #define SUBSET_SUBSTITUTION 1<<2 #define SUBSET_LIST 1<<3 #define SUBSET_UNION 1<<4 -#define XML_SCHEMAS_PARSE_ERROR 1 - -#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT - typedef struct _xmlSchemaNodeInfo xmlSchemaNodeInfo; typedef xmlSchemaNodeInfo *xmlSchemaNodeInfoPtr; @@ -253,10 +348,13 @@ struct _xmlSchemaItemList { int sizeItems; /* used for dynamic addition of schemata */ }; +#define XML_SCHEMA_CTXT_PARSER 1 +#define XML_SCHEMA_CTXT_VALIDATOR 2 + typedef struct _xmlSchemaAbstractCtxt xmlSchemaAbstractCtxt; typedef xmlSchemaAbstractCtxt *xmlSchemaAbstractCtxtPtr; struct _xmlSchemaAbstractCtxt { - int type; + int type; /* E.g. XML_SCHEMA_CTXT_VALIDATOR */ }; typedef struct _xmlSchemaBucket xmlSchemaBucket; @@ -281,8 +379,12 @@ struct _xmlSchemaSchemaRelation { xmlSchemaBucketPtr bucket; }; +#define XML_SCHEMA_BUCKET_MARKED 1<<0 +#define XML_SCHEMA_BUCKET_COMPS_ADDED 1<<1 + struct _xmlSchemaBucket { int type; + int flags; const xmlChar *schemaLocation; const xmlChar *origTargetNamespace; const xmlChar *targetNamespace; @@ -308,6 +410,7 @@ typedef struct _xmlSchemaImport xmlSchemaImport; typedef xmlSchemaImport *xmlSchemaImportPtr; struct _xmlSchemaImport { int type; /* Main OR import OR include. */ + int flags; const xmlChar *schemaLocation; /* The URI of the schema document. */ /* For chameleon includes, @origTargetNamespace will be NULL */ const xmlChar *origTargetNamespace; @@ -336,6 +439,7 @@ typedef struct _xmlSchemaInclude xmlSchemaInclude; typedef xmlSchemaInclude *xmlSchemaIncludePtr; struct _xmlSchemaInclude { int type; + int flags; const xmlChar *schemaLocation; const xmlChar *origTargetNamespace; const xmlChar *targetNamespace; @@ -352,38 +456,142 @@ struct _xmlSchemaInclude { xmlSchemaImportPtr ownerImport; }; +/** + * xmlSchemaBasicItem: + * + * The abstract base type for schema components. + */ +typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem; +typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr; +struct _xmlSchemaBasicItem { + xmlSchemaTypeType type; +}; + +/** + * xmlSchemaAnnotItem: + * + * The abstract base type for annotated schema components. + * (Extends xmlSchemaBasicItem) + */ +typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem; +typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr; +struct _xmlSchemaAnnotItem { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; +}; + +/** + * xmlSchemaTreeItem: + * + * The abstract base type for tree-like structured schema components. + * (Extends xmlSchemaAnnotItem) + */ +typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem; +typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr; +struct _xmlSchemaTreeItem { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; + xmlSchemaTreeItemPtr next; + xmlSchemaTreeItemPtr children; +}; + + +#define XML_SCHEMA_ATTR_USE_FIXED 1<<0 +/** + * xmlSchemaAttributeUsePtr: + * + * The abstract base type for tree-like structured schema components. + * (Extends xmlSchemaTreeItem) + */ +typedef struct _xmlSchemaAttributeUse xmlSchemaAttributeUse; +typedef xmlSchemaAttributeUse *xmlSchemaAttributeUsePtr; +struct _xmlSchemaAttributeUse { + xmlSchemaTypeType type; + xmlSchemaAnnotPtr annot; + xmlSchemaAttributeUsePtr next; /* The next attr. use. */ + /* + * The attr. decl. OR a QName-ref. to an attr. decl. OR + * a QName-ref. to an attribute group definition. + */ + xmlSchemaAttributePtr attrDecl; + + int flags; + xmlNodePtr node; + int occurs; /* required, optional */ + const xmlChar * defValue; + xmlSchemaValPtr defVal; +}; + +/** + * xmlSchemaAttributeUseProhibPtr: + * + * A helper component to reflect attribute prohibitions. + * (Extends xmlSchemaBasicItem) + */ +typedef struct _xmlSchemaAttributeUseProhib xmlSchemaAttributeUseProhib; +typedef xmlSchemaAttributeUseProhib *xmlSchemaAttributeUseProhibPtr; +struct _xmlSchemaAttributeUseProhib { + xmlSchemaTypeType type; /* == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB */ + xmlNodePtr node; + const xmlChar *name; + const xmlChar *targetNamespace; + int isRef; +}; + +/** + * xmlSchemaRedef: + */ +typedef struct _xmlSchemaRedef xmlSchemaRedef; +typedef xmlSchemaRedef *xmlSchemaRedefPtr; +struct _xmlSchemaRedef { + xmlSchemaRedefPtr next; + xmlSchemaBasicItemPtr item; /* The redefining component. */ + xmlSchemaBasicItemPtr reference; /* The referencing component. */ + xmlSchemaBasicItemPtr target; /* The to-be-redefined component. */ + const xmlChar *refName; /* The name of the to-be-redefined component. */ + const xmlChar *refTargetNs; /* The target namespace of the + to-be-redefined comp. */ + xmlSchemaBucketPtr targetBucket; /* The redefined schema. */ +}; + +/** + * xmlSchemaConstructionCtxt: + */ typedef struct _xmlSchemaConstructionCtxt xmlSchemaConstructionCtxt; typedef xmlSchemaConstructionCtxt *xmlSchemaConstructionCtxtPtr; struct _xmlSchemaConstructionCtxt { - xmlSchemaPtr schema; /* The main schema. */ + xmlSchemaPtr mainSchema; /* The main schema. */ + xmlSchemaBucketPtr mainBucket; /* The main schema bucket */ xmlDictPtr dict; xmlSchemaItemListPtr buckets; /* List of schema buckets. */ /* xmlSchemaItemListPtr relations; */ /* List of schema relations. */ - xmlSchemaBucketPtr bucket; /* The current schema bucket */ - /* All Components of all schemas that need to be fixed. */ - xmlSchemaItemListPtr pending; + xmlSchemaBucketPtr bucket; /* The current schema bucket */ + xmlSchemaItemListPtr pending; /* All Components of all schemas that + need to be fixed. */ xmlHashTablePtr substGroups; + xmlSchemaRedefPtr redefs; + xmlSchemaRedefPtr lastRedef; }; -#define XML_SCHEMA_CTXT_PARSER 1 -#define XML_SCHEMA_CTXT_VALIDATOR 2 +#define XML_SCHEMAS_PARSE_ERROR 1 +#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT struct _xmlSchemaParserCtxt { int type; - void *userData; /* user specific data block */ + void *errCtxt; /* user specific error context */ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ - xmlSchemaValidError err; + int err; int nberrors; xmlStructuredErrorFunc serror; xmlSchemaConstructionCtxtPtr constructor; - int ownsConstructor; /* TODO: Move this to parser flags. */ + int ownsConstructor; /* TODO: Move this to parser *flags*. */ - /* xmlSchemaPtr topschema; The main schema */ - /* xmlHashTablePtr namespaces; Hash table of namespaces to schemas */ + /* xmlSchemaPtr topschema; */ + /* xmlHashTablePtr namespaces; */ - xmlSchemaPtr schema; /* The schema in use */ + xmlSchemaPtr schema; /* The main schema in use */ int counter; const xmlChar *URL; @@ -403,7 +611,6 @@ struct _xmlSchemaParserCtxt { xmlDictPtr dict; /* dictionnary for interned string names */ xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */ - xmlSchemaTypePtr parentItem; /* The current parent schema item */ int options; xmlSchemaValidCtxtPtr vctxt; int isS4S; @@ -411,63 +618,11 @@ struct _xmlSchemaParserCtxt { int xsiAssemble; int stop; /* If the parser should stop; i.e. a critical error. */ const xmlChar *targetNamespace; -}; - -#define XML_SCHEMAS_ATTR_UNKNOWN 1 -#define XML_SCHEMAS_ATTR_ASSESSED 2 -#define XML_SCHEMAS_ATTR_PROHIBITED 3 -#define XML_SCHEMAS_ATTR_ERR_MISSING 4 -#define XML_SCHEMAS_ATTR_INVALID_VALUE 5 -#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6 -#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7 -#define XML_SCHEMAS_ATTR_DEFAULT 8 -#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9 -#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10 -#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11 -#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12 -#define XML_SCHEMAS_ATTR_WILD_SKIP 13 -#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14 -#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15 -#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16 -#define XML_SCHEMAS_ATTR_META 17 - -/** - * xmlSchemaBasicItem: - * - * The abstract base type for schema components. - */ -typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem; -typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr; -struct _xmlSchemaBasicItem { - xmlSchemaTypeType type; -}; + xmlSchemaBucketPtr redefined; /* The schema to be redefined. */ -/** - * xmlSchemaAnnotItem: - * - * The abstract base type for annotated schema components. - * (Extends xmlSchemaBasicItem) - */ -typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem; -typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr; -struct _xmlSchemaAnnotItem { - xmlSchemaTypeType type; - xmlSchemaAnnotPtr annot; -}; - -/** - * xmlSchemaTreeItem: - * - * The abstract base type for tree-like structured schema components. - * (Extends xmlSchemaAnnotItem) - */ -typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem; -typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr; -struct _xmlSchemaTreeItem { - xmlSchemaTypeType type; - xmlSchemaAnnotPtr annot; - xmlSchemaTreeItemPtr next; - xmlSchemaTreeItemPtr children; + xmlSchemaRedefPtr redef; /* Used for redefinitions. */ + int redefCounter; /* Used for redefinitions. */ + xmlSchemaItemListPtr attrProhibs; }; /** @@ -480,10 +635,11 @@ typedef struct _xmlSchemaQNameRef xmlSchemaQNameRef; typedef xmlSchemaQNameRef *xmlSchemaQNameRefPtr; struct _xmlSchemaQNameRef { xmlSchemaTypeType type; - xmlSchemaBasicItemPtr item; + xmlSchemaBasicItemPtr item; /* The resolved referenced item. */ xmlSchemaTypeType itemType; const xmlChar *name; const xmlChar *targetNamespace; + xmlNodePtr node; }; /** @@ -497,8 +653,10 @@ typedef xmlSchemaParticle *xmlSchemaParticlePtr; struct _xmlSchemaParticle { xmlSchemaTypeType type; xmlSchemaAnnotPtr annot; - xmlSchemaTreeItemPtr next; /* next particle (OR "element decl" OR "wildcard") */ - xmlSchemaTreeItemPtr children; /* the "term" ("model group" OR "group definition") */ + xmlSchemaTreeItemPtr next; /* next particle */ + xmlSchemaTreeItemPtr children; /* the "term" (e.g. a model group, + a group definition, a XML_SCHEMA_EXTRA_QNAMEREF (if a reference), + etc.) */ int minOccurs; int maxOccurs; xmlNodePtr node; @@ -521,6 +679,7 @@ struct _xmlSchemaModelGroup { }; #define XML_SCHEMA_MODEL_GROUP_DEF_MARKED 1<<0 +#define XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED 1<<1 /** * xmlSchemaModelGroupDef: * @@ -538,7 +697,6 @@ struct _xmlSchemaModelGroupDef { const xmlChar *targetNamespace; xmlNodePtr node; int flags; - xmlSchemaModelGroupDefPtr redef; /* Redefinitions. */ }; typedef struct _xmlSchemaIDC xmlSchemaIDC; @@ -590,7 +748,7 @@ typedef xmlSchemaIDCAug *xmlSchemaIDCAugPtr; struct _xmlSchemaIDCAug { xmlSchemaIDCAugPtr next; /* next in a list */ xmlSchemaIDCPtr def; /* the IDC definition */ - int bubbleDepth; /* the lowest tree level to which IDC + int keyrefDepth; /* the lowest tree level to which IDC tables need to be bubbled upwards */ }; @@ -634,11 +792,10 @@ struct _xmlSchemaPSVIIDCBinding { xmlSchemaPSVIIDCNodePtr *nodeTable; /* array of key-sequences */ int nbNodes; /* number of entries in the node table */ int sizeNodes; /* size of the node table */ - int nbDupls; /* number of already identified duplicates in the node - table */ - /* int nbKeys; number of keys in each key-sequence */ + xmlSchemaItemListPtr dupls; }; + #define XPATH_STATE_OBJ_TYPE_IDC_SELECTOR 1 #define XPATH_STATE_OBJ_TYPE_IDC_FIELD 2 @@ -673,17 +830,20 @@ struct _xmlSchemaIDCStateObj { /** * xmlSchemaIDCMatcher: * - * Used to IDC selectors (and fields) successively. + * Used to evaluate IDC selectors (and fields). */ struct _xmlSchemaIDCMatcher { int type; int depth; /* the tree depth at creation time */ xmlSchemaIDCMatcherPtr next; /* next in the list */ xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */ + int idcType; xmlSchemaPSVIIDCKeyPtr **keySeqs; /* the key-sequences of the target elements */ int sizeKeySeqs; int targetDepth; + xmlSchemaItemListPtr targets; /* list of target-node + (xmlSchemaPSVIIDCNodePtr) entries */ }; /* @@ -733,9 +893,29 @@ struct _xmlSchemaNodeInfo { const xmlChar **nsBindings; /* Namespace bindings on this element */ int nbNsBindings; - int sizeNsBindings; + int sizeNsBindings; + + int hasKeyrefs; + int appliedXPath; /* Indicates that an XPath has been applied. */ }; +#define XML_SCHEMAS_ATTR_UNKNOWN 1 +#define XML_SCHEMAS_ATTR_ASSESSED 2 +#define XML_SCHEMAS_ATTR_PROHIBITED 3 +#define XML_SCHEMAS_ATTR_ERR_MISSING 4 +#define XML_SCHEMAS_ATTR_INVALID_VALUE 5 +#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6 +#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7 +#define XML_SCHEMAS_ATTR_DEFAULT 8 +#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9 +#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10 +#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11 +#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12 +#define XML_SCHEMAS_ATTR_WILD_SKIP 13 +#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14 +#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15 +#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16 +#define XML_SCHEMAS_ATTR_META 17 /* * @metaType values of xmlSchemaAttrInfo. */ @@ -759,7 +939,7 @@ struct _xmlSchemaAttrInfo { int flags; /* combination of node info flags */ xmlSchemaAttributePtr decl; /* the attribute declaration */ - xmlSchemaAttributePtr use; /* the attribute use */ + xmlSchemaAttributeUsePtr use; /* the attribute use */ int state; int metaType; const xmlChar *vcValue; /* the value constraint value */ @@ -775,7 +955,7 @@ struct _xmlSchemaAttrInfo { */ struct _xmlSchemaValidCtxt { int type; - void *userData; /* user specific data block */ + void *errCtxt; /* user specific data block */ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */ xmlStructuredErrorFunc serror; @@ -786,7 +966,7 @@ struct _xmlSchemaValidCtxt { xmlCharEncoding enc; xmlSAXHandlerPtr sax; xmlParserCtxtPtr parserCtxt; - void *user_data; + void *user_data; /* TODO: What is this for? */ int err; int nberrors; @@ -836,6 +1016,9 @@ struct _xmlSchemaValidCtxt { int skipDepth; xmlSchemaItemListPtr nodeQNames; + int hasKeyrefs; + int createIDCNodeTables; + int psviExposeIDCNodeTables; }; /** @@ -864,7 +1047,7 @@ static int xmlSchemaParseRedefine(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node); static int xmlSchemaTypeFixup(xmlSchemaTypePtr type, - xmlSchemaParserCtxtPtr ctxt); + xmlSchemaAbstractCtxtPtr ctxt); static const xmlChar * xmlSchemaFacetTypeToString(xmlSchemaTypeType type); static int @@ -882,7 +1065,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, xmlSchemaTypeType type, int withParticle); static const xmlChar * -xmlSchemaCompTypeToString(xmlSchemaTypeType type); +xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item); static xmlSchemaTypeLinkPtr xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type); static void @@ -890,7 +1073,8 @@ xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt, const char *funcName, const char *message); static int -xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int subset); static void @@ -898,6 +1082,10 @@ xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl, xmlSchemaParserCtxtPtr ctxt); static void xmlSchemaComponentListFree(xmlSchemaItemListPtr list); +static xmlSchemaQNameRefPtr +xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node); /************************************************************************ * * @@ -906,21 +1094,25 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list); ************************************************************************/ /** - * xmlSchemaCompTypeToString: + * xmlSchemaItemTypeToStr: * @type: the type of the schema item * * Returns the component name of a schema item. */ static const xmlChar * -xmlSchemaCompTypeToString(xmlSchemaTypeType type) +xmlSchemaItemTypeToStr(xmlSchemaTypeType type) { switch (type) { + case XML_SCHEMA_TYPE_BASIC: + return(BAD_CAST "simple type definition"); case XML_SCHEMA_TYPE_SIMPLE: return(BAD_CAST "simple type definition"); case XML_SCHEMA_TYPE_COMPLEX: return(BAD_CAST "complex type definition"); case XML_SCHEMA_TYPE_ELEMENT: return(BAD_CAST "element declaration"); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + return(BAD_CAST "attribute use"); case XML_SCHEMA_TYPE_ATTRIBUTE: return(BAD_CAST "attribute declaration"); case XML_SCHEMA_TYPE_GROUP: @@ -950,12 +1142,34 @@ xmlSchemaCompTypeToString(xmlSchemaTypeType type) return(BAD_CAST "wildcard (any)"); case XML_SCHEMA_EXTRA_QNAMEREF: return(BAD_CAST "[helper component] QName reference"); + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + return(BAD_CAST "[helper component] attribute use prohibition"); default: return(BAD_CAST "Not a schema component"); } } /** + * xmlSchemaGetComponentTypeStr: + * @type: the type of the schema item + * + * Returns the component name of a schema item. + */ +static const xmlChar * +xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item) +{ + switch (item->type) { + case XML_SCHEMA_TYPE_BASIC: + if (WXS_IS_COMPLEX(WXS_TYPE_CAST item)) + return(BAD_CAST "complex type definition"); + else + return(BAD_CAST "simple type definition"); + default: + return(xmlSchemaItemTypeToStr(item->type)); + } +} + +/** * xmlSchemaGetComponentNode: * @item: a schema component * @@ -993,6 +1207,14 @@ xmlSchemaGetComponentNode(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_KEY: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->node); + case XML_SCHEMA_EXTRA_QNAMEREF: + return(((xmlSchemaQNameRefPtr) item)->node); + /* TODO: What to do with NOTATIONs? + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->node); + */ + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + return (((xmlSchemaAttributeUsePtr) item)->node); default: return (NULL); } @@ -1039,37 +1261,6 @@ xmlSchemaGetNextComponent(xmlSchemaBasicItemPtr item) } #endif -/** - * xmlSchemaGetAttrName: - * @attr: the attribute declaration/use - * - * Returns the name of the attribute; if the attribute - * is a reference, the name of the referenced global type will be returned. - */ -static const xmlChar * -xmlSchemaGetAttrName(xmlSchemaAttributePtr attr) -{ - if (attr->ref != NULL) - return(attr->ref); - else - return(attr->name); -} - -/** - * xmlSchemaGetAttrTargetNsURI: - * @type: the type (element or attribute) - * - * Returns the target namespace URI of the type; if the type is a reference, - * the target namespace of the referenced type will be returned. - */ -static const xmlChar * -xmlSchemaGetAttrTargetNsURI(xmlSchemaAttributePtr attr) -{ - if (attr->ref != NULL) - return (attr->refNs); - else - return(attr->targetNamespace); -} /** * xmlSchemaFormatQName: @@ -1089,14 +1280,18 @@ xmlSchemaFormatQName(xmlChar **buf, const xmlChar *localName) { FREE_AND_NULL(*buf) - if (namespaceName == NULL) - return(localName); - - *buf = xmlStrdup(BAD_CAST "{"); - *buf = xmlStrcat(*buf, namespaceName); - *buf = xmlStrcat(*buf, BAD_CAST "}"); - *buf = xmlStrcat(*buf, localName); - + if (namespaceName != NULL) { + *buf = xmlStrdup(BAD_CAST "{"); + *buf = xmlStrcat(*buf, namespaceName); + *buf = xmlStrcat(*buf, BAD_CAST "}"); + } + if (localName != NULL) { + if (namespaceName == NULL) + return(localName); + *buf = xmlStrcat(*buf, localName); + } else { + *buf = xmlStrcat(*buf, BAD_CAST "(NULL)"); + } return ((const xmlChar *) *buf); } @@ -1129,6 +1324,16 @@ xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->name); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (WXS_ATTRUSE_DECL(item) != NULL) { + return(xmlSchemaGetComponentName( + WXS_BASIC_CAST WXS_ATTRUSE_DECL(item))); + } else + return(NULL); + case XML_SCHEMA_EXTRA_QNAMEREF: + return (((xmlSchemaQNameRefPtr) item)->name); + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->name); default: /* * Other components cannot have names. @@ -1138,6 +1343,22 @@ xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item) return (NULL); } +#define xmlSchemaGetQNameRefName(r) (WXS_QNAME_CAST (r))->name +#define xmlSchemaGetQNameRefTargetNs(r) (WXS_QNAME_CAST (r))->targetNamespace +/* +static const xmlChar * +xmlSchemaGetQNameRefName(void *ref) +{ + return(((xmlSchemaQNameRefPtr) ref)->name); +} + +static const xmlChar * +xmlSchemaGetQNameRefTargetNs(void *ref) +{ + return(((xmlSchemaQNameRefPtr) ref)->targetNamespace); +} +*/ + static const xmlChar * xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item) { @@ -1159,6 +1380,17 @@ xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item) case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: return (((xmlSchemaIDCPtr) item)->targetNamespace); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (WXS_ATTRUSE_DECL(item) != NULL) { + return(xmlSchemaGetComponentTargetNs( + WXS_BASIC_CAST WXS_ATTRUSE_DECL(item))); + } + /* TODO: Will returning NULL break something? */ + break; + case XML_SCHEMA_EXTRA_QNAMEREF: + return (((xmlSchemaQNameRefPtr) item)->targetNamespace); + case XML_SCHEMA_TYPE_NOTATION: + return (((xmlSchemaNotationPtr) item)->targetNamespace); default: /* * Other components cannot have names. @@ -1178,18 +1410,25 @@ xmlSchemaGetComponentQName(xmlChar **buf, } static const xmlChar* -xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc) +xmlSchemaGetComponentDesignation(xmlChar **buf, void *item) { xmlChar *str = NULL; - *buf = xmlStrcat(*buf, xmlSchemaCompTypeToString(idc->type)); + *buf = xmlStrcat(*buf, WXS_ITEM_TYPE_NAME(item)); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, idc)); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, + (xmlSchemaBasicItemPtr) item)); *buf = xmlStrcat(*buf, BAD_CAST "'"); FREE_AND_NULL(str); return(*buf); } +static const xmlChar* +xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc) +{ + return(xmlSchemaGetComponentDesignation(buf, idc)); +} + /** * xmlSchemaWildcardPCToString: * @pc: the type of processContents @@ -1316,7 +1555,7 @@ internal_error: static xmlChar* xmlSchemaFormatItemForReport(xmlChar **buf, const xmlChar *itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemNode) { xmlChar *str = NULL; @@ -1331,84 +1570,99 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrdup(itemDes); } else if (item != NULL) { switch (item->type) { - case XML_SCHEMA_TYPE_BASIC: - if (VARIETY_ATOMIC(item)) + case XML_SCHEMA_TYPE_BASIC: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (WXS_IS_ATOMIC(type)) *buf = xmlStrdup(BAD_CAST "atomic type 'xs:"); - else if (VARIETY_LIST(item)) + else if (WXS_IS_LIST(type)) *buf = xmlStrdup(BAD_CAST "list type 'xs:"); - else if (VARIETY_UNION(item)) + else if (WXS_IS_UNION(type)) *buf = xmlStrdup(BAD_CAST "union type 'xs:"); else *buf = xmlStrdup(BAD_CAST "simple type 'xs:"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); + } break; - case XML_SCHEMA_TYPE_SIMPLE: - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + case XML_SCHEMA_TYPE_SIMPLE: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrdup(BAD_CAST""); } else { *buf = xmlStrdup(BAD_CAST "local "); } - if (VARIETY_ATOMIC(item)) + if (WXS_IS_ATOMIC(type)) *buf = xmlStrcat(*buf, BAD_CAST "atomic type"); - else if (VARIETY_LIST(item)) + else if (WXS_IS_LIST(type)) *buf = xmlStrcat(*buf, BAD_CAST "list type"); - else if (VARIETY_UNION(item)) + else if (WXS_IS_UNION(type)) *buf = xmlStrcat(*buf, BAD_CAST "union type"); else *buf = xmlStrcat(*buf, BAD_CAST "simple type"); - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } + } break; - case XML_SCHEMA_TYPE_COMPLEX: - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) + case XML_SCHEMA_TYPE_COMPLEX: { + xmlSchemaTypePtr type = WXS_TYPE_CAST item; + + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) *buf = xmlStrdup(BAD_CAST ""); else *buf = xmlStrdup(BAD_CAST "local "); *buf = xmlStrcat(*buf, BAD_CAST "complex type"); - if (item->flags & XML_SCHEMAS_TYPE_GLOBAL) { + if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) { *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, item->name); + *buf = xmlStrcat(*buf, type->name); *buf = xmlStrcat(*buf, BAD_CAST "'"); } + } break; - case XML_SCHEMA_TYPE_ATTRIBUTE: { - xmlSchemaAttributePtr attr; + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: { + xmlSchemaAttributeUsePtr ause; - attr = (xmlSchemaAttributePtr) item; - if ((attr->flags & XML_SCHEMAS_ATTR_GLOBAL) || - (attr->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesAttrDecl); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - attr->targetNamespace, attr->name)); - FREE_AND_NULL(str) + ause = WXS_ATTR_USE_CAST item; + *buf = xmlStrdup(BAD_CAST "attribute use "); + if (WXS_ATTRUSE_DECL(ause) != NULL) { *buf = xmlStrcat(*buf, BAD_CAST "'"); - } else { - *buf = xmlStrdup(xmlSchemaElemDesAttrRef); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - attr->refNs, attr->ref)); + *buf = xmlStrcat(*buf, + xmlSchemaGetComponentQName(&str, WXS_ATTRUSE_DECL(ause))); FREE_AND_NULL(str) + *buf = xmlStrcat(*buf, BAD_CAST "'"); + } else { + *buf = xmlStrcat(*buf, BAD_CAST "(unknown)"); + } + } + break; + case XML_SCHEMA_TYPE_ATTRIBUTE: { + xmlSchemaAttributePtr attr; + + attr = (xmlSchemaAttributePtr) item; + *buf = xmlStrdup(BAD_CAST "attribute decl."); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, + attr->targetNamespace, attr->name)); + FREE_AND_NULL(str) *buf = xmlStrcat(*buf, BAD_CAST "'"); - } } break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + xmlSchemaGetComponentDesignation(buf, item); + break; case XML_SCHEMA_TYPE_ELEMENT: { xmlSchemaElementPtr elem; elem = (xmlSchemaElementPtr) item; - if ((elem->flags & XML_SCHEMAS_ELEM_GLOBAL) || - (elem->ref == NULL)) { - *buf = xmlStrdup(xmlSchemaElemDesElemDecl); - *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - elem->targetNamespace, elem->name)); - *buf = xmlStrcat(*buf, BAD_CAST "'"); - } + *buf = xmlStrdup(BAD_CAST "element decl."); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, + elem->targetNamespace, elem->name)); + *buf = xmlStrcat(*buf, BAD_CAST "'"); } break; case XML_SCHEMA_TYPE_IDC_UNIQUE: @@ -1445,15 +1699,10 @@ xmlSchemaFormatItemForReport(xmlChar **buf, *buf = xmlStrcat(*buf, xmlSchemaFacetTypeToString(item->type)); *buf = xmlStrcat(*buf, BAD_CAST "'"); break; - case XML_SCHEMA_TYPE_NOTATION: - *buf = xmlStrdup(BAD_CAST "notation"); - break; case XML_SCHEMA_TYPE_GROUP: { - *buf = xmlStrdup(xmlSchemaElemModelGrDef); + *buf = xmlStrdup(BAD_CAST "model group def."); *buf = xmlStrcat(*buf, BAD_CAST " '"); - *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str, - ((xmlSchemaModelGroupDefPtr) item)->targetNamespace, - ((xmlSchemaModelGroupDefPtr) item)->name)); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item)); *buf = xmlStrcat(*buf, BAD_CAST "'"); FREE_AND_NULL(str) } @@ -1462,8 +1711,15 @@ xmlSchemaFormatItemForReport(xmlChar **buf, case XML_SCHEMA_TYPE_CHOICE: case XML_SCHEMA_TYPE_ALL: case XML_SCHEMA_TYPE_PARTICLE: - *buf = xmlStrdup(xmlSchemaCompTypeToString(item->type)); - break; + *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item)); + break; + case XML_SCHEMA_TYPE_NOTATION: { + *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item)); + *buf = xmlStrcat(*buf, BAD_CAST " '"); + *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item)); + *buf = xmlStrcat(*buf, BAD_CAST "'"); + FREE_AND_NULL(str); + } default: named = 0; } @@ -1575,6 +1831,13 @@ xmlSchemaErrMemory(const char *msg) } #endif +static void +xmlSchemaPSimpleErr(const char *msg) +{ + __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL, + msg); +} + /** * xmlSchemaPErrMemory: * @node: a context node @@ -1613,8 +1876,9 @@ xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, if (ctxt != NULL) { ctxt->nberrors++; + ctxt->err = error; channel = ctxt->error; - data = ctxt->userData; + data = ctxt->errCtxt; schannel = ctxt->serror; } __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, @@ -1678,8 +1942,9 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error, if (ctxt != NULL) { ctxt->nberrors++; + ctxt->err = error; channel = ctxt->error; - data = ctxt->userData; + data = ctxt->errCtxt; schannel = ctxt->serror; } __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, @@ -1737,11 +2002,11 @@ xmlSchemaPSimpleInternalErr(xmlNodePtr node, * Handle a validation error */ static void -xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, +xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt, xmlErrorLevel errorLevel, int error, xmlNodePtr node, int line, const char *msg, const xmlChar *str1, const xmlChar *str2, - const xmlChar *str3) + const xmlChar *str3, const xmlChar *str4) { xmlStructuredErrorFunc schannel = NULL; xmlGenericErrorFunc channel = NULL; @@ -1759,7 +2024,7 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, channel = vctxt->warning; } schannel = vctxt->serror; - data = vctxt->userData; + data = vctxt->errCtxt; /* * Error node. If we specify a line number, then @@ -1799,7 +2064,7 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, node, XML_FROM_SCHEMASV, error, errorLevel, file, line, (const char *) str1, (const char *) str2, - (const char *) str3, 0, 0, msg, str1, str2, str3); + (const char *) str3, 0, 0, msg, str1, str2, str3, str4); } else if (ctxt->type == XML_SCHEMA_CTXT_PARSER) { xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt; @@ -1811,12 +2076,12 @@ xmlSchemaErr3Line(xmlSchemaAbstractCtxtPtr ctxt, channel = pctxt->warning; } schannel = pctxt->serror; - data = pctxt->userData; + data = pctxt->errCtxt; __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP, error, errorLevel, NULL, 0, (const char *) str1, (const char *) str2, - (const char *) str3, 0, 0, msg, str1, str2, str3); + (const char *) str3, 0, 0, msg, str1, str2, str3, str4); } else { TODO } @@ -1840,8 +2105,18 @@ xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt, int error, xmlNodePtr node, const char *msg, const xmlChar *str1, const xmlChar *str2, const xmlChar *str3) { - xmlSchemaErr3Line(actxt, XML_ERR_ERROR, error, node, 0, - msg, str1, str2, str3); + xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0, + msg, str1, str2, str3, NULL); +} + +static void +xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt, + int error, xmlNodePtr node, const char *msg, + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3, const xmlChar *str4) +{ + xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0, + msg, str1, str2, str3, str4); } static void @@ -1849,7 +2124,7 @@ xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt, int error, xmlNodePtr node, const char *msg, const xmlChar *str1, const xmlChar *str2) { - xmlSchemaErr3(actxt, error, node, msg, str1, str2, NULL); + xmlSchemaErr4(actxt, error, node, msg, str1, str2, NULL, NULL); } static xmlChar * @@ -1859,6 +2134,19 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, { xmlChar *str = NULL; + *msg = NULL; + if ((node != NULL) && + (node->type != XML_ELEMENT_NODE) && + (node->type != XML_ATTRIBUTE_NODE)) + { + /* + * Don't try to format other nodes than element and + * attribute nodes. + * Play save and return an empty string. + */ + *msg = xmlStrdup(BAD_CAST ""); + return(*msg); + } if (node != NULL) { /* * Work on tree nodes. @@ -1923,7 +2211,7 @@ xmlSchemaFormatNodeForError(xmlChar ** msg, * VAL TODO: The output of the given schema component is currently * disabled. */ -#if 0 +#if 0 if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) { *msg = xmlStrcat(*msg, BAD_CAST " ["); *msg = xmlStrcat(*msg, xmlSchemaFormatItemForReport(&str, @@ -1983,25 +2271,46 @@ xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt, #endif static void -xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, +xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt, xmlParserErrors error, xmlNodePtr node, - xmlSchemaTypePtr type ATTRIBUTE_UNUSED, + xmlSchemaBasicItemPtr item, const char *message, - const xmlChar *str1, - const xmlChar *str2) + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3, const xmlChar *str4) { xmlChar *msg = NULL; - xmlSchemaFormatNodeForError(&msg, actxt, node); + if ((node == NULL) && (item != NULL) && + (actxt->type == XML_SCHEMA_CTXT_PARSER)) { + node = WXS_ITEM_NODE(item); + xmlSchemaFormatItemForReport(&msg, NULL, item, NULL); + msg = xmlStrcat(msg, BAD_CAST ": "); + } else + xmlSchemaFormatNodeForError(&msg, actxt, node); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaErr(actxt, error, node, - (const char *) msg, str1, str2); + xmlSchemaErr4(actxt, error, node, + (const char *) msg, str1, str2, str3, str4); FREE_AND_NULL(msg) } static void +xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt, + xmlParserErrors error, + xmlNodePtr node, + xmlSchemaBasicItemPtr item, + const char *message, + const xmlChar *str1, + const xmlChar *str2) +{ + xmlSchemaCustomErr4(actxt, error, node, item, + message, str1, str2, NULL, NULL); +} + + + +static void xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, xmlParserErrors error, xmlNodePtr node, @@ -2018,8 +2327,8 @@ xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt, msg = xmlStrcat(msg, BAD_CAST ".\n"); /* URGENT TODO: Set the error code to something sane. */ - xmlSchemaErr3Line(actxt, XML_ERR_WARNING, error, node, 0, - (const char *) msg, str1, str2, str3); + xmlSchemaErr4Line(actxt, XML_ERR_WARNING, error, node, 0, + (const char *) msg, str1, str2, str3, NULL); FREE_AND_NULL(msg) } @@ -2040,12 +2349,12 @@ xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt, msg = xmlStrdup(BAD_CAST "Element '%s': "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaErr3Line(ACTXT_CAST vctxt, XML_ERR_ERROR, + xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR, error, NULL, idcNode->nodeLine, (const char *) msg, xmlSchemaFormatQName(&qname, vctxt->nodeQNames->items[idcNode->nodeQNameID +1], vctxt->nodeQNames->items[idcNode->nodeQNameID]), - str1, str2); + str1, str2, NULL); FREE_AND_NULL(qname); FREE_AND_NULL(msg); } @@ -2114,11 +2423,11 @@ xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt, else msg = xmlStrcat(msg, BAD_CAST "the "); - if (VARIETY_ATOMIC(type)) + if (WXS_IS_ATOMIC(type)) msg = xmlStrcat(msg, BAD_CAST "atomic type"); - else if (VARIETY_LIST(type)) + else if (WXS_IS_LIST(type)) msg = xmlStrcat(msg, BAD_CAST "list type"); - else if (VARIETY_UNION(type)) + else if (WXS_IS_UNION(type)) msg = xmlStrcat(msg, BAD_CAST "union type"); if (xmlSchemaIsGlobalItem(type)) { @@ -2188,7 +2497,7 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, xmlChar *str = NULL, *msg = NULL; xmlChar *localName, *nsName; const xmlChar *cur, *end; - int i, is_not; + int i; xmlSchemaFormatNodeForError(&msg, actxt, node); msg = xmlStrcat(msg, (const xmlChar *) message); @@ -2211,11 +2520,8 @@ xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt, continue; if ((cur[0] == 'n') && (cur[1] == 'o') && (cur[2] == 't') && (cur[3] == ' ')) { - is_not = 1; cur += 4; str = xmlStrcat(str, BAD_CAST "##other"); - } else { - is_not = 0; } /* * Get the local name. @@ -2366,12 +2672,12 @@ xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt, xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); } else if (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE) { - msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than " + msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be greater than " "'%s'.\n"); xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); } else if (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) { - msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be more than " + msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than " "'%s'.\n"); xmlSchemaErr(actxt, error, node, (const char *) msg, value, facet->value); @@ -2427,7 +2733,7 @@ xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt, static void xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const char *message) @@ -2464,7 +2770,7 @@ xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const xmlChar *refName, @@ -2476,7 +2782,7 @@ xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); if (refTypeStr == NULL) - refTypeStr = (const char *) xmlSchemaCompTypeToString(refType); + refTypeStr = (const char *) xmlSchemaItemTypeToStr(refType); xmlSchemaPErrExt(ctxt, ownerElem, error, NULL, NULL, NULL, "%s, attribute '%s': The QName value '%s' does not resolve to a(n) " @@ -2501,7 +2807,7 @@ static void xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const char *msg) { @@ -2534,49 +2840,18 @@ xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerComp ATTRIBUTE_UNUSED, xmlAttrPtr attr) { - xmlChar *des = NULL, *strA = NULL; + xmlChar *strA = NULL, *strB = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent); - des = *ownerDes; - } else - des = *ownerDes; - xmlSchemaPErr(ctxt, (xmlNodePtr) attr, error, - "%s: The attribute '%s' is not allowed.\n", BAD_CAST des, - xmlSchemaFormatQNameNs(&strA, attr->ns, attr->name)); - if (ownerDes == NULL) - FREE_AND_NULL(des); + xmlSchemaFormatNodeForError(&strA, ACTXT_CAST ctxt, attr->parent); + xmlSchemaErr4(ACTXT_CAST ctxt, error, (xmlNodePtr) attr, + "%sThe attribute '%s' is not allowed.\n", BAD_CAST strA, + xmlSchemaFormatQNameNs(&strB, attr->ns, attr->name), + NULL, NULL); FREE_AND_NULL(strA); -} - -/** - * xmlSchemaPAquireDes: - * @des: the first designation - * @itemDes: the second designation - * @item: the schema item - * @itemElem: the node of the schema item - * - * Creates a designation for an item. - */ -static void -xmlSchemaPAquireDes(xmlChar **des, - xmlChar **itemDes, - xmlSchemaTypePtr item, - xmlNodePtr itemElem) -{ - if (itemDes == NULL) - xmlSchemaFormatItemForReport(des, NULL, item, itemElem); - else if (*itemDes == NULL) { - xmlSchemaFormatItemForReport(itemDes, NULL, item, itemElem); - *des = *itemDes; - } else - *des = *itemDes; + FREE_AND_NULL(strB); } /** @@ -2596,8 +2871,7 @@ xmlSchemaPAquireDes(xmlChar **des, static void xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemElem, const char *message, const xmlChar *str1, @@ -2606,16 +2880,15 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, { xmlChar *des = NULL, *msg = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, itemElem); + xmlSchemaFormatItemForReport(&des, NULL, item, itemElem); msg = xmlStrdup(BAD_CAST "%s: "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); if ((itemElem == NULL) && (item != NULL)) - itemElem = item->node; + itemElem = WXS_ITEM_NODE(item); xmlSchemaPErrExt(ctxt, itemElem, error, NULL, NULL, NULL, (const char *) msg, BAD_CAST des, str1, str2, str3, NULL); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(msg); } @@ -2634,13 +2907,12 @@ xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaBasicItemPtr item, xmlNodePtr itemElem, const char *message, const xmlChar *str1) { - xmlSchemaPCustomErrExt(ctxt, error, itemDes, item, itemElem, message, + xmlSchemaPCustomErrExt(ctxt, error, item, itemElem, message, str1, NULL, NULL); } @@ -2658,25 +2930,28 @@ xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt, * Reports an attribute use error during parsing. */ static void -xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, +xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr item, - const xmlSchemaAttributePtr attr, + xmlNodePtr node, + xmlSchemaBasicItemPtr ownerItem, + const xmlSchemaAttributeUsePtr attruse, const char *message, - const xmlChar *str1) + const xmlChar *str1, const xmlChar *str2, + const xmlChar *str3,const xmlChar *str4) { xmlChar *str = NULL, *msg = NULL; - xmlSchemaFormatItemForReport(&msg, NULL, item, NULL); - msg = xmlStrcat(msg, BAD_CAST ", "); + + xmlSchemaFormatItemForReport(&msg, NULL, ownerItem, NULL); + msg = xmlStrcat(msg, BAD_CAST ", "); msg = xmlStrcat(msg, BAD_CAST xmlSchemaFormatItemForReport(&str, NULL, - (xmlSchemaTypePtr) attr, NULL)); + WXS_BASIC_CAST attruse, NULL)); FREE_AND_NULL(str); msg = xmlStrcat(msg, BAD_CAST ": "); msg = xmlStrcat(msg, (const xmlChar *) message); msg = xmlStrcat(msg, BAD_CAST ".\n"); - xmlSchemaPErr(ctxt, attr->node, error, - (const char *) msg, str1, NULL); + xmlSchemaErr4(ACTXT_CAST ctxt, error, node, + (const char *) msg, str1, str2, str3, str4); xmlFree(msg); } @@ -2684,9 +2959,8 @@ xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, * xmlSchemaPIllegalFacetAtomicErr: * @ctxt: the schema parser context * @error: the error code - * @itemDes: the designation of the type - * @item: the schema type - * @baseItem: the base type of type + * @type: the schema type + * @baseType: the base type of type * @facet: the illegal facet * * Reports an illegal facet for atomic simple types. @@ -2694,22 +2968,20 @@ xmlSchemaPAttrUseErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, - xmlSchemaTypePtr baseItem, + xmlSchemaTypePtr type, + xmlSchemaTypePtr baseType, xmlSchemaFacetPtr facet) { xmlChar *des = NULL, *strT = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, item->node); - xmlSchemaPErrExt(ctxt, item->node, error, NULL, NULL, NULL, + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, type->node); + xmlSchemaPErrExt(ctxt, type->node, error, NULL, NULL, NULL, "%s: The facet '%s' is not allowed on types derived from the " "type %s.\n", BAD_CAST des, xmlSchemaFacetTypeToString(facet->type), - xmlSchemaFormatItemForReport(&strT, NULL, baseItem, NULL), + xmlSchemaFormatItemForReport(&strT, NULL, WXS_BASIC_CAST baseType, NULL), NULL, NULL); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(strT); } @@ -2726,18 +2998,17 @@ xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **itemDes, - xmlSchemaTypePtr item, + xmlSchemaTypePtr type, xmlSchemaFacetPtr facet) { xmlChar *des = NULL, *strT = NULL; - xmlSchemaPAquireDes(&des, itemDes, item, item->node); - xmlSchemaPErr(ctxt, item->node, error, + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, + type->node); + xmlSchemaPErr(ctxt, type->node, error, "%s: The facet '%s' is not allowed.\n", BAD_CAST des, xmlSchemaFacetTypeToString(facet->type)); - if (itemDes == NULL) - FREE_AND_NULL(des); + FREE_AND_NULL(des); FREE_AND_NULL(strT); } @@ -2754,26 +3025,18 @@ xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const char *name1, const char *name2) { xmlChar *des = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent); - des = *ownerDes; - } else - des = *ownerDes; + xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST ownerItem, attr->parent); xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL, "%s: The attributes '%s' and '%s' are mutually exclusive.\n", BAD_CAST des, BAD_CAST name1, BAD_CAST name2, NULL, NULL); - if (ownerDes == NULL) - FREE_AND_NULL(des) + FREE_AND_NULL(des); } /** @@ -2792,7 +3055,7 @@ xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlSchemaTypePtr ownerItem ATTRIBUTE_UNUSED, + xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED, xmlNodePtr node, xmlSchemaTypePtr type, const char *expected, @@ -2819,11 +3082,11 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, else msg = xmlStrcat(msg, BAD_CAST "the "); - if (VARIETY_ATOMIC(type)) + if (WXS_IS_ATOMIC(type)) msg = xmlStrcat(msg, BAD_CAST "atomic type"); - else if (VARIETY_LIST(type)) + else if (WXS_IS_LIST(type)) msg = xmlStrcat(msg, BAD_CAST "list type"); - else if (VARIETY_UNION(type)) + else if (WXS_IS_UNION(type)) msg = xmlStrcat(msg, BAD_CAST "union type"); if (xmlSchemaIsGlobalItem(type)) { @@ -2882,8 +3145,7 @@ xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt, static void xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, xmlNodePtr child, const char *message, @@ -2891,13 +3153,7 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, { xmlChar *des = NULL; - if (ownerDes == NULL) - xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); - else if (*ownerDes == NULL) { - xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, ownerElem); - des = *ownerDes; - } else - des = *ownerDes; + xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem); if (message != NULL) xmlSchemaPErr2(ctxt, ownerElem, child, error, "%s: %s.\n", @@ -2913,8 +3169,7 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt, BAD_CAST des, NULL); } } - if (ownerDes == NULL) - FREE_AND_NULL(des) + FREE_AND_NULL(des) } /************************************************************************ @@ -3056,11 +3311,144 @@ xmlSchemaItemListAdd(xmlSchemaItemListPtr list, void *item) return(-1); } } - /* ((xmlSchemaBasicItemPtr *) list->items)[list->nbItems++] = (void *) item; */ list->items[list->nbItems++] = item; return(0); } +static int +xmlSchemaItemListAddSize(xmlSchemaItemListPtr list, + int initialSize, + void *item) +{ + if (list->items == NULL) { + if (initialSize <= 0) + initialSize = 1; + list->items = (void **) xmlMalloc( + initialSize * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = initialSize; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } + } + list->items[list->nbItems++] = item; + return(0); +} + +static int +xmlSchemaItemListInsert(xmlSchemaItemListPtr list, void *item, int idx) +{ + if (list->items == NULL) { + list->items = (void **) xmlMalloc( + 20 * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = 20; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } + } + /* + * Just append if the index is greater/equal than the item count. + */ + if (idx >= list->nbItems) { + list->items[list->nbItems++] = item; + } else { + int i; + for (i = list->nbItems; i > idx; i--) + list->items[i] = list->items[i-1]; + list->items[idx] = item; + list->nbItems++; + } + return(0); +} + +#if 0 /* enable if ever needed */ +static int +xmlSchemaItemListInsertSize(xmlSchemaItemListPtr list, + int initialSize, + void *item, + int idx) +{ + if (list->items == NULL) { + if (initialSize <= 0) + initialSize = 1; + list->items = (void **) xmlMalloc( + initialSize * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "allocating new item list", NULL); + return(-1); + } + list->sizeItems = initialSize; + } else if (list->sizeItems <= list->nbItems) { + list->sizeItems *= 2; + list->items = (void **) xmlRealloc(list->items, + list->sizeItems * sizeof(void *)); + if (list->items == NULL) { + xmlSchemaPErrMemory(NULL, "growing item list", NULL); + list->sizeItems = 0; + return(-1); + } + } + /* + * Just append if the index is greater/equal than the item count. + */ + if (idx >= list->nbItems) { + list->items[list->nbItems++] = item; + } else { + int i; + for (i = list->nbItems; i > idx; i--) + list->items[i] = list->items[i-1]; + list->items[idx] = item; + list->nbItems++; + } + return(0); +} +#endif + +static int +xmlSchemaItemListRemove(xmlSchemaItemListPtr list, int idx) +{ + int i; + if ((list->items == NULL) || (idx >= list->nbItems)) { + xmlSchemaPSimpleErr("Internal error: xmlSchemaItemListRemove, " + "index error.\n"); + return(-1); + } + + if (list->nbItems == 1) { + /* TODO: Really free the list? */ + xmlFree(list->items); + list->items = NULL; + list->nbItems = 0; + list->sizeItems = 0; + } else if (list->nbItems -1 == idx) { + list->nbItems--; + } else { + for (i = idx; i < list->nbItems -1; i++) + list->items[i] = list->items[i+1]; + list->nbItems--; + } + return(0); +} + /** * xmlSchemaItemListFree: * @annot: a schema type structure @@ -3102,30 +3490,28 @@ xmlSchemaBucketFree(xmlSchemaBucketPtr bucket) xmlFreeDoc(bucket->doc); } if (bucket->type == XML_SCHEMA_SCHEMA_IMPORT) { - if (IMPBUCKET_CAST(bucket)->schema != NULL) - xmlSchemaFree(IMPBUCKET_CAST(bucket)->schema); + if (WXS_IMPBUCKET(bucket)->schema != NULL) + xmlSchemaFree(WXS_IMPBUCKET(bucket)->schema); } xmlFree(bucket); } static xmlSchemaBucketPtr xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, - int type, - const xmlChar *targetNamespace) + int type, const xmlChar *targetNamespace) { xmlSchemaBucketPtr ret; - xmlSchemaConstructionCtxtPtr constr = pctxt->constructor; int size; xmlSchemaPtr mainSchema; - if (constr->schema == NULL) { + if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) { PERROR_INT("xmlSchemaBucketCreate", "no main schema on constructor"); return(NULL); } - mainSchema = constr->schema; + mainSchema = WXS_CONSTRUCTOR(pctxt)->mainSchema; /* Create the schema bucket. */ - if (WXS_IS_INCREDEF(type)) + if (WXS_IS_BUCKET_INCREDEF(type)) size = sizeof(xmlSchemaInclude); else size = sizeof(xmlSchemaImport); @@ -3137,13 +3523,23 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, memset(ret, 0, size); ret->targetNamespace = targetNamespace; ret->type = type; + ret->globals = xmlSchemaItemListCreate(); + if (ret->globals == NULL) { + xmlFree(ret); + return(NULL); + } + ret->locals = xmlSchemaItemListCreate(); + if (ret->locals == NULL) { + xmlFree(ret); + return(NULL); + } /* * The following will assure that only the first bucket is marked as * XML_SCHEMA_SCHEMA_MAIN and it points to the *main* schema. * For each following import buckets an xmlSchema will be created. */ if (! WXS_HAS_BUCKETS(pctxt)) { - if (WXS_IS_INCREDEF(type)) { + if (WXS_IS_BUCKET_INCREDEF(type)) { PERROR_INT("xmlSchemaBucketCreate", "first bucket but it's an include or redefine"); xmlSchemaBucketFree(ret); @@ -3152,7 +3548,8 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, /* Force the type to be XML_SCHEMA_SCHEMA_MAIN. */ ret->type = XML_SCHEMA_SCHEMA_MAIN; /* Point to the *main* schema. */ - IMPBUCKET_CAST(ret)->schema = mainSchema; + WXS_CONSTRUCTOR(pctxt)->mainBucket = ret; + WXS_IMPBUCKET(ret)->schema = mainSchema; } else { if (type == XML_SCHEMA_SCHEMA_MAIN) { PERROR_INT("xmlSchemaBucketCreate", @@ -3163,18 +3560,19 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, /* * Create a schema for imports. */ - IMPBUCKET_CAST(ret)->schema = xmlSchemaNewSchema(pctxt); - if (IMPBUCKET_CAST(ret)->schema == NULL) { + WXS_IMPBUCKET(ret)->schema = xmlSchemaNewSchema(pctxt); + if (WXS_IMPBUCKET(ret)->schema == NULL) { xmlSchemaBucketFree(ret); return(NULL); } } } - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { int res; - /* Imports got into the "schemasImports" slot of the main *schema*. */ + /* Imports go into the "schemasImports" slot of the main *schema*. */ if (mainSchema->schemasImports == NULL) { - mainSchema->schemasImports = xmlHashCreateDict(5, constr->dict); + mainSchema->schemasImports = xmlHashCreateDict(5, + WXS_CONSTRUCTOR(pctxt)->dict); if (mainSchema->schemasImports == NULL) { xmlSchemaBucketFree(ret); return(NULL); @@ -3194,12 +3592,12 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, } } else { /* Set the @ownerImport of an include bucket. */ - if (WXS_IS_IMPMAIN(constr->bucket->type)) - INCBUCKET_CAST(ret)->ownerImport = - IMPBUCKET_CAST(constr->bucket); + if (WXS_IS_BUCKET_IMPMAIN(WXS_CONSTRUCTOR(pctxt)->bucket->type)) + WXS_INCBUCKET(ret)->ownerImport = + WXS_IMPBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket); else - INCBUCKET_CAST(ret)->ownerImport = - INCBUCKET_CAST(constr->bucket)->ownerImport; + WXS_INCBUCKET(ret)->ownerImport = + WXS_INCBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket)->ownerImport; /* Includes got into the "includes" slot of the *main* schema. */ if (mainSchema->includes == NULL) { @@ -3215,20 +3613,20 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt, * Add to list of all buckets; this is used for lookup * during schema construction time only. */ - if (xmlSchemaItemListAdd(constr->buckets, ret) == -1) + if (xmlSchemaItemListAdd(WXS_CONSTRUCTOR(pctxt)->buckets, ret) == -1) return(NULL); return(ret); } static int -xmlSchemaAddItem(xmlSchemaItemListPtr *list, void *item) +xmlSchemaAddItemSize(xmlSchemaItemListPtr *list, int initialSize, void *item) { if (*list == NULL) { *list = xmlSchemaItemListCreate(); if (*list == NULL) return(-1); } - xmlSchemaItemListAdd(*list, item); + xmlSchemaItemListAddSize(*list, initialSize, item); return(0); } @@ -3272,9 +3670,9 @@ xmlSchemaFreeNotation(xmlSchemaNotationPtr nota) /** * xmlSchemaFreeAttribute: - * @schema: a schema attribute structure + * @attr: an attribute declaration * - * Deallocate a Schema Attribute structure. + * Deallocates an attribute declaration structure. */ static void xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr) @@ -3289,6 +3687,38 @@ xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr) } /** + * xmlSchemaFreeAttributeUse: + * @use: an attribute use + * + * Deallocates an attribute use structure. + */ +static void +xmlSchemaFreeAttributeUse(xmlSchemaAttributeUsePtr use) +{ + if (use == NULL) + return; + if (use->annot != NULL) + xmlSchemaFreeAnnot(use->annot); + if (use->defVal != NULL) + xmlSchemaFreeValue(use->defVal); + xmlFree(use); +} + +/** + * xmlSchemaFreeAttributeUseProhib: + * @prohib: an attribute use prohibition + * + * Deallocates an attribute use structure. + */ +static void +xmlSchemaFreeAttributeUseProhib(xmlSchemaAttributeUseProhibPtr prohib) +{ + if (prohib == NULL) + return; + xmlFree(prohib); +} + +/** * xmlSchemaFreeWildcardNsSet: * set: a schema wildcard namespace * @@ -3333,31 +3763,15 @@ xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard) * Deallocate a Schema Attribute Group structure. */ static void -xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attr) +xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attrGr) { - if (attr == NULL) + if (attrGr == NULL) return; - if (attr->annot != NULL) - xmlSchemaFreeAnnot(attr->annot); - xmlFree(attr); -} - -/** - * xmlSchemaFreeAttributeUseList: - * @attrUse: an attribute link - * - * Deallocate a list of schema attribute uses. - */ -static void -xmlSchemaFreeAttributeUseList(xmlSchemaAttributeLinkPtr attrUse) -{ - xmlSchemaAttributeLinkPtr next; - - while (attrUse != NULL) { - next = attrUse->next; - xmlFree(attrUse); - attrUse = next; - } + if (attrGr->annot != NULL) + xmlSchemaFreeAnnot(attrGr->annot); + if (attrGr->attrUses != NULL) + xmlSchemaItemListFree(WXS_LIST_CAST attrGr->attrUses); + xmlFree(attrGr); } /** @@ -3503,13 +3917,8 @@ xmlSchemaFreeType(xmlSchemaTypePtr type) facet = next; } } - if (type->type != XML_SCHEMA_TYPE_BASIC) { - /* - * TODO: Why is this restricted to non built-in types? - */ - if (type->attributeUses != NULL) - xmlSchemaFreeAttributeUseList(type->attributeUses); - } + if (type->attrUses != NULL) + xmlSchemaItemListFree((xmlSchemaItemListPtr) type->attrUses); if (type->memberTypes != NULL) xmlSchemaFreeTypeLinkList(type->memberTypes); if (type->facetSet != NULL) { @@ -3555,24 +3964,6 @@ xmlSchemaFreeModelGroup(xmlSchemaModelGroupPtr item) xmlFree(item); } -/** - * xmlSchemaFreeTypeList: - * @type: a schema type structure - * - * Deallocate a Schema Type structure. - */ -static void -xmlSchemaFreeTypeList(xmlSchemaTypePtr type) -{ - xmlSchemaTypePtr next; - - while (type != NULL) { - next = type->redef; - xmlSchemaFreeType(type); - type = next; - } -} - static void xmlSchemaComponentListFree(xmlSchemaItemListPtr list) { @@ -3590,11 +3981,18 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list) switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: case XML_SCHEMA_TYPE_COMPLEX: - xmlSchemaFreeTypeList((xmlSchemaTypePtr) item); + xmlSchemaFreeType((xmlSchemaTypePtr) item); break; case XML_SCHEMA_TYPE_ATTRIBUTE: xmlSchemaFreeAttribute((xmlSchemaAttributePtr) item); - break; + break; + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + xmlSchemaFreeAttributeUse((xmlSchemaAttributeUsePtr) item); + break; + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + xmlSchemaFreeAttributeUseProhib( + (xmlSchemaAttributeUseProhibPtr) item); + break; case XML_SCHEMA_TYPE_ELEMENT: xmlSchemaFreeElement((xmlSchemaElementPtr) item); break; @@ -3636,8 +4034,7 @@ xmlSchemaComponentListFree(xmlSchemaItemListPtr list) xmlSchemaPSimpleInternalErr(NULL, "Internal error: xmlSchemaComponentListFree, " "unexpected component type '%s'\n", - (const xmlChar *) - xmlSchemaCompTypeToString(item->type)); + (const xmlChar *) WXS_ITEM_TYPE_NAME(item)); } break; } @@ -3707,6 +4104,9 @@ xmlSchemaFree(xmlSchemaPtr schema) #ifdef LIBXML_OUTPUT_ENABLED +static void +xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output); /* forward */ + /** * xmlSchemaElementDump: * @elem: an element @@ -3723,20 +4123,15 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, if (elem == NULL) return; - if (elem->flags & XML_SCHEMAS_ELEM_REF) { - fprintf(output, "Particle: %s", name); - fprintf(output, ", term element: %s", elem->ref); - if (elem->refNs != NULL) - fprintf(output, " ns %s", elem->refNs); - } else { - fprintf(output, "Element"); - if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) - fprintf(output, " (global)"); - fprintf(output, ": %s ", elem->name); - if (namespace != NULL) - fprintf(output, "ns %s", namespace); - } + + fprintf(output, "Element"); + if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL) + fprintf(output, " (global)"); + fprintf(output, ": '%s' ", elem->name); + if (namespace != NULL) + fprintf(output, "ns '%s'", namespace); fprintf(output, "\n"); +#if 0 if ((elem->minOccurs != 1) || (elem->maxOccurs != 1)) { fprintf(output, " min %d ", elem->minOccurs); if (elem->maxOccurs >= UNBOUNDED) @@ -3746,14 +4141,14 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, else fprintf(output, "\n"); } +#endif /* * Misc other properties. */ if ((elem->flags & XML_SCHEMAS_ELEM_NILLABLE) || (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) || (elem->flags & XML_SCHEMAS_ELEM_FIXED) || - (elem->flags & XML_SCHEMAS_ELEM_DEFAULT) || - (elem->id != NULL)) { + (elem->flags & XML_SCHEMAS_ELEM_DEFAULT)) { fprintf(output, " props: "); if (elem->flags & XML_SCHEMAS_ELEM_FIXED) fprintf(output, "[fixed] "); @@ -3763,8 +4158,6 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, fprintf(output, "[abstract] "); if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE) fprintf(output, "[nillable] "); - if (elem->id != NULL) - fprintf(output, "[id: '%s'] ", elem->id); fprintf(output, "\n"); } /* @@ -3776,19 +4169,24 @@ xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output, * Type. */ if (elem->namedType != NULL) { - fprintf(output, " type: %s ", elem->namedType); + fprintf(output, " type: '%s' ", elem->namedType); if (elem->namedTypeNs != NULL) - fprintf(output, "ns %s\n", elem->namedTypeNs); + fprintf(output, "ns '%s'\n", elem->namedTypeNs); else fprintf(output, "\n"); + } else if (elem->subtypes != NULL) { + /* + * Dump local types. + */ + xmlSchemaTypeDump(elem->subtypes, output); } /* * Substitution group. */ if (elem->substGroup != NULL) { - fprintf(output, " substitutionGroup: %s ", elem->substGroup); + fprintf(output, " substitutionGroup: '%s' ", elem->substGroup); if (elem->substGroupNs != NULL) - fprintf(output, "ns %s\n", elem->substGroupNs); + fprintf(output, "ns '%s'\n", elem->substGroupNs); else fprintf(output, "\n"); } @@ -3818,9 +4216,10 @@ xmlSchemaAnnotDump(FILE * output, xmlSchemaAnnotPtr annot) } /** - * xmlSchemaTypeDump: - * @output: the file output - * @type: a type structure + * xmlSchemaContentModelDump: + * @particle: the schema particle + * @output: the file output + * @depth: the depth used for intentation * * Dump a SchemaType structure */ @@ -3843,27 +4242,32 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept return; } term = particle->children; - switch (term->type) { - case XML_SCHEMA_TYPE_ELEMENT: - fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str, - ((xmlSchemaElementPtr)term)->targetNamespace, - ((xmlSchemaElementPtr)term)->name)); - break; - case XML_SCHEMA_TYPE_SEQUENCE: - fprintf(output, "SEQUENCE"); - break; - case XML_SCHEMA_TYPE_CHOICE: - fprintf(output, "CHOICE"); - break; - case XML_SCHEMA_TYPE_ALL: - fprintf(output, "ALL"); - break; - case XML_SCHEMA_TYPE_ANY: - fprintf(output, "ANY"); - break; - default: - fprintf(output, "UNKNOWN\n"); - return; + if (term == NULL) { + fprintf(output, "(NULL)"); + } else { + switch (term->type) { + case XML_SCHEMA_TYPE_ELEMENT: + fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str, + ((xmlSchemaElementPtr)term)->targetNamespace, + ((xmlSchemaElementPtr)term)->name)); + FREE_AND_NULL(str); + break; + case XML_SCHEMA_TYPE_SEQUENCE: + fprintf(output, "SEQUENCE"); + break; + case XML_SCHEMA_TYPE_CHOICE: + fprintf(output, "CHOICE"); + break; + case XML_SCHEMA_TYPE_ALL: + fprintf(output, "ALL"); + break; + case XML_SCHEMA_TYPE_ANY: + fprintf(output, "ANY"); + break; + default: + fprintf(output, "UNKNOWN\n"); + return; + } } if (particle->minOccurs != 1) fprintf(output, " min: %d", particle->minOccurs); @@ -3872,10 +4276,11 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept else if (particle->maxOccurs != 1) fprintf(output, " max: %d", particle->maxOccurs); fprintf(output, "\n"); - if (((term->type == XML_SCHEMA_TYPE_SEQUENCE) || - (term->type == XML_SCHEMA_TYPE_CHOICE) || - (term->type == XML_SCHEMA_TYPE_ALL)) && - (term->children != NULL)) { + if (term && + ((term->type == XML_SCHEMA_TYPE_SEQUENCE) || + (term->type == XML_SCHEMA_TYPE_CHOICE) || + (term->type == XML_SCHEMA_TYPE_ALL)) && + (term->children != NULL)) { xmlSchemaContentModelDump((xmlSchemaParticlePtr) term->children, output, depth +1); } @@ -3883,6 +4288,51 @@ xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int dept xmlSchemaContentModelDump((xmlSchemaParticlePtr) particle->next, output, depth); } + +/** + * xmlSchemaAttrUsesDump: + * @uses: attribute uses list + * @output: the file output + * + * Dumps a list of attribute use components. + */ +static void +xmlSchemaAttrUsesDump(xmlSchemaItemListPtr uses, FILE * output) +{ + xmlSchemaAttributeUsePtr use; + xmlSchemaAttributeUseProhibPtr prohib; + xmlSchemaQNameRefPtr ref; + const xmlChar *name, *tns; + xmlChar *str = NULL; + int i; + + if ((uses == NULL) || (uses->nbItems == 0)) + return; + + fprintf(output, " attributes:\n"); + for (i = 0; i < uses->nbItems; i++) { + use = uses->items[i]; + if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) { + fprintf(output, " [prohibition] "); + prohib = (xmlSchemaAttributeUseProhibPtr) use; + name = prohib->name; + tns = prohib->targetNamespace; + } else if (use->type == XML_SCHEMA_EXTRA_QNAMEREF) { + fprintf(output, " [reference] "); + ref = (xmlSchemaQNameRefPtr) use; + name = ref->name; + tns = ref->targetNamespace; + } else { + fprintf(output, " [use] "); + name = WXS_ATTRUSE_DECL_NAME(use); + tns = WXS_ATTRUSE_DECL_TNS(use); + } + fprintf(output, "'%s'\n", + (const char *) xmlSchemaFormatQName(&str, tns, name)); + FREE_AND_NULL(str); + } +} + /** * xmlSchemaTypeDump: * @output: the file output @@ -3899,11 +4349,11 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) } fprintf(output, "Type: "); if (type->name != NULL) - fprintf(output, "%s ", type->name); + fprintf(output, "'%s' ", type->name); else - fprintf(output, "no name "); + fprintf(output, "(no name) "); if (type->targetNamespace != NULL) - fprintf(output, "ns %s ", type->targetNamespace); + fprintf(output, "ns '%s' ", type->targetNamespace); switch (type->type) { case XML_SCHEMA_TYPE_BASIC: fprintf(output, "[basic] "); @@ -3965,12 +4415,14 @@ xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output) } fprintf(output, "\n"); if (type->base != NULL) { - fprintf(output, " base type: %s", type->base); + fprintf(output, " base type: '%s'", type->base); if (type->baseNs != NULL) - fprintf(output, " ns %s\n", type->baseNs); + fprintf(output, " ns '%s'\n", type->baseNs); else fprintf(output, "\n"); } + if (type->attrUses != NULL) + xmlSchemaAttrUsesDump(type->attrUses, output); if (type->annot != NULL) xmlSchemaAnnotDump(output, type->annot); #ifdef DUMP_CONTENT_MODEL @@ -4010,14 +4462,13 @@ xmlSchemaDump(FILE * output, xmlSchemaPtr schema) fprintf(output, "\n"); if (schema->annot != NULL) xmlSchemaAnnotDump(output, schema->annot); - xmlHashScan(schema->typeDecl, (xmlHashScanner) xmlSchemaTypeDump, output); xmlHashScanFull(schema->elemDecl, (xmlHashScannerFull) xmlSchemaElementDump, output); } -#ifdef DEBUG_IDC +#ifdef DEBUG_IDC_NODE_TABLE /** * xmlSchemaDebugDumpIDCTable: * @vctxt: the WXS validation context @@ -4030,21 +4481,22 @@ xmlSchemaDebugDumpIDCTable(FILE * output, const xmlChar *localName, xmlSchemaPSVIIDCBindingPtr bind) { - xmlChar *str = NULL, *value; + xmlChar *str = NULL; + const xmlChar *value; xmlSchemaPSVIIDCNodePtr tab; xmlSchemaPSVIIDCKeyPtr key; int i, j, res; - fprintf(output, "IDC: TABLES on %s\n", + fprintf(output, "IDC: TABLES on '%s'\n", xmlSchemaFormatQName(&str, namespaceName, localName)); FREE_AND_NULL(str) if (bind == NULL) return; do { - fprintf(output, "IDC: BINDING %s\n", - xmlSchemaFormatQName(&str, bind->definition->targetNamespace, - bind->definition->name)); + fprintf(output, "IDC: BINDING '%s' (%d)\n", + xmlSchemaGetComponentQName(&str, + bind->definition), bind->nbNodes); FREE_AND_NULL(str) for (i = 0; i < bind->nbNodes; i++) { tab = bind->nodeTable[i]; @@ -4054,7 +4506,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output, if ((key != NULL) && (key->val != NULL)) { res = xmlSchemaGetCanonValue(key->val, &value); if (res >= 0) - fprintf(output, "\"%s\" ", value); + fprintf(output, "'%s' ", value); else fprintf(output, "CANON-VALUE-FAILED "); if (res == 0) @@ -4066,6 +4518,29 @@ xmlSchemaDebugDumpIDCTable(FILE * output, } fprintf(output, ")\n"); } + if (bind->dupls && bind->dupls->nbItems) { + fprintf(output, "IDC: dupls (%d):\n", bind->dupls->nbItems); + for (i = 0; i < bind->dupls->nbItems; i++) { + tab = bind->dupls->items[i]; + fprintf(output, " ( "); + for (j = 0; j < bind->definition->nbFields; j++) { + key = tab->keys[j]; + if ((key != NULL) && (key->val != NULL)) { + res = xmlSchemaGetCanonValue(key->val, &value); + if (res >= 0) + fprintf(output, "'%s' ", value); + else + fprintf(output, "CANON-VALUE-FAILED "); + if (res == 0) + FREE_AND_NULL(value) + } else if (key != NULL) + fprintf(output, "(no val), "); + else + fprintf(output, "(key missing), "); + } + fprintf(output, ")\n"); + } + } bind = bind->next; } while (bind != NULL); } @@ -4147,6 +4622,12 @@ xmlSchemaGetNodeContent(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node) return(ret); } +static const xmlChar * +xmlSchemaGetNodeContentNoDict(xmlNodePtr node) +{ + return((const xmlChar*) xmlNodeGetContent(node)); +} + /** * xmlSchemaGetProp: * @ctxt: the parser context @@ -4263,10 +4744,7 @@ xmlSchemaGetType(xmlSchemaPtr schema, const xmlChar * name, WXS_FIND_GLOBAL_ITEM(typeDecl) } exit: - if ((ret != NULL) && (ret->redef != NULL)) { - /* Return the last redefinition. */ - ret = ret->redef; - } + #ifdef DEBUG if (ret == NULL) { if (nsName == NULL) @@ -4375,10 +4853,7 @@ xmlSchemaGetGroup(xmlSchemaPtr schema, const xmlChar * name, WXS_FIND_GLOBAL_ITEM(groupDecl) } exit: - if ((ret != NULL) && (ret->redef != NULL)) { - /* Return the last redefinition. */ - ret = ret->redef; - } + #ifdef DEBUG if (ret == NULL) { if (nsName == NULL) @@ -4491,17 +4966,92 @@ xmlSchemaIsBlank(xmlChar * str, int len) return (1); } -#define WXS_GET_GLOBAL_HASH(c, s, slot) \ -{ \ - if (WXS_IS_IMPMAIN((c)->type)) \ - table = &(IMPBUCKET_CAST((c))->schema->slot); \ - else \ - table = &(INCBUCKET_CAST((c))->ownerImport->schema->slot); \ -} \ +#define WXS_COMP_NAME(c, t) ((t) (c))->name +#define WXS_COMP_TNS(c, t) ((t) (c))->targetNamespace +/* +* xmlSchemaFindRedefCompInGraph: +* ATTENTION TODO: This uses pointer comp. for strings. +*/ +static xmlSchemaBasicItemPtr +xmlSchemaFindRedefCompInGraph(xmlSchemaBucketPtr bucket, + xmlSchemaTypeType type, + const xmlChar *name, + const xmlChar *nsName) +{ + xmlSchemaBasicItemPtr ret; + int i; -#define WXS_INIT_GLOBAL_HASH(ctx, tbl) \ -if (*(tbl) == NULL) *(tbl) = xmlHashCreateDict(10, (ctx)->dict); \ -if (*(tbl) == NULL) { if (ret != NULL) xmlFree(ret); return (NULL); } + if ((bucket == NULL) || (name == NULL)) + return(NULL); + if ((bucket->globals == NULL) || + (bucket->globals->nbItems == 0)) + goto subschemas; + /* + * Search in global components. + */ + for (i = 0; i < bucket->globals->nbItems; i++) { + ret = bucket->globals->items[i]; + if (ret->type == type) { + switch (type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if ((WXS_COMP_NAME(ret, xmlSchemaTypePtr) == name) && + (WXS_COMP_TNS(ret, xmlSchemaTypePtr) == + nsName)) + { + return(ret); + } + break; + case XML_SCHEMA_TYPE_GROUP: + if ((WXS_COMP_NAME(ret, + xmlSchemaModelGroupDefPtr) == name) && + (WXS_COMP_TNS(ret, + xmlSchemaModelGroupDefPtr) == nsName)) + { + return(ret); + } + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((WXS_COMP_NAME(ret, + xmlSchemaAttributeGroupPtr) == name) && + (WXS_COMP_TNS(ret, + xmlSchemaAttributeGroupPtr) == nsName)) + { + return(ret); + } + break; + default: + /* Should not be hit. */ + return(NULL); + } + } + } +subschemas: + /* + * Process imported/included schemas. + */ + if (bucket->relations != NULL) { + xmlSchemaSchemaRelationPtr rel = bucket->relations; + + /* + * TODO: Marking the bucket will not avoid multiple searches + * in the same schema, but avoids at least circularity. + */ + bucket->flags |= XML_SCHEMA_BUCKET_MARKED; + do { + if ((rel->bucket != NULL) && + ((rel->bucket->flags & XML_SCHEMA_BUCKET_MARKED) == 0)) { + ret = xmlSchemaFindRedefCompInGraph(rel->bucket, + type, name, nsName); + if (ret != NULL) + return(ret); + } + rel = rel->next; + } while (rel != NULL); + bucket->flags ^= XML_SCHEMA_BUCKET_MARKED; + } + return(NULL); +} /** * xmlSchemaAddNotation: @@ -4516,18 +5066,14 @@ if (*(tbl) == NULL) { if (ret != NULL) xmlFree(ret); return (NULL); } */ static xmlSchemaNotationPtr xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - const xmlChar *name) + const xmlChar *name, const xmlChar *nsName, + xmlNodePtr node ATTRIBUTE_UNUSED) { xmlSchemaNotationPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, notaDecl) - - WXS_INIT_GLOBAL_HASH(ctxt, table) ret = (xmlSchemaNotationPtr) xmlMalloc(sizeof(xmlSchemaNotation)); if (ret == NULL) { xmlSchemaPErrMemory(ctxt, "add annotation", NULL); @@ -4535,18 +5081,11 @@ xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } memset(ret, 0, sizeof(xmlSchemaNotation)); ret->type = XML_SCHEMA_TYPE_NOTATION; - ret->name = xmlDictLookup(ctxt->dict, name, -1); - - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPErr(ctxt, (xmlNodePtr) ctxt->doc, - XML_SCHEMAP_REDEFINED_NOTATION, - "A notation declaration with the name '%s' does already exist.\n", - name, NULL); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); + ret->name = name; + ret->targetNamespace = nsName; + /* TODO: do we need the node to be set? + * ret->node = node;*/ + WXS_ADD_GLOBAL(ctxt, ret); return (ret); } @@ -4568,8 +5107,6 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, int topLevel) { xmlSchemaAttributePtr ret = NULL; - int val; - xmlHashTablePtr *table; if ((ctxt == NULL) || (schema == NULL)) return (NULL); @@ -4580,86 +5117,138 @@ xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaAttribute)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; + ret->node = node; + ret->name = name; ret->targetNamespace = nsName; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ATTR, - NULL, NULL, node, - "A global attribute declaration with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + if (topLevel) + WXS_ADD_GLOBAL(ctxt, ret); + else + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); + return (ret); +} + +/** + * xmlSchemaAddAttributeUse: + * @ctxt: a schema parser context + * @schema: the schema being built + * @name: the item name + * @namespace: the namespace + * + * Add an XML schema Attrribute declaration + * *WARNING* this interface is highly subject to change + * + * Returns the new struture or NULL in case of error + */ +static xmlSchemaAttributeUsePtr +xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt, + xmlNodePtr node) +{ + xmlSchemaAttributeUsePtr ret = NULL; + + if (pctxt == NULL) + return (NULL); + + ret = (xmlSchemaAttributeUsePtr) xmlMalloc(sizeof(xmlSchemaAttributeUse)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaAttributeUse)); + ret->type = XML_SCHEMA_TYPE_ATTRIBUTE_USE; + ret->node = node; + + WXS_ADD_LOCAL(pctxt, ret); + return (ret); +} + +/* +* xmlSchemaAddRedef: +* +* Adds a redefinition information. This is used at a later stage to: +* resolve references to the redefined components and to check constraints. +*/ +static xmlSchemaRedefPtr +xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBucketPtr targetBucket, + void *item, + const xmlChar *refName, + const xmlChar *refTargetNs) +{ + xmlSchemaRedefPtr ret; + + ret = (xmlSchemaRedefPtr) + xmlMalloc(sizeof(xmlSchemaRedef)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, + "allocating redefinition info", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaRedef)); + ret->item = item; + ret->targetBucket = targetBucket; + ret->refName = refName; + ret->refTargetNs = refTargetNs; + if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL) + WXS_CONSTRUCTOR(pctxt)->redefs = ret; + else + WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret; + WXS_CONSTRUCTOR(pctxt)->lastRedef = ret; + return (ret); } /** - * xmlSchemaAddAttributeGroup: + * xmlSchemaAddAttributeGroupDefinition: * @ctxt: a schema parser context * @schema: the schema being built * @name: the item name + * @nsName: the target namespace + * @node: the corresponding node * - * Add an XML schema Attrribute Group declaration + * Add an XML schema Attrribute Group definition. * * Returns the new struture or NULL in case of error */ static xmlSchemaAttributeGroupPtr -xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, - const xmlChar * name, - xmlNodePtr node, - int topLevel) +xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema ATTRIBUTE_UNUSED, + const xmlChar *name, + const xmlChar *nsName, + xmlNodePtr node) { xmlSchemaAttributeGroupPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; - if ((ctxt == NULL) || (schema == NULL)) + if ((pctxt == NULL) || (name == NULL)) return (NULL); ret = (xmlSchemaAttributeGroupPtr) xmlMalloc(sizeof(xmlSchemaAttributeGroup)); if (ret == NULL) { - xmlSchemaPErrMemory(ctxt, "allocating attribute group", NULL); + xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL); return (NULL); } memset(ret, 0, sizeof(xmlSchemaAttributeGroup)); ret->type = XML_SCHEMA_TYPE_ATTRIBUTEGROUP; - ret->node = node; - - if (topLevel) { - ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL; - ret->name = xmlDictLookup(ctxt->dict, name, -1); - ret->targetNamespace = ctxt->targetNamespace; - - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, attrgrpDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ATTRGROUP, - NULL, NULL, node, - "A global attribute group definition with the name '%s' " - "does already exist", name); + ret->name = name; + ret->targetNamespace = nsName; + ret->node = node; + + /* TODO: Remove the flag. */ + ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL; + if (pctxt->isRedefine) { + pctxt->redef = xmlSchemaAddRedef(pctxt, pctxt->redefined, + ret, name, nsName); + if (pctxt->redef == NULL) { xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - - WXS_ADD_PENDING_ITEM(ctxt, ret); + return(NULL); + } + pctxt->redefCounter = 0; + } + WXS_ADD_GLOBAL(pctxt, ret); + WXS_ADD_PENDING(pctxt, ret); return (ret); } @@ -4676,15 +5265,13 @@ xmlSchemaAddAttributeGroup(xmlSchemaParserCtxtPtr ctxt, * Returns the new struture or NULL in case of error */ static xmlSchemaElementPtr -xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, +xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, const xmlChar * name, const xmlChar * nsName, xmlNodePtr node, int topLevel) { xmlSchemaElementPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; - if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) + if ((ctxt == NULL) || (name == NULL)) return (NULL); ret = (xmlSchemaElementPtr) xmlMalloc(sizeof(xmlSchemaElement)); @@ -4693,26 +5280,16 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaElement)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = XML_SCHEMA_TYPE_ELEMENT; + ret->name = name; ret->targetNamespace = nsName; + ret->node = node; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, elemDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_ELEMENT, - NULL, NULL, node, - "A global element declaration with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); - } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + if (topLevel) + WXS_ADD_GLOBAL(ctxt, ret); + else + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4730,12 +5307,11 @@ xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ static xmlSchemaTypePtr xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, + xmlSchemaTypeType type, const xmlChar * name, const xmlChar * nsName, xmlNodePtr node, int topLevel) { xmlSchemaTypePtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL)) return (NULL); @@ -4746,53 +5322,24 @@ xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } memset(ret, 0, sizeof(xmlSchemaType)); - if (name != NULL) - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->type = type; + ret->name = name; ret->targetNamespace = nsName; ret->node = node; - /* TODO: Get rid of occurences here. */ - ret->minOccurs = 1; - ret->maxOccurs = 1; - if (topLevel) { - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, typeDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - val = xmlHashAddEntry(*table, name, ret); - if (val != 0) { - if (! ctxt->isRedefine) { - xmlChar *str = NULL; - - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_TYPE, - NULL, NULL, node, - "A global type definition with the name '%s' does " - "already exist", - xmlSchemaFormatQName(&str, nsName, name)); - FREE_AND_NULL(str); - xmlFree(ret); - return (NULL); - } else { - xmlSchemaTypePtr prev; - - /* REDEFINE: Add a redefinition. */ - TODO - prev = xmlHashLookup(*table, name); - if (prev == NULL) { - PERROR_INT2("xmlSchemaAddType", "hash list did not " - "return a redefined type component, but should"); - xmlFree(ret); - return (NULL); - } - ret->redef = prev->redef; - prev->redef = ret; - /* TODO: Add to locals; dunno if this will make trouble. */ - ADD_LOCAL_ITEM(ctxt, ret); - } - } else - ADD_GLOBAL_ITEM(ctxt, ret); + if (ctxt->isRedefine) { + ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined, + ret, name, nsName); + if (ctxt->redef == NULL) { + xmlFree(ret); + return(NULL); + } + ctxt->redefCounter = 0; + } + WXS_ADD_GLOBAL(ctxt, ret); } else - ADD_LOCAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4811,6 +5358,7 @@ xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt, "allocating QName reference item", NULL); return (NULL); } + ret->node = NULL; ret->type = XML_SCHEMA_EXTRA_QNAMEREF; ret->name = refName; ret->targetNamespace = refNs; @@ -4819,10 +5367,29 @@ xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt, /* * Store the reference item in the schema. */ - ADD_LOCAL_ITEM(pctxt, ret); + WXS_ADD_LOCAL(pctxt, ret); + return (ret); +} + +static xmlSchemaAttributeUseProhibPtr +xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt) +{ + xmlSchemaAttributeUseProhibPtr ret; + + ret = (xmlSchemaAttributeUseProhibPtr) + xmlMalloc(sizeof(xmlSchemaAttributeUseProhib)); + if (ret == NULL) { + xmlSchemaPErrMemory(pctxt, + "allocating attribute use prohibition", NULL); + return (NULL); + } + memset(ret, 0, sizeof(xmlSchemaAttributeUseProhib)); + ret->type = XML_SCHEMA_EXTRA_ATTR_USE_PROHIB; + WXS_ADD_LOCAL(pctxt, ret); return (ret); } + /** * xmlSchemaAddModelGroup: * @ctxt: a schema parser context @@ -4856,7 +5423,10 @@ xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt, memset(ret, 0, sizeof(xmlSchemaModelGroup)); ret->type = type; ret->node = node; - ADD_LOCAL_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); + if ((type == XML_SCHEMA_TYPE_SEQUENCE) || + (type == XML_SCHEMA_TYPE_CHOICE)) + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4900,12 +5470,12 @@ xmlSchemaAddParticle(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret->next = NULL; ret->children = NULL; - ADD_LOCAL_ITEM(ctxt, ret); + WXS_ADD_LOCAL(ctxt, ret); /* * Note that addition to pending components will be done locally * to the specific parsing function, since the most particles * need not to be fixed up (i.e. the reference to be resolved). - * REMOVED: WXS_ADD_PENDING_ITEM(ctxt, ret); + * REMOVED: WXS_ADD_PENDING(ctxt, ret); */ return (ret); } @@ -4928,15 +5498,10 @@ xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node) { xmlSchemaModelGroupDefPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, groupDecl) - WXS_INIT_GLOBAL_HASH(ctxt, table) - ret = (xmlSchemaModelGroupDefPtr) xmlMalloc(sizeof(xmlSchemaModelGroupDef)); if (ret == NULL) { @@ -4944,23 +5509,22 @@ xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, return (NULL); } memset(ret, 0, sizeof(xmlSchemaModelGroupDef)); - ret->name = xmlDictLookup(ctxt->dict, name, -1); + ret->name = name; ret->type = XML_SCHEMA_TYPE_GROUP; ret->node = node; ret->targetNamespace = nsName; - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_REDEFINED_GROUP, - NULL, NULL, node, - "A global model group definition with the name '%s' does " - "already exist", name); - xmlFree(ret); - return (NULL); + if (ctxt->isRedefine) { + ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined, + ret, name, nsName); + if (ctxt->redef == NULL) { + xmlFree(ret); + return(NULL); + } + ctxt->redefCounter = 0; } - ADD_GLOBAL_ITEM(ctxt, ret); - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_GLOBAL(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -4993,16 +5557,11 @@ xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, const xmlChar *name, const xmlChar *nsName, int category, xmlNodePtr node) { - xmlSchemaIDCPtr ret = NULL; - xmlHashTablePtr *table = NULL; - int val; + xmlSchemaIDCPtr ret = NULL; if ((ctxt == NULL) || (schema == NULL) || (name == NULL)) return (NULL); - WXS_GET_GLOBAL_HASH(WXS_SCHEMA_BUCKET(ctxt), schema, idcDef) - WXS_INIT_GLOBAL_HASH(ctxt, table) - ret = (xmlSchemaIDCPtr) xmlMalloc(sizeof(xmlSchemaIDC)); if (ret == NULL) { xmlSchemaPErrMemory(ctxt, @@ -5016,25 +5575,12 @@ xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, ret->type = category; ret->node = node; - val = xmlHashAddEntry(*table, ret->name, ret); - if (val != 0) { - xmlSchemaPCustomErrExt(ctxt, - /* TODO: Error code! */ - XML_SCHEMAP_REDEFINED_TYPE, - NULL, NULL, node, - "An identity-constraint definition with the name '%s' " - "and targetNamespace '%s' does already exist", - ret->name, ret->targetNamespace, NULL); - - xmlFree(ret); - return (NULL); - } - ADD_GLOBAL_ITEM(ctxt, ret); + WXS_ADD_GLOBAL(ctxt, ret); /* * Only keyrefs need to be fixup up. */ if (category == XML_SCHEMA_TYPE_IDC_KEYREF) - WXS_ADD_PENDING_ITEM(ctxt, ret); + WXS_ADD_PENDING(ctxt, ret); return (ret); } @@ -5064,11 +5610,8 @@ xmlSchemaAddWildcard(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } memset(ret, 0, sizeof(xmlSchemaWildcard)); ret->type = type; - ret->node = node; - ret->minOccurs = 1; - ret->maxOccurs = 1; - - ADD_LOCAL_ITEM(ctxt, ret); + ret->node = node; + WXS_ADD_LOCAL(ctxt, ret); return (ret); } @@ -5187,8 +5730,7 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt, static int xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar *value, const xmlChar **uri, @@ -5269,8 +5811,7 @@ xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt, static int xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar **uri, const xmlChar **local) @@ -5279,7 +5820,7 @@ xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, value = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); return (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, - ownerDes, ownerItem, attr, value, uri, local)); + ownerItem, attr, value, uri, local)); } /** @@ -5301,8 +5842,7 @@ xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt, static int xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, const xmlChar **uri, @@ -5317,7 +5857,7 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, return (0); } return (xmlSchemaPValAttrNodeQName(ctxt, schema, - ownerDes, ownerItem, attr, uri, local)); + ownerItem, attr, uri, local)); } /** @@ -5335,25 +5875,15 @@ xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt, * if not valid and -1 if an internal error occurs. */ static int -xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, - xmlNodePtr ownerElem, - const xmlChar *name) +xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr) { int ret; - xmlChar *value; - xmlAttrPtr attr; - - value = xmlGetNoNsProp(ownerElem, name); - if (value == NULL) - return (0); + const xmlChar *value; - attr = xmlSchemaGetPropNode(ownerElem, (const char *) name); if (attr == NULL) - return (-1); - - ret = xmlValidateNCName(BAD_CAST value, 1); + return(0); + value = xmlSchemaGetNodeContentNoDict((xmlNodePtr) attr); + ret = xmlValidateNCName(value, 1); if (ret == 0) { /* * NOTE: the IDness might have already be declared in the DTD @@ -5366,38 +5896,53 @@ xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, * TODO: Use xmlSchemaStrip here; it's not exported at this * moment. */ - strip = xmlSchemaCollapseString(BAD_CAST value); - if (strip != NULL) + strip = xmlSchemaCollapseString(value); + if (strip != NULL) { + xmlFree((xmlChar *) value); value = strip; - res = xmlAddID(NULL, ownerElem->doc, BAD_CAST value, attr); + } + res = xmlAddID(NULL, attr->doc, value, attr); if (res == NULL) { ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - ownerItem, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), NULL, NULL, "Duplicate value '%s' of simple " - "type 'xs:ID'", BAD_CAST value, NULL); + "type 'xs:ID'", value, NULL); } else attr->atype = XML_ATTRIBUTE_ID; - if (strip != NULL) - xmlFree(strip); } } else if (ret > 0) { ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE; xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - ownerItem, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ID), NULL, NULL, "The value '%s' of simple type 'xs:ID' is " "not a valid 'xs:NCName'", - BAD_CAST value, NULL); + value, NULL); } - xmlFree(value); + if (value != NULL) + xmlFree((xmlChar *)value); return (ret); } +static int +xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt, + xmlNodePtr ownerElem, + const xmlChar *name) +{ + xmlAttrPtr attr; + + attr = xmlSchemaGetPropNode(ownerElem, (const char *) name); + if (attr == NULL) + return(0); + return(xmlSchemaPValAttrNodeID(ctxt, attr)); + +} + /** * xmlGetMaxOccurs: * @ctxt: a schema validation context @@ -5528,8 +6073,7 @@ xmlGetMinOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, */ static int xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr node) { xmlChar *value = NULL; @@ -5576,8 +6120,6 @@ xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt, */ static int xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, xmlNodePtr node, const char *name, int def) { @@ -5602,7 +6144,7 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt, else { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_INVALID_BOOLEAN, - ownerItem, + NULL, (xmlNodePtr) xmlSchemaGetPropNode(node, name), xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN), NULL, val, NULL, NULL, NULL); @@ -5629,15 +6171,12 @@ static xmlSchemaTypePtr xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr xmlSchemaPtr schema, xmlNodePtr node, xmlSchemaTypeType parentType); -static xmlSchemaAttributePtr xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr - ctxt, - xmlSchemaPtr schema, - xmlNodePtr node, - int topLevel); -static xmlSchemaAttributeGroupPtr -xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, xmlNodePtr node, - int topLevel); +static xmlSchemaBasicItemPtr +xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaItemListPtr uses, + int parentType); static xmlSchemaTypePtr xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node); @@ -5664,8 +6203,7 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, */ static int xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, - xmlChar **ownerDes ATTRIBUTE_UNUSED, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, const xmlChar *value, xmlSchemaTypePtr type) @@ -5695,7 +6233,8 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, break; default: { PERROR_INT("xmlSchemaPValAttrNodeValue", - "validation using the given type is not supported"); + "validation using the given type is not supported while " + "parsing a schema"); return (-1); } } @@ -5707,7 +6246,7 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, "failed to validate a schema attribute value"); return (-1); } else if (ret > 0) { - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -5737,8 +6276,7 @@ xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt, */ static int xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, + xmlSchemaBasicItemPtr ownerItem, xmlAttrPtr attr, xmlSchemaTypePtr type, const xmlChar **value) @@ -5752,7 +6290,7 @@ xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, if (value != NULL) *value = val; - return (xmlSchemaPValAttrNodeValue(ctxt, ownerDes, ownerItem, attr, + return (xmlSchemaPValAttrNodeValue(ctxt, ownerItem, attr, val, type)); } @@ -5776,9 +6314,8 @@ xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt, * number otherwise and -1 in case of an internal or API error. */ static int -xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, - xmlChar **ownerDes, - xmlSchemaTypePtr ownerItem, +xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, xmlSchemaTypePtr type, @@ -5807,7 +6344,7 @@ xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, *value = NULL; return (0); } - return (xmlSchemaPValAttrNode(ctxt, ownerDes, ownerItem, attr, + return (xmlSchemaPValAttrNode(ctxt, ownerItem, attr, type, value)); } @@ -5815,87 +6352,90 @@ static int xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema ATTRIBUTE_UNUSED, xmlNodePtr node, - xmlSchemaBasicItemPtr item, + xmlAttrPtr attr, const xmlChar *namespaceName) { /* TODO: Pointer comparison instead? */ if (xmlStrEqual(pctxt->targetNamespace, namespaceName)) - return (1); + return (0); if (xmlStrEqual(xmlSchemaNs, namespaceName)) - return (1); + return (0); /* * Check if the referenced namespace was <import>ed. */ - if (WXS_SCHEMA_BUCKET(pctxt)->relations != NULL) { + if (WXS_BUCKET(pctxt)->relations != NULL) { xmlSchemaSchemaRelationPtr rel; - rel = WXS_SCHEMA_BUCKET(pctxt)->relations; + rel = WXS_BUCKET(pctxt)->relations; do { - if (WXS_IS_IMPMAIN(rel->type) && + if (WXS_IS_BUCKET_IMPMAIN(rel->type) && xmlStrEqual(namespaceName, rel->importNamespace)) - return (1); + return (0); rel = rel->next; } while (rel != NULL); } /* * No matching <import>ed namespace found. */ - if (namespaceName == NULL) - xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, (xmlSchemaTypePtr) item, node, - "References from this schema to components in no " - "namespace are not valid, since not indicated by an import " - "statement", NULL); - else - xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, (xmlSchemaTypePtr) item, node, - "References from this schema to components in the " - "namespace '%s' are not valid, since not indicated by an import " - "statement", namespaceName); - return (0); + { + xmlNodePtr n = (attr != NULL) ? (xmlNodePtr) attr : node; + + if (namespaceName == NULL) + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_RESOLVE, n, NULL, + "References from this schema to components in no " + "namespace are not allowed, since not indicated by an " + "import statement", NULL, NULL); + else + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_RESOLVE, n, NULL, + "References from this schema to components in the " + "namespace '%s' are not allowed, since not indicated by an " + "import statement", namespaceName, NULL); + } + return (XML_SCHEMAP_SRC_RESOLVE); } /** - * xmlSchemaParseAttrDecls: + * xmlSchemaParseLocalAttributes: * @ctxt: a schema validation context * @schema: the schema being built * @node: a subtree containing XML Schema informations * @type: the hosting type where the attributes will be anchored * - * parse a XML schema attrDecls declaration corresponding to - * <!ENTITY % attrDecls - * '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'> + * Parses attribute uses and attribute declarations and + * attribute group references. */ -static xmlNodePtr -xmlSchemaParseAttrDecls(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr child, xmlSchemaTypePtr type) -{ - xmlSchemaAttributePtr lastattr = NULL, attr; - - while ((IS_SCHEMA(child, "attribute")) || - (IS_SCHEMA(child, "attributeGroup"))) { - attr = NULL; - if (IS_SCHEMA(child, "attribute")) { - attr = xmlSchemaParseAttribute(ctxt, schema, child, 0); - } else if (IS_SCHEMA(child, "attributeGroup")) { - attr = (xmlSchemaAttributePtr) - xmlSchemaParseAttributeGroup(ctxt, schema, child, 0); - } - if (attr != NULL) { - if (lastattr == NULL) { - if (type->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) - ((xmlSchemaAttributeGroupPtr) type)->attributes = attr; - else - type->attributes = attr; - lastattr = attr; - } else { - lastattr->next = attr; - lastattr = attr; - } +static int +xmlSchemaParseLocalAttributes(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, + xmlNodePtr *child, xmlSchemaItemListPtr *list, + int parentType, int *hasRefs) +{ + void *item; + + while ((IS_SCHEMA((*child), "attribute")) || + (IS_SCHEMA((*child), "attributeGroup"))) { + if (IS_SCHEMA((*child), "attribute")) { + item = xmlSchemaParseLocalAttribute(ctxt, schema, *child, + *list, parentType); + } else { + item = xmlSchemaParseAttributeGroupRef(ctxt, schema, *child); + if ((item != NULL) && (hasRefs != NULL)) + *hasRefs = 1; } - child = child->next; + if (item != NULL) { + if (*list == NULL) { + /* TODO: Customize grow factor. */ + *list = xmlSchemaItemListCreate(); + if (*list == NULL) + return(-1); + } + if (xmlSchemaItemListAddSize(*list, 2, item) == -1) + return(-1); + } + *child = (*child)->next; } - return (child); + return (0); } /** @@ -5912,7 +6452,7 @@ xmlSchemaParseAttrDecls(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ static xmlSchemaAnnotPtr xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node) + xmlNodePtr node, int needed) { xmlSchemaAnnotPtr ret; xmlNodePtr child = NULL; @@ -5929,7 +6469,10 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - ret = xmlSchemaNewAnnot(ctxt, node); + if (needed) + ret = xmlSchemaNewAnnot(ctxt, node); + else + ret = NULL; attr = node->properties; while (attr != NULL) { if (((attr->ns == NULL) && @@ -5938,12 +6481,11 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlStrEqual(attr->ns->href, xmlSchemaNs))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ @@ -5964,12 +6506,11 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlStrEqual(attr->ns->href, xmlSchemaNs))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttr(ctxt, NULL, NULL, child, "source", + xmlSchemaPValAttr(ctxt, NULL, child, "source", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL); child = child->next; } else if (IS_SCHEMA(child, "documentation")) { @@ -5984,8 +6525,7 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "source")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else { if (xmlStrEqual(attr->ns->href, xmlSchemaNs) || @@ -5993,8 +6533,7 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->ns->href, XML_XML_NAMESPACE)))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } attr = attr->next; @@ -6004,14 +6543,14 @@ xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ attr = xmlSchemaGetPropNodeNs(child, (const char *) XML_XML_NAMESPACE, "lang"); if (attr != NULL) - xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr, + xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_LANGUAGE), NULL); child = child->next; } else { if (!barked) xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(appinfo | documentation)*"); + NULL, node, child, NULL, "(appinfo | documentation)*"); barked = 1; child = child->next; } @@ -6085,8 +6624,7 @@ xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaFreeFacet(facet); return (NULL); } - xmlSchemaPValAttrID(ctxt, NULL, - (xmlSchemaTypePtr) facet, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); facet->value = value; if ((facet->type != XML_SCHEMA_FACET_PATTERN) && (facet->type != XML_SCHEMA_FACET_ENUMERATION)) { @@ -6101,7 +6639,7 @@ xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, child = node->children; if (IS_SCHEMA(child, "annotation")) { - facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + facet->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { @@ -6199,7 +6737,7 @@ xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt, /* * Validate the item (anyURI). */ - xmlSchemaPValAttrNodeValue(ctxt, NULL, NULL, attr, + xmlSchemaPValAttrNodeValue(ctxt, NULL, attr, nsItem, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI)); dictnsItem = xmlDictLookup(ctxt->dict, nsItem, -1); } @@ -6317,17 +6855,15 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * minOccurs/maxOccurs. */ @@ -6348,13 +6884,13 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } /* @@ -6371,8 +6907,6 @@ xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (particle == NULL) return (NULL); particle->annot = annot; - wild->minOccurs = min; - wild->maxOccurs = max; particle->children = (xmlSchemaTreeItemPtr) wild; return (particle); @@ -6404,29 +6938,26 @@ xmlSchemaParseNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, "Notation has no name\n", NULL, NULL); return (NULL); } - ret = xmlSchemaAddNotation(ctxt, schema, name); - if (ret == NULL) { + ret = xmlSchemaAddNotation(ctxt, schema, name, + ctxt->targetNamespace, node); + if (ret == NULL) return (NULL); - } - ret->targetNamespace = ctxt->targetNamespace; - - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -6470,18 +7001,15 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Parse the namespace list. */ @@ -6492,13 +7020,13 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -6517,227 +7045,491 @@ xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt, * * Returns the attribute declaration. */ -static xmlSchemaAttributePtr -xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node, int topLevel) +static xmlSchemaBasicItemPtr +xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node, + xmlSchemaItemListPtr uses, + int parentType) { - const xmlChar *name, *attrValue; - xmlChar *repName = NULL; /* The reported designation. */ - xmlSchemaAttributePtr ret; + const xmlChar *attrValue, *name = NULL, *ns = NULL; + xmlSchemaAttributeUsePtr use = NULL; xmlNodePtr child = NULL; - xmlAttrPtr attr, nameAttr; - int isRef = 0; + xmlAttrPtr attr; + const xmlChar *tmpNs = NULL, *tmpName = NULL, *defValue = NULL; + int isRef = 0, occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; + int nberrors, hasForm = 0, defValueType = 0; + +#define WXS_ATTR_DEF_VAL_DEFAULT 1 +#define WXS_ATTR_DEF_VAL_FIXED 2 /* - * Note that the w3c spec assumes the schema to be validated with schema - * for schemas beforehand. - * * 3.2.3 Constraints on XML Representations of Attribute Declarations */ - if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); attr = xmlSchemaGetPropNode(node, "ref"); - nameAttr = xmlSchemaGetPropNode(node, "name"); - - if ((attr == NULL) && (nameAttr == NULL)) { - /* - * 3.2.3 : 3.1 - * One of ref or name must be present, but not both - */ - xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1, - NULL, node, NULL, - "One of the attributes 'ref' or 'name' must be present"); - return (NULL); - } - if ((topLevel) || (attr == NULL)) { - if (nameAttr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "name", NULL); + if (attr != NULL) { + if (xmlSchemaPValAttrNodeQName(pctxt, schema, + NULL, attr, &tmpNs, &tmpName) != 0) { return (NULL); } - } else + if (xmlSchemaCheckReference(pctxt, schema, node, attr, tmpNs) != 0) + return(NULL); isRef = 1; + } + nberrors = pctxt->nberrors; + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if (isRef) { + if (xmlStrEqual(attr->name, BAD_CAST "id")) { + xmlSchemaPValAttrNodeID(pctxt, attr); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "ref")) { + goto attr_next; + } + } else { + if (xmlStrEqual(attr->name, BAD_CAST "name")) { + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "id")) { + xmlSchemaPValAttrNodeID(pctxt, attr); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "type")) { + xmlSchemaPValAttrNodeQName(pctxt, schema, NULL, + attr, &tmpNs, &tmpName); + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "form")) { + /* + * Evaluate the target namespace + */ + hasForm = 1; + attrValue = xmlSchemaGetNodeContent(pctxt, + (xmlNodePtr) attr); + if (xmlStrEqual(attrValue, BAD_CAST "qualified")) { + ns = pctxt->targetNamespace; + } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) + { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + NULL, (xmlNodePtr) attr, + NULL, "(qualified | unqualified)", + attrValue, NULL, NULL, NULL); + } + goto attr_next; + } + } + if (xmlStrEqual(attr->name, BAD_CAST "use")) { + + attrValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + /* TODO: Maybe we need to normalize the value beforehand. */ + if (xmlStrEqual(attrValue, BAD_CAST "optional")) + occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; + else if (xmlStrEqual(attrValue, BAD_CAST "prohibited")) + occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED; + else if (xmlStrEqual(attrValue, BAD_CAST "required")) + occurs = XML_SCHEMAS_ATTR_USE_REQUIRED; + else { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_INVALID_ATTR_USE, + NULL, (xmlNodePtr) attr, + NULL, "(optional | prohibited | required)", + attrValue, NULL, NULL, NULL); + } + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "default")) { + /* + * 3.2.3 : 1 + * default and fixed must not both be present. + */ + if (defValue) { + xmlSchemaPMutualExclAttrErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_1, + NULL, attr, "default", "fixed"); + } else { + defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + defValueType = WXS_ATTR_DEF_VAL_DEFAULT; + } + goto attr_next; + } else if (xmlStrEqual(attr->name, BAD_CAST "fixed")) { + /* + * 3.2.3 : 1 + * default and fixed must not both be present. + */ + if (defValue) { + xmlSchemaPMutualExclAttrErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_1, + NULL, attr, "default", "fixed"); + } else { + defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); + defValueType = WXS_ATTR_DEF_VAL_FIXED; + } + goto attr_next; + } + } else if (! xmlStrEqual(attr->ns->href, xmlSchemaNs)) + goto attr_next; - if (isRef) { -#ifdef ENABLE_NAMED_LOCALS - char buf[50]; -#endif - const xmlChar *refNs = NULL, *ref = NULL; + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + +attr_next: + attr = attr->next; + } + /* + * 3.2.3 : 2 + * If default and use are both present, use must have + * the actual value optional. + */ + if ((defValueType == WXS_ATTR_DEF_VAL_DEFAULT) && + (occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL)) { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_2, + NULL, node, NULL, + "(optional | prohibited | required)", NULL, + "The value of the attribute 'use' must be 'optional' " + "if the attribute 'default' is present", + NULL, NULL); + } + /* + * We want correct attributes. + */ + if (nberrors != pctxt->nberrors) + return(NULL); + if (! isRef) { + xmlSchemaAttributePtr attrDecl; + /* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */ + if ((! hasForm) && (schema->flags & XML_SCHEMAS_QUALIF_ATTR)) + ns = pctxt->targetNamespace; /* - * Parse as attribute reference. + * 3.2.6 Schema Component Constraint: xsi: Not Allowed + * TODO: Move this to the component layer. */ - if (xmlSchemaPValAttrNodeQName(ctxt, schema, - (xmlChar **) &xmlSchemaElemDesAttrRef, NULL, attr, &refNs, - &ref) != 0) { + if (xmlStrEqual(ns, xmlSchemaInstanceNs)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_NO_XSI, + node, NULL, + "The target namespace must not match '%s'", + xmlSchemaInstanceNs, NULL); + } + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); return (NULL); } -#ifdef ENABLE_NAMED_LOCALS - snprintf(buf, 49, "#aRef%d", ctxt->counter++ + 1); - name = (const xmlChar *) buf; - ret = xmlSchemaAddAttribute(ctxt, schema, name, NULL, node, 0); -#else - ret = xmlSchemaAddAttribute(ctxt, schema, NULL, NULL, node, 0); -#endif - - if (ret == NULL) { - if (repName != NULL) - xmlFree(repName); + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } - ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; - ret->node = node; - ret->refNs = refNs; - ret->ref = ref; - xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) ret, - refNs); /* - xmlSchemaFormatTypeRep(&repName, (xmlSchemaTypePtr) ret, NULL, NULL); + * 3.2.6 Schema Component Constraint: xmlns Not Allowed + * TODO: Move this to the component layer. */ - if (nameAttr != NULL) - xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_1, - &repName, (xmlSchemaTypePtr) ret, nameAttr, - "ref", "name"); + if (xmlStrEqual(name, BAD_CAST "xmlns")) { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_NO_XMLNS, + NULL, (xmlNodePtr) attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL, + "The value of the attribute must not match 'xmlns'", + NULL, NULL); + return (NULL); + } + if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) + goto check_children; /* - * Check for illegal attributes. + * Create the attribute use component. */ - attr = node->properties; - while (attr != NULL) { - if (attr->ns == NULL) { - if (xmlStrEqual(attr->name, BAD_CAST "type") || - xmlStrEqual(attr->name, BAD_CAST "form")) { - /* - * 3.2.3 : 3.2 - * If ref is present, then all of <simpleType>, - * form and type must be absent. - */ - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_3_2, &repName, - (xmlSchemaTypePtr) ret, attr); - } else if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) && - (!xmlStrEqual(attr->name, BAD_CAST "use")) && - (!xmlStrEqual(attr->name, BAD_CAST "id")) && - (!xmlStrEqual(attr->name, BAD_CAST "name")) && - (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && - (!xmlStrEqual(attr->name, BAD_CAST "default"))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); - } - } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); - } - attr = attr->next; - } - } else { - const xmlChar *ns = NULL; - + use = xmlSchemaAddAttributeUse(pctxt, node); + if (use == NULL) + return(NULL); + use->occurs = occurs; /* - * Parse as attribute declaration. + * Create the attribute declaration. */ - if (xmlSchemaPValAttrNode(ctxt, - (xmlChar **) &xmlSchemaElemDesAttrDecl, NULL, nameAttr, - xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { + attrDecl = xmlSchemaAddAttribute(pctxt, schema, name, ns, node, 0); + if (attrDecl == NULL) return (NULL); + if (tmpName != NULL) { + attrDecl->typeName = tmpName; + attrDecl->typeNs = tmpNs; + } + use->attrDecl = attrDecl; + /* + * Value constraint. + */ + if (defValue != NULL) { + attrDecl->defValue = defValue; + if (defValueType == WXS_ATTR_DEF_VAL_FIXED) + attrDecl->flags |= XML_SCHEMAS_ATTR_FIXED; } + } else if (occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) { + xmlSchemaQNameRefPtr ref; + /* - xmlSchemaFormatTypeRep(&repName, NULL, xmlSchemaElemDesAttrDecl, name); + * Create the attribute use component. */ + use = xmlSchemaAddAttributeUse(pctxt, node); + if (use == NULL) + return(NULL); /* - * 3.2.6 Schema Component Constraint: xmlns Not Allowed - * TODO: Move this to the component layer. + * We need to resolve the reference at later stage. */ - if (xmlStrEqual(name, BAD_CAST "xmlns")) { - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_NO_XMLNS, - NULL, (xmlNodePtr) nameAttr, - xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL, - "The value of type 'xs:NCName' must not match 'xmlns'", - NULL, NULL); - if (repName != NULL) - xmlFree(repName); - return (NULL); + WXS_ADD_PENDING(pctxt, use); + use->occurs = occurs; + /* + * Create a QName reference to the attribute declaration. + */ + ref = xmlSchemaNewQNameRef(pctxt, XML_SCHEMA_TYPE_ATTRIBUTE, + tmpName, tmpNs); + if (ref == NULL) + return(NULL); + /* + * Assign the reference. This will be substituted for the + * referenced attribute declaration when the QName is resolved. + */ + use->attrDecl = WXS_ATTR_CAST ref; + /* + * Value constraint. + */ + if (defValue != NULL) + use->defValue = defValue; + if (defValueType == WXS_ATTR_DEF_VAL_FIXED) + use->flags |= XML_SCHEMA_ATTR_USE_FIXED; + } + +check_children: + /* + * And now for the children... + */ + child = node->children; + if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { + xmlSchemaAttributeUseProhibPtr prohib; + + if (IS_SCHEMA(child, "annotation")) { + xmlSchemaParseAnnotation(pctxt, schema, child, 0); + child = child->next; + } + if (child != NULL) { + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); } /* - * Evaluate the target namespace + * Check for pointlessness of attribute prohibitions. */ - if (topLevel) { - ns = ctxt->targetNamespace; - } else { - attr = xmlSchemaGetPropNode(node, "form"); - if (attr != NULL) { - attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - if (xmlStrEqual(attrValue, BAD_CAST "qualified")) { - ns = ctxt->targetNamespace; - } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) { - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, (xmlNodePtr) attr, - NULL, "(qualified | unqualified)", - attrValue, NULL, NULL, NULL); - } - } else if (schema->flags & XML_SCHEMAS_QUALIF_ATTR) - /* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */ - ns = ctxt->targetNamespace; + if (parentType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping attribute use prohibition, since it is " + "pointless inside an <attributeGroup>", + NULL, NULL, NULL); + return(NULL); + } else if (parentType == XML_SCHEMA_TYPE_EXTENSION) { + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping attribute use prohibition, since it is " + "pointless when extending a type", + NULL, NULL, NULL); + return(NULL); } - ret = xmlSchemaAddAttribute(ctxt, schema, name, ns, node, topLevel); - if (ret == NULL) { - if (repName != NULL) - xmlFree(repName); - return (NULL); + if (! isRef) { + tmpName = name; + tmpNs = ns; } - ret->type = XML_SCHEMA_TYPE_ATTRIBUTE; - ret->node = node; - if (topLevel) - ret->flags |= XML_SCHEMAS_ATTR_GLOBAL; /* - * 3.2.6 Schema Component Constraint: xsi: Not Allowed - * TODO: Move this to the component layer. + * Check for duplicate attribute prohibitions. */ - if (xmlStrEqual(ret->targetNamespace, xmlSchemaInstanceNs)) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_NO_XSI, - &repName, (xmlSchemaTypePtr) ret, node, - "The target namespace must not match '%s'", - xmlSchemaInstanceNs); + if (uses) { + int i; + + for (i = 0; i < uses->nbItems; i++) { + use = uses->items[i]; + if ((use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) && + (tmpName == (WXS_ATTR_PROHIB_CAST use)->name) && + (tmpNs == (WXS_ATTR_PROHIB_CAST use)->targetNamespace)) + { + xmlChar *str = NULL; + + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + node, NULL, + "Skipping duplicate attribute use prohibition '%s'", + xmlSchemaFormatQName(&str, tmpNs, tmpName), + NULL, NULL); + FREE_AND_NULL(str) + return(NULL); + } + } } /* - * Check for illegal attributes. + * Create the attribute prohibition helper component. */ - attr = node->properties; - while (attr != NULL) { - if (attr->ns == NULL) { - if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && - (!xmlStrEqual(attr->name, BAD_CAST "default")) && - (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && - (!xmlStrEqual(attr->name, BAD_CAST "name")) && - (!xmlStrEqual(attr->name, BAD_CAST "type"))) { - if ((topLevel) || - ((!xmlStrEqual(attr->name, BAD_CAST "form")) && - (!xmlStrEqual(attr->name, BAD_CAST "use")))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); - } - } - } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, attr); + prohib = xmlSchemaAddAttributeUseProhib(pctxt); + if (prohib == NULL) + return(NULL); + prohib->node = node; + prohib->name = tmpName; + prohib->targetNamespace = tmpNs; + if (isRef) { + /* + * We need at least to resolve to the attribute declaration. + */ + WXS_ADD_PENDING(pctxt, prohib); + } + return(WXS_BASIC_CAST prohib); + } else { + if (IS_SCHEMA(child, "annotation")) { + /* + * TODO: Should this go into the attr decl? + */ + use->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); + child = child->next; + } + if (isRef) { + if (child != NULL) { + if (IS_SCHEMA(child, "simpleType")) + /* + * 3.2.3 : 3.2 + * If ref is present, then all of <simpleType>, + * form and type must be absent. + */ + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_SRC_ATTRIBUTE_3_2, + NULL, node, child, NULL, + "(annotation?)"); + else + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); } - attr = attr->next; + } else { + if (IS_SCHEMA(child, "simpleType")) { + if (WXS_ATTRUSE_DECL(use)->typeName != NULL) { + /* + * 3.2.3 : 4 + * type and <simpleType> must not both be present. + */ + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, + NULL, node, child, + "The attribute 'type' and the <simpleType> child " + "are mutually exclusive", NULL); + } else + WXS_ATTRUSE_TYPEDEF(use) = + xmlSchemaParseSimpleType(pctxt, schema, child, 0); + child = child->next; + } + if (child != NULL) + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?, simpleType?)"); } - xmlSchemaPValAttrQName(ctxt, schema, &repName, (xmlSchemaTypePtr) ret, - node, "type", &ret->typeNs, &ret->typeName); + } + return (WXS_BASIC_CAST use); +} + + +static xmlSchemaAttributePtr +xmlSchemaParseGlobalAttribute(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) +{ + const xmlChar *attrValue; + xmlSchemaAttributePtr ret; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + + /* + * Note that the w3c spec assumes the schema to be validated with schema + * for schemas beforehand. + * + * 3.2.3 Constraints on XML Representations of Attribute Declarations + */ + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) + return (NULL); + /* + * 3.2.3 : 3.1 + * One of ref or name must be present, but not both + */ + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); + return (NULL); + } + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) { + return (NULL); + } + /* + * 3.2.6 Schema Component Constraint: xmlns Not Allowed + * TODO: Move this to the component layer. + */ + if (xmlStrEqual(attrValue, BAD_CAST "xmlns")) { + xmlSchemaPSimpleTypeErr(pctxt, + XML_SCHEMAP_NO_XMLNS, + NULL, (xmlNodePtr) attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL, + "The value of the attribute must not match 'xmlns'", + NULL, NULL); + return (NULL); } - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + /* + * 3.2.6 Schema Component Constraint: xsi: Not Allowed + * TODO: Move this to the component layer. + * Or better leave it here and add it to the component layer + * if we have a schema construction API. + */ + if (xmlStrEqual(pctxt->targetNamespace, xmlSchemaInstanceNs)) { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_NO_XSI, node, NULL, + "The target namespace must not match '%s'", + xmlSchemaInstanceNs, NULL); + } + + ret = xmlSchemaAddAttribute(pctxt, schema, attrValue, + pctxt->targetNamespace, node, 1); + if (ret == NULL) + return (NULL); + ret->flags |= XML_SCHEMAS_ATTR_GLOBAL; + + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && + (!xmlStrEqual(attr->name, BAD_CAST "default")) && + (!xmlStrEqual(attr->name, BAD_CAST "fixed")) && + (!xmlStrEqual(attr->name, BAD_CAST "name")) && + (!xmlStrEqual(attr->name, BAD_CAST "type"))) + { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + attr = attr->next; + } + xmlSchemaPValAttrQName(pctxt, schema, NULL, + node, "type", &ret->typeNs, &ret->typeName); + + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); /* * Attribute "fixed". */ - ret->defValue = xmlSchemaGetProp(ctxt, node, "fixed"); + ret->defValue = xmlSchemaGetProp(pctxt, node, "fixed"); if (ret->defValue != NULL) ret->flags |= XML_SCHEMAS_ATTR_FIXED; /* @@ -6750,233 +7542,268 @@ xmlSchemaParseAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * default and fixed must not both be present. */ if (ret->flags & XML_SCHEMAS_ATTR_FIXED) { - xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1, - &repName, (xmlSchemaTypePtr) ret, attr, "default", "fixed"); + xmlSchemaPMutualExclAttrErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1, + WXS_BASIC_CAST ret, attr, "default", "fixed"); } else - ret->defValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - } - if (topLevel == 0) { - /* - * Attribute "use". - */ - attr = xmlSchemaGetPropNode(node, "use"); - if (attr != NULL) { - attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - if (xmlStrEqual(attrValue, BAD_CAST "optional")) - ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; - else if (xmlStrEqual(attrValue, BAD_CAST "prohibited")) - ret->occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED; - else if (xmlStrEqual(attrValue, BAD_CAST "required")) - ret->occurs = XML_SCHEMAS_ATTR_USE_REQUIRED; - else - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_INVALID_ATTR_USE, - (xmlSchemaTypePtr) ret, (xmlNodePtr) attr, - NULL, "(optional | prohibited | required)", - attrValue, NULL, NULL, NULL); - } else - ret->occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL; - /* - * 3.2.3 : 2 - * If default and use are both present, use must have - * the actual value optional. - */ - if ((ret->occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL) && - (ret->defValue != NULL) && - ((ret->flags & XML_SCHEMAS_ATTR_FIXED) == 0)) { - xmlSchemaPSimpleTypeErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_2, - (xmlSchemaTypePtr) ret, (xmlNodePtr) attr, - NULL, "(optional | prohibited | required)", NULL, - "The value must be 'optional' if the attribute " - "'default' is present as well", NULL, NULL); - } + ret->defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr); } /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); child = child->next; } - if (isRef) { - if (child != NULL) { - if (IS_SCHEMA(child, "simpleType")) - /* - * 3.2.3 : 3.2 - * If ref is present, then all of <simpleType>, - * form and type must be absent. - */ - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_3_2, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?)"); - else - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?)"); - } - } else { - if (IS_SCHEMA(child, "simpleType")) { - if (ret->typeName != NULL) { - /* - * 3.2.3 : 4 - * type and <simpleType> must not both be present. - */ - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, - &repName, (xmlSchemaTypePtr) ret, node, child, - "The attribute 'type' and the <simpleType> child " - "are mutually exclusive", NULL); - } else - ret->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0); - child = child->next; - } - if (child != NULL) - xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - &repName, (xmlSchemaTypePtr) ret, node, child, NULL, - "(annotation?, simpleType?)"); + if (IS_SCHEMA(child, "simpleType")) { + if (ret->typeName != NULL) { + /* + * 3.2.3 : 4 + * type and <simpleType> must not both be present. + */ + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4, + NULL, node, child, + "The attribute 'type' and the <simpleType> child " + "are mutually exclusive", NULL); + } else + ret->subtypes = xmlSchemaParseSimpleType(pctxt, schema, child, 0); + child = child->next; } - /* - * Cleanup. - */ - if (repName != NULL) - xmlFree(repName); + if (child != NULL) + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?, simpleType?)"); + return (ret); } /** - * xmlSchemaParseAttributeGroup: + * xmlSchemaParseAttributeGroupRef: * @ctxt: a schema validation context * @schema: the schema being built * @node: a subtree containing XML Schema informations * - * parse a XML schema Attribute Group declaration + * Parse an attribute group definition reference. + * Note that a reference to an attribute group does not + * correspond to any component at all. * *WARNING* this interface is highly subject to change * * Returns the attribute group or NULL in case of error. */ -static xmlSchemaAttributeGroupPtr -xmlSchemaParseAttributeGroup(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaPtr schema, xmlNodePtr node, - int topLevel) +static xmlSchemaQNameRefPtr +xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) { - const xmlChar *name; - xmlSchemaAttributeGroupPtr ret; + xmlSchemaQNameRefPtr ret; xmlNodePtr child = NULL; - xmlAttrPtr attr, nameAttr; + xmlAttrPtr attr; + const xmlChar *refNs = NULL, *ref = NULL; - if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); - nameAttr = xmlSchemaGetPropNode(node, "name"); attr = xmlSchemaGetPropNode(node, "ref"); - if ((topLevel) || (attr == NULL)) { - /* - * Parse as an attribute group definition. - * Note that those are allowed at top level only. - */ - if (nameAttr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "name", NULL); - return (NULL); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "ref", NULL); + return (NULL); + } + xmlSchemaPValAttrNodeQName(pctxt, schema, + NULL, attr, &refNs, &ref); + if (xmlSchemaCheckReference(pctxt, schema, node, attr, refNs) != 0) + return(NULL); + + /* + * Check for illegal attributes. + */ + attr = node->properties; + while (attr != NULL) { + if (attr->ns == NULL) { + if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) && + (!xmlStrEqual(attr->name, BAD_CAST "id"))) + { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); + } + } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } - /* REDUNDANT: name = xmlSchemaGetNodeContent(ctxt, - * (xmlNodePtr) nameAttr); + attr = attr->next; + } + /* Attribute ID */ + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); + + /* + * And now for the children... + */ + child = node->children; + if (IS_SCHEMA(child, "annotation")) { + /* + * TODO: We do not have a place to store the annotation, do we? */ + xmlSchemaParseAnnotation(pctxt, schema, child, 0); + child = child->next; + } + if (child != NULL) { + xmlSchemaPContentErr(pctxt, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + NULL, node, child, NULL, + "(annotation?)"); + } + + /* + * Handle attribute group redefinitions. + */ + if (pctxt->isRedefine && pctxt->redef && + (pctxt->redef->item->type == + XML_SCHEMA_TYPE_ATTRIBUTEGROUP) && + (ref == pctxt->redef->refName) && + (refNs == pctxt->redef->refTargetNs)) + { /* - * The name is crucial, exit if invalid. + * SPEC src-redefine: + * (7.1) "If it has an <attributeGroup> among its contents + * the ·actual value· of whose ref [attribute] is the same + * as the ·actual value· of its own name attribute plus + * target namespace, then it must have exactly one such group." */ - if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, nameAttr, - xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { - return (NULL); + if (pctxt->redefCounter != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_SRC_REDEFINE, node, NULL, + "The redefining attribute group definition " + "'%s' must not contain more than one " + "reference to the redefined definition", + xmlSchemaFormatQName(&str, refNs, ref), NULL); + FREE_AND_NULL(str); + return(NULL); } - ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 1); + pctxt->redefCounter++; + /* + * URGENT TODO: How to ensure that the reference will not be + * handled by the normal component resolution mechanism? + */ + ret = xmlSchemaNewQNameRef(pctxt, + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs); if (ret == NULL) - return (NULL); + return(NULL); + ret->node = node; + pctxt->redef->reference = WXS_BASIC_CAST ret; } else { -#ifdef ENABLE_NAMED_LOCALS - char buf[50]; -#endif - const xmlChar *refNs = NULL, *ref = NULL; - /* - * Parse as an attribute group definition reference. + * Create a QName-reference helper component. We will substitute this + * component for the attribute uses of the referenced attribute group + * definition. */ - if (attr == NULL) { - xmlSchemaPMissingAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, "ref", NULL); - } - xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, &refNs,&ref); -#ifdef ENABLE_NAMED_LOCALS - snprintf(buf, 49, "#agRef%d", ctxt->counter++ + 1); - name = (const xmlChar *) buf; - if (name == NULL) { - xmlSchemaPErrMemory(ctxt, "creating internal name for an " - "attribute group definition reference", node); - return (NULL); - } - ret = xmlSchemaAddAttributeGroup(ctxt, schema, name, node, 0); -#else - ret = xmlSchemaAddAttributeGroup(ctxt, schema, NULL, node, 0); -#endif + ret = xmlSchemaNewQNameRef(pctxt, + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs); if (ret == NULL) - return (NULL); - ret->ref = ref; - ret->refNs = refNs; - xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) ret, refNs); + return(NULL); + ret->node = node; + /* Add to pending items, to be able to resolve the reference. */ + WXS_ADD_PENDING(pctxt, ret); + } + return (ret); +} + +/** + * xmlSchemaParseAttributeGroupDefinition: + * @pctxt: a schema validation context + * @schema: the schema being built + * @node: a subtree containing XML Schema informations + * + * parse a XML schema Attribute Group declaration + * *WARNING* this interface is highly subject to change + * + * Returns the attribute group definition or NULL in case of error. + */ +static xmlSchemaAttributeGroupPtr +xmlSchemaParseAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaPtr schema, + xmlNodePtr node) +{ + const xmlChar *name; + xmlSchemaAttributeGroupPtr ret; + xmlNodePtr child = NULL; + xmlAttrPtr attr; + int hasRefs = 0; + + if ((pctxt == NULL) || (schema == NULL) || (node == NULL)) + return (NULL); + + attr = xmlSchemaGetPropNode(node, "name"); + if (attr == NULL) { + xmlSchemaPMissingAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_MISSING, + NULL, node, "name", NULL); + return (NULL); + } + /* + * The name is crucial, exit if invalid. + */ + if (xmlSchemaPValAttrNode(pctxt, + NULL, attr, + xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { + return (NULL); } + ret = xmlSchemaAddAttributeGroupDefinition(pctxt, schema, + name, pctxt->targetNamespace, node); + if (ret == NULL) + return (NULL); /* * Check for illegal attributes. */ attr = node->properties; while (attr != NULL) { if (attr->ns == NULL) { - if ((((topLevel == 0) && - (!xmlStrEqual(attr->name, BAD_CAST "ref"))) || - (topLevel && (!xmlStrEqual(attr->name, BAD_CAST "name")))) && + if ((!xmlStrEqual(attr->name, BAD_CAST "name")) && (!xmlStrEqual(attr->name, BAD_CAST "id"))) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + xmlSchemaPIllegalAttrErr(pctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* Attribute ID */ - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) ret, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - ret->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + ret->annot = xmlSchemaParseAnnotation(pctxt, schema, child, 1); child = child->next; } - if (topLevel) { - child = xmlSchemaParseAttrDecls(ctxt, schema, child, - (xmlSchemaTypePtr) ret); - if (IS_SCHEMA(child, "anyAttribute")) { - ret->attributeWildcard = xmlSchemaParseAnyAttribute(ctxt, - schema, child); - child = child->next; - } + /* + * Parse contained attribute decls/refs. + */ + if (xmlSchemaParseLocalAttributes(pctxt, schema, &child, + (xmlSchemaItemListPtr *) &(ret->attrUses), + XML_SCHEMA_TYPE_ATTRIBUTEGROUP, &hasRefs) == -1) + return(NULL); + if (hasRefs) + ret->flags |= XML_SCHEMAS_ATTRGROUP_HAS_REFS; + /* + * Parse the attribute wildcard. + */ + if (IS_SCHEMA(child, "anyAttribute")) { + ret->attributeWildcard = xmlSchemaParseAnyAttribute(pctxt, + schema, child); + child = child->next; } if (child != NULL) { - xmlSchemaPContentErr(ctxt, + xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, - "(annotation?)"); + NULL, node, child, NULL, + "(annotation?, ((attribute | attributeGroup)*, anyAttribute?))"); } return (ret); } @@ -7139,7 +7966,7 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPCustomErr(ctxt, /* TODO: Adjust error code. */ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, NULL, node, + NULL, node, "The XPath expression of the selector is not valid", NULL); return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); } else { @@ -7159,7 +7986,6 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, */ if (nsList != NULL) { int i, count = 0; - xmlNsPtr ns; for (i = 0; nsList[i] != NULL; i++) count++; @@ -7169,10 +7995,10 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, if (nsArray == NULL) { xmlSchemaPErrMemory(ctxt, "allocating a namespace array", NULL); + xmlFree(nsList); return (-1); } for (i = 0; i < count; i++) { - ns = nsList[i]; nsArray[2 * i] = nsList[i]->href; nsArray[2 * i + 1] = nsList[i]->prefix; } @@ -7195,7 +8021,7 @@ xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPCustomErr(ctxt, /* TODO: Adjust error code? */ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - NULL, NULL, node, + NULL, node, "The XPath expression '%s' could not be " "compiled", selector->xpath); return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE); @@ -7304,7 +8130,7 @@ xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem, default: xmlSchemaPCustomErr(NULL, XML_SCHEMAP_INTERNAL, - NULL, NULL, NULL, + NULL, NULL, "Internal error: xmlSchemaAddAnnotation, " "The item is not a annotated schema component", NULL); break; @@ -7343,13 +8169,11 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "xpath"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7390,7 +8214,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, } } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ @@ -7400,13 +8224,13 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the parent IDC. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) idc, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?)"); } @@ -7447,13 +8271,11 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, ((idcCategory != XML_SCHEMA_TYPE_IDC_KEYREF) || (!xmlStrEqual(attr->name, BAD_CAST "refer")))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7468,7 +8290,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, "name", NULL); return (NULL); } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -7478,8 +8300,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, if (item == NULL) return(NULL); - xmlSchemaPValAttrID(ctxt, NULL, (xmlSchemaTypePtr) item, - node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); if (idcCategory == XML_SCHEMA_TYPE_IDC_KEYREF) { /* * Attribute "refer" (mandatory). @@ -7499,11 +8320,10 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, if (item->ref == NULL) return (NULL); xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, + NULL, attr, &(item->ref->targetNamespace), &(item->ref->name)); - xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) item, + xmlSchemaCheckReference(ctxt, schema, node, attr, item->ref->targetNamespace); } } @@ -7512,13 +8332,13 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, child, + NULL, node, child, "A child element is missing", "(annotation?, (selector, field+))"); } @@ -7550,14 +8370,14 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (selector, field+))"); } } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (selector, field+))"); } @@ -7579,7 +8399,7 @@ xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt, */ static xmlSchemaBasicItemPtr xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, - xmlNodePtr node, int topLevel) + xmlNodePtr node, int *isElemRef, int topLevel) { xmlSchemaElementPtr decl = NULL; xmlSchemaParticlePtr particle = NULL; @@ -7594,6 +8414,9 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); + + if (isElemRef != NULL) + *isElemRef = 0; /* * If we get a "ref" attribute on a local <element> we will assume it's * a reference - even if there's a "name" attribute; this seems to be more @@ -7611,10 +8434,10 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else isRef = 1; - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); child = node->children; if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } /* @@ -7640,16 +8463,18 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * The reference part ============================================= */ + if (isElemRef != NULL) + *isElemRef = 1; + xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, NULL, attr, &refNs, &ref); - xmlSchemaCheckReference(ctxt, schema, node, NULL, refNs); + NULL, attr, &refNs, &ref); + xmlSchemaCheckReference(ctxt, schema, node, attr, refNs); /* * SPEC (3.3.3 : 2.1) "One of ref or name must be present, but not both" */ if (nameAttr != NULL) { xmlSchemaPMutualExclAttrErr(ctxt, - XML_SCHEMAP_SRC_ELEMENT_2_1, - NULL, NULL, nameAttr, "ref", "name"); + XML_SCHEMAP_SRC_ELEMENT_2_1, NULL, nameAttr, "ref", "name"); } /* * Check for illegal attributes. @@ -7676,8 +8501,7 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7686,12 +8510,12 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?)"); + NULL, node, child, NULL, "(annotation?)"); } if ((min == 0) && (max == 0)) goto return_null; /* - * Create the reference item. + * Create the reference item and attach it to the particle. */ refer = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_ELEMENT, ref, refNs); @@ -7703,7 +8527,7 @@ xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the particle to pending components, since the reference * need to be resolved. */ - WXS_ADD_PENDING_ITEM(ctxt, particle); + WXS_ADD_PENDING(ctxt, particle); return ((xmlSchemaBasicItemPtr) particle); } /* @@ -7714,7 +8538,7 @@ declaration_part: const xmlChar *ns = NULL, *fixed, *name, *attrValue; xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL; - if (xmlSchemaPValAttrNode(ctxt, NULL, NULL, nameAttr, + if (xmlSchemaPValAttrNode(ctxt, NULL, nameAttr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) goto return_null; /* @@ -7738,13 +8562,10 @@ declaration_part: } else if (schema->flags & XML_SCHEMAS_QUALIF_ELEM) ns = ctxt->targetNamespace; } - decl = xmlSchemaAddElement(ctxt, schema, name, ns, node, topLevel); + decl = xmlSchemaAddElement(ctxt, name, ns, node, topLevel); if (decl == NULL) { goto return_null; } - decl->type = XML_SCHEMA_TYPE_ELEMENT; - decl->node = node; - decl->targetNamespace = ns; /* * Check for illegal attributes. */ @@ -7765,23 +8586,20 @@ declaration_part: (!xmlStrEqual(attr->name, BAD_CAST "form"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if ((!xmlStrEqual(attr->name, BAD_CAST "final")) && (!xmlStrEqual(attr->name, BAD_CAST "abstract")) && (!xmlStrEqual(attr->name, BAD_CAST "substitutionGroup"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -7794,11 +8612,10 @@ declaration_part: */ decl->flags |= XML_SCHEMAS_ELEM_GLOBAL; decl->flags |= XML_SCHEMAS_ELEM_TOPLEVEL; - xmlSchemaPValAttrQName(ctxt, schema, NULL, - (xmlSchemaTypePtr) decl, node, "substitutionGroup", + xmlSchemaPValAttrQName(ctxt, schema, + NULL, node, "substitutionGroup", &(decl->substGroupNs), &(decl->substGroup)); - if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl, - node, "abstract", 0)) + if (xmlGetBooleanProp(ctxt, node, "abstract", 0)) decl->flags |= XML_SCHEMAS_ELEM_ABSTRACT; /* * Attribute "final". @@ -7817,7 +8634,7 @@ declaration_part: XML_SCHEMAS_ELEM_FINAL_RESTRICTION, -1, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - (xmlSchemaTypePtr) decl, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction))", attrValue, NULL, NULL, NULL); } @@ -7846,23 +8663,22 @@ declaration_part: XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - (xmlSchemaTypePtr) decl, (xmlNodePtr) attr, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | " "restriction | substitution))", attrValue, NULL, NULL, NULL); } } - if (xmlGetBooleanProp(ctxt, NULL, (xmlSchemaTypePtr) decl, - node, "nillable", 0)) + if (xmlGetBooleanProp(ctxt, node, "nillable", 0)) decl->flags |= XML_SCHEMAS_ELEM_NILLABLE; attr = xmlSchemaGetPropNode(node, "type"); if (attr != NULL) { xmlSchemaPValAttrNodeQName(ctxt, schema, - NULL, (xmlSchemaTypePtr) decl, attr, + NULL, attr, &(decl->namedTypeNs), &(decl->namedType)); xmlSchemaCheckReference(ctxt, schema, node, - (xmlSchemaBasicItemPtr) decl, decl->namedTypeNs); + attr, decl->namedTypeNs); } decl->value = xmlSchemaGetProp(ctxt, node, "default"); attr = xmlSchemaGetPropNode(node, "fixed"); @@ -7875,8 +8691,7 @@ declaration_part: */ xmlSchemaPMutualExclAttrErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_1, - NULL, (xmlSchemaTypePtr) decl, attr, - "default", "fixed"); + NULL, attr, "default", "fixed"); } else { decl->flags |= XML_SCHEMAS_ELEM_FIXED; decl->value = fixed; @@ -7894,11 +8709,11 @@ declaration_part: if (decl->namedType != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_3, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, "The attribute 'type' and the <complexType> child are " "mutually exclusive", NULL); } else - ELEM_TYPE(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0); + WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0); child = child->next; } else if (IS_SCHEMA(child, "simpleType")) { /* @@ -7909,11 +8724,11 @@ declaration_part: if (decl->namedType != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_ELEMENT_3, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, "The attribute 'type' and the <simpleType> child are " "mutually exclusive", NULL); } else - ELEM_TYPE(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0); + WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0); child = child->next; } while ((IS_SCHEMA(child, "unique")) || @@ -7938,7 +8753,7 @@ declaration_part: if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, (xmlSchemaTypePtr) decl, node, child, + NULL, node, child, NULL, "(annotation?, ((simpleType | complexType)?, " "(unique | key | keyref)*))"); } @@ -8011,17 +8826,15 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "memberTypes"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "memberTypes". This is a list of QNames. * TODO: Check the value to contain anything. @@ -8035,7 +8848,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaQNameRefPtr ref; cur = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr); - type->ref = cur; + type->base = cur; do { while (IS_BLANK_CH(*cur)) cur++; @@ -8045,7 +8858,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (end == cur) break; tmp = xmlStrndup(cur, end - cur); - if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, NULL, + if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema, NULL, attr, BAD_CAST tmp, &nsName, &localName) == 0) { /* * Create the member type link. @@ -8093,7 +8906,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the simple type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (IS_SCHEMA(child, "simpleType")) { @@ -8122,7 +8935,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?, simpleType*)"); + NULL, node, child, NULL, "(annotation?, simpleType*)"); } if ((attr == NULL) && (type->subtypes == NULL)) { /* @@ -8132,7 +8945,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, - NULL, NULL, node, + NULL, node, "Either the attribute 'memberTypes' or " "at least one <simpleType> child must be present", NULL); } @@ -8181,32 +8994,33 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "itemType"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "itemType". NOTE that we will use the "ref" and "refNs" * fields for holding the reference to the itemType. + * + * REVAMP TODO: Use the "base" and "baseNs" fields, since we will remove + * the "ref" fields. */ - xmlSchemaPValAttrQName(ctxt, schema, NULL, NULL, - node, "itemType", &(type->refNs), &(type->ref)); + xmlSchemaPValAttrQName(ctxt, schema, NULL, + node, "itemType", &(type->baseNs), &(type->base)); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (IS_SCHEMA(child, "simpleType")) { @@ -8215,34 +9029,34 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Either the itemType [attribute] or the <simpleType> [child] of * the <list> element must be present, but not both. */ - if (type->ref != NULL) { + if (type->base != NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "The attribute 'itemType' and the <simpleType> child " "are mutually exclusive", NULL); } else { type->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0); } child = child->next; - } else if (type->ref == NULL) { + } else if (type->base == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "Either the attribute 'itemType' or the <simpleType> child " "must be present", NULL); } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, "(annotation?, simpleType?)"); + NULL, node, child, NULL, "(annotation?, simpleType?)"); } - if ((type->ref == NULL) && + if ((type->base == NULL) && (type->subtypes == NULL) && (xmlSchemaGetPropNode(node, "itemType") == NULL)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - NULL, NULL, node, + NULL, node, "Either the attribute 'itemType' or the <simpleType> child " "must be present", NULL); } @@ -8265,7 +9079,7 @@ static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node, int topLevel) { - xmlSchemaTypePtr type, oldCtxtType, oldParentItem; + xmlSchemaTypePtr type, oldCtxtType; xmlNodePtr child = NULL; const xmlChar *attrValue = NULL; xmlAttrPtr attr; @@ -8284,7 +9098,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, return (NULL); } else { if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) return (NULL); /* @@ -8300,7 +9114,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * about this case. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, + NULL, node, "Redefinition of built-in simple types is not " "supported", NULL); return(NULL); @@ -8326,11 +9140,14 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 39, "#ST%d", ctxt->counter++ + 1); - type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_SIMPLE, + xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1), ctxt->targetNamespace, node, 0); #else - type = xmlSchemaAddType(ctxt, schema, NULL, - ctxt->targetNamespace, node, 0); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_SIMPLE, + NULL, ctxt->targetNamespace, node, 0); #endif if (type == NULL) return (NULL); @@ -8344,13 +9161,11 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "id")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -8360,8 +9175,8 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * * Note that attrValue is the value of the attribute "name" here. */ - type = xmlSchemaAddType(ctxt, schema, attrValue, - ctxt->targetNamespace, node, 1); + type = xmlSchemaAddType(ctxt, schema, XML_SCHEMA_TYPE_SIMPLE, + attrValue, ctxt->targetNamespace, node, 1); if (type == NULL) return (NULL); type->type = XML_SCHEMA_TYPE_SIMPLE; @@ -8377,13 +9192,11 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "name")) && (!xmlStrEqual(attr->name, BAD_CAST "final"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -8407,29 +9220,29 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, + WXS_BASIC_CAST type, (xmlNodePtr) attr, NULL, "(#all | List of (list | union | restriction)", attrValue, NULL, NULL, NULL); } } } type->targetNamespace = ctxt->targetNamespace; - xmlSchemaPValAttrID(ctxt, NULL, type, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ oldCtxtType = ctxt->ctxtType; - oldParentItem = ctxt->parentItem; + ctxt->ctxtType = type; - ctxt->parentItem = type; + child = node->children; if (IS_SCHEMA(child, "annotation")) { - type->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, type, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | list | union))"); } else if (IS_SCHEMA(child, "restriction")) { xmlSchemaParseRestriction(ctxt, schema, child, @@ -8445,7 +9258,7 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, type, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | list | union))"); } /* @@ -8457,26 +9270,24 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (topLevel && ctxt->isRedefine && (! hasRestriction)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, thus the " + NULL, node, "This is a redefinition, thus the " "<simpleType> must have a <restriction> child", NULL); } - - ctxt->parentItem = oldParentItem; + ctxt->ctxtType = oldCtxtType; return (type); } /** * xmlSchemaParseModelGroupDefRef: - * @ctxt: a schema validation context - * @schema: the schema being built - * @node: a subtree containing XML Schema informations + * @ctxt: the parser context + * @schema: the schema being built + * @node: the node * - * Parses a XML schema particle (reference to a model group definition). - * *WARNING* this interface is highly subject to change + * Parses a reference to a model group definition. * - * Returns -1 in case of error, 0 if the declaration is improper and - * 1 in case of success. + * We will return a particle component with a qname-component or + * NULL in case of an error. */ static xmlSchemaTreeItemPtr xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, @@ -8496,13 +9307,13 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, if (attr == NULL) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - NULL, node, - "ref", NULL); + NULL, node, "ref", NULL); return (NULL); - } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, NULL, + } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL, attr, &refNs, &ref) != 0) { return (NULL); } + xmlSchemaCheckReference(ctxt, schema, node, attr, refNs); min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger"); max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(xs:nonNegativeInteger | unbounded)"); @@ -8517,29 +9328,24 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) && (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); item = xmlSchemaAddParticle(ctxt, schema, node, min, max); if (item == NULL) - return (NULL); - /* Add to pending components; the reference needs to be resolved. */ - WXS_ADD_PENDING_ITEM(ctxt, item); + return (NULL); /* - * Create a reference item as the term; it will be substituted for - * the model group after the reference has been resolved. + * Create a qname-reference and set as the term; it will be substituted + * for the model group after the reference has been resolved. */ item->children = (xmlSchemaTreeItemPtr) - xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs); - xmlSchemaCheckReference(ctxt, schema, node, (xmlSchemaBasicItemPtr) item, refNs); + xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs); xmlSchemaPCheckParticleCorrect_2(ctxt, item, node, min, max); /* * And now for the children... @@ -8550,13 +9356,13 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, /* * TODO: What to do exactly with the annotation? */ - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } /* @@ -8575,6 +9381,11 @@ xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, * @node: a subtree containing XML Schema informations * * Parses a XML schema model group definition. + * + * Note that the contraint src-redefine (6.2) can't be applied until + * references have been resolved. So we will do this at the + * component fixup level. + * * *WARNING* this interface is highly subject to change * * Returns -1 in case of error, 0 if the declaration is improper and @@ -8600,8 +9411,7 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, NULL, node, "name", NULL); return (NULL); - } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -8618,23 +9428,21 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "name")) && (!xmlStrEqual(attr->name, BAD_CAST "id"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (IS_SCHEMA(child, "all")) { @@ -8650,13 +9458,15 @@ xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt, XML_SCHEMA_TYPE_SEQUENCE, 0); child = child->next; } + + + if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (all | choice | sequence)?)"); } - return (item); } @@ -8776,7 +9586,7 @@ xmlSchemaParseSchemaElement(xmlSchemaParserCtxtPtr ctxt, * since they are not visible at the component level. I.e. * they are used if processing schema *documents* only. */ - res = xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + res = xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); HFAILURE; /* @@ -8793,7 +9603,7 @@ xmlSchemaParseSchemaElement(xmlSchemaParserCtxtPtr ctxt, */ attr = xmlSchemaGetPropNode(node, "targetNamespace"); if (attr != NULL) { - res = xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr, + res = xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL); HFAILURE; if (res != 0) { @@ -8897,7 +9707,7 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, (IS_SCHEMA(child, "redefine")) || (IS_SCHEMA(child, "annotation"))) { if (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); if (schema->annot == NULL) schema->annot = annot; else @@ -8938,13 +9748,13 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, xmlSchemaParseSimpleType(ctxt, schema, child, 1); child = child->next; } else if (IS_SCHEMA(child, "element")) { - xmlSchemaParseElement(ctxt, schema, child, 1); + xmlSchemaParseElement(ctxt, schema, child, NULL, 1); child = child->next; } else if (IS_SCHEMA(child, "attribute")) { - xmlSchemaParseAttribute(ctxt, schema, child, 1); + xmlSchemaParseGlobalAttribute(ctxt, schema, child); child = child->next; } else if (IS_SCHEMA(child, "attributeGroup")) { - xmlSchemaParseAttributeGroup(ctxt, schema, child, 1); + xmlSchemaParseAttributeGroupDefinition(ctxt, schema, child); child = child->next; } else if (IS_SCHEMA(child, "group")) { xmlSchemaParseModelGroupDefinition(ctxt, schema, child); @@ -8955,14 +9765,17 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, child->parent, child, + NULL, child->parent, child, NULL, "((include | import | redefine | annotation)*, " "(((simpleType | complexType | group | attributeGroup) " "| element | attribute | notation), annotation*)*)"); child = child->next; } while (IS_SCHEMA(child, "annotation")) { - annot = xmlSchemaParseAnnotation(ctxt, schema, child); + /* + * TODO: We should add all annotations. + */ + annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); if (schema->annot == NULL) schema->annot = annot; else @@ -8971,7 +9784,6 @@ xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt, } } exit: - ctxt->parentItem = NULL; ctxt->ctxtType = NULL; if (oldErrs != ctxt->nberrors) res = ctxt->err; @@ -9004,6 +9816,18 @@ xmlSchemaSchemaRelationFree(xmlSchemaSchemaRelationPtr rel) #endif static void +xmlSchemaRedefListFree(xmlSchemaRedefPtr redef) +{ + xmlSchemaRedefPtr prev; + + while (redef != NULL) { + prev = redef; + redef = redef->next; + xmlFree(prev); + } +} + +static void xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con) { /* @@ -9019,6 +9843,8 @@ xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con) if (con->substGroups != NULL) xmlHashFree(con->substGroups, (xmlHashDeallocator) xmlSchemaSubstGroupFree); + if (con->redefs != NULL) + xmlSchemaRedefListFree(con->redefs); if (con->dict != NULL) xmlDictFree(con->dict); xmlFree(con); @@ -9070,6 +9896,11 @@ xmlSchemaParserCtxtCreate(void) } memset(ret, 0, sizeof(xmlSchemaParserCtxt)); ret->type = XML_SCHEMA_CTXT_PARSER; + ret->attrProhibs = xmlSchemaItemListCreate(); + if (ret->attrProhibs == NULL) { + xmlFree(ret); + return(NULL); + } return(ret); } @@ -9114,7 +9945,9 @@ xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt) } /* TODO: Pass user data. */ xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error, - vctxt->warning, vctxt->userData); + vctxt->warning, vctxt->errCtxt); + xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror, + vctxt->errCtxt); } return (0); } @@ -9312,7 +10145,9 @@ xmlSchemaParseNewDoc(xmlSchemaParserCtxtPtr pctxt, */ newpctxt->schema = schema; xmlSchemaSetParserErrors(newpctxt, pctxt->error, pctxt->warning, - pctxt->userData); + pctxt->errCtxt); + xmlSchemaSetParserStructuredErrors(newpctxt, pctxt->serror, + pctxt->errCtxt); newpctxt->counter = pctxt->counter; @@ -9459,7 +10294,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, /* * Save the namespace import information. */ - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { relation->importNamespace = importNamespace; if (schemaLocation == NULL) { /* @@ -9475,7 +10310,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, /* Did we already fetch the doc? */ if (bkt != NULL) { /* TODO: The following nasty cases will produce an error. */ - if ((WXS_IS_IMPMAIN(type)) && (! bkt->imported)) { + if ((WXS_IS_BUCKET_IMPMAIN(type)) && (! bkt->imported)) { /* We included/redefined and then try to import a schema. */ xmlSchemaCustomErr(ACTXT_CAST pctxt, err, invokingNode, NULL, @@ -9483,7 +10318,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, "it was already included or redefined", schemaLocation, NULL); goto exit; - } else if ((! WXS_IS_IMPMAIN(type)) && (bkt->imported)) { + } else if ((! WXS_IS_BUCKET_IMPMAIN(type)) && (bkt->imported)) { /* We imported and then try to include/redefine a schema. */ xmlSchemaCustomErr(ACTXT_CAST pctxt, err, invokingNode, NULL, @@ -9494,7 +10329,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, } } - if (WXS_IS_IMPMAIN(type)) { + if (WXS_IS_BUCKET_IMPMAIN(type)) { /* * Given that the schemaLocation [attribute] is only a hint, it is open * to applications to ignore all but the first <import> for a given @@ -9751,7 +10586,7 @@ doc_load: if (preserveDoc) bkt->preserveDoc = 1; } - if (WXS_IS_IMPMAIN(type)) + if (WXS_IS_BUCKET_IMPMAIN(type)) bkt->imported++; /* * Add it to the graph of schemas. @@ -9803,8 +10638,8 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, xmlNodePtr node) { xmlNodePtr child; - const xmlChar *namespaceName = NULL; - const xmlChar *schemaLocation = NULL; + const xmlChar *namespaceName = NULL, *schemaLocation = NULL; + const xmlChar *thisTargetNamespace; xmlAttrPtr attr; int ret = 0; xmlSchemaBucketPtr bucket = NULL; @@ -9822,20 +10657,18 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "namespace")) && (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* * Extract and validate attributes. */ - if (xmlSchemaPValAttr(pctxt, NULL, NULL, node, + if (xmlSchemaPValAttr(pctxt, NULL, node, "namespace", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &namespaceName) != 0) { xmlSchemaPSimpleTypeErr(pctxt, @@ -9846,7 +10679,7 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, return (pctxt->err); } - if (xmlSchemaPValAttr(pctxt, NULL, NULL, node, + if (xmlSchemaPValAttr(pctxt, NULL, node, "schemaLocation", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), &schemaLocation) != 0) { xmlSchemaPSimpleTypeErr(pctxt, @@ -9870,25 +10703,31 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } /* * Apply additional constraints. + * + * Note that it is important to use the original @targetNamespace + * (or none at all), to rule out imports of schemas _with_ a + * @targetNamespace if the importing schema is a chameleon schema + * (with no @targetNamespace). */ + thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace; if (namespaceName != NULL) { /* * 1.1 If the namespace [attribute] is present, then its ·actual value· * must not match the ·actual value· of the enclosing <schema>'s * targetNamespace [attribute]. */ - if (xmlStrEqual(pctxt->targetNamespace, namespaceName)) { + if (xmlStrEqual(thisTargetNamespace, namespaceName)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_IMPORT_1_1, - NULL, NULL, node, + NULL, node, "The value of the attribute 'namespace' must not match " "the target namespace '%s' of the importing schema", - pctxt->targetNamespace); + thisTargetNamespace); return (pctxt->err); } } else { @@ -9896,10 +10735,10 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, * 1.2 If the namespace [attribute] is not present, then the enclosing * <schema> must have a targetNamespace [attribute]. */ - if (pctxt->targetNamespace == NULL) { + if (thisTargetNamespace == NULL) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_IMPORT_1_2, - NULL, NULL, node, + NULL, node, "The attribute 'namespace' must be existent if " "the importing schema has no target namespace", NULL); @@ -9907,13 +10746,13 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, } } /* - * Locate and aquire the schema document. + * Locate and acquire the schema document. */ if (schemaLocation != NULL) schemaLocation = xmlSchemaBuildAbsoluteURI(pctxt->dict, schemaLocation, node); ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT, - schemaLocation, NULL, NULL, 0, node, pctxt->targetNamespace, + schemaLocation, NULL, NULL, 0, node, thisTargetNamespace, namespaceName, &bucket); if (ret != 0) @@ -9965,17 +10804,15 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(pctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(pctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id"); /* * Preliminary step, extract the URI-Reference and make an URI * from the base. @@ -9988,7 +10825,7 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, xmlChar *base = NULL; xmlChar *uri = NULL; - if (xmlSchemaPValAttrNode(pctxt, NULL, NULL, attr, + if (xmlSchemaPValAttrNode(pctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), (const xmlChar **) schemaLocation) != 0) goto exit_error; @@ -10019,13 +10856,13 @@ xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt, if (type == XML_SCHEMA_SCHEMA_REDEFINE) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, + NULL, node, "The schema document '%s' cannot redefine itself.", *schemaLocation); } else { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_INCLUDE, - NULL, NULL, node, + NULL, node, "The schema document '%s' cannot include itself.", *schemaLocation); } @@ -10047,7 +10884,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, { xmlNodePtr child = NULL; const xmlChar *schemaLocation = NULL; - int res = 0, /* docRes = 0, located = 0, */ hasRedefinitions = 0; + int res = 0; /* hasRedefinitions = 0 */ int isChameleon = 0, wasChameleon = 0; xmlSchemaBucketPtr bucket = NULL; @@ -10070,12 +10907,10 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, if (res != 0) return(res); /* - if (bucket == NULL) { - PERROR_INT("xmlSchemaParseIncludeOrRedefine", - "no schema bucket aquired"); - return(-1); - } - */ + * If we get no schema bucket back, then this means that the schema + * document could not be located or was broken XML or was not + * a schema document. + */ if ((bucket == NULL) || (bucket->doc == NULL)) { if (type == XML_SCHEMA_SCHEMA_INCLUDE) { /* @@ -10139,7 +10974,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, /* TODO: Change error function. */ xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_SRC_INCLUDE, - NULL, NULL, node, + NULL, node, "The target namespace '%s' of the included/redefined " "schema '%s' differs from '%s' of the " "including/redefining schema", @@ -10186,11 +11021,11 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, * And now for the children... */ child = node->children; - if (type == XML_SCHEMA_SCHEMA_REDEFINE) { - + if (type == XML_SCHEMA_SCHEMA_REDEFINE) { /* * Parse (simpleType | complexType | group | attributeGroup))* */ + pctxt->redefined = bucket; /* * How to proceed if the redefined schema was not located? */ @@ -10204,30 +11039,23 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, /* * TODO: discard or not? */ - } else if (bucket && bucket->parsed) { - /* - * TODO: Not nice: we won't parse the stuff if the redefined - * document was not parsed or not located. - */ - if (IS_SCHEMA(child, "simpleType")) { - xmlSchemaParseSimpleType(pctxt, schema, child, 1); - } else if (IS_SCHEMA(child, "complexType")) { - xmlSchemaParseComplexType(pctxt, schema, child, 1); - hasRedefinitions = 1; - } else if (IS_SCHEMA(child, "group")) { - TODO - hasRedefinitions = 1; - /* xmlSchemaParseModelGroupDefinition(pctxt, - schema, child); */ - } else if (IS_SCHEMA(child, "attributeGroup")) { - TODO - hasRedefinitions = 1; - /* xmlSchemaParseAttributeGroup(pctxt, schema, - child, 1); */ - } + } else if (IS_SCHEMA(child, "simpleType")) { + xmlSchemaParseSimpleType(pctxt, schema, child, 1); + } else if (IS_SCHEMA(child, "complexType")) { + xmlSchemaParseComplexType(pctxt, schema, child, 1); + /* hasRedefinitions = 1; */ + } else if (IS_SCHEMA(child, "group")) { + /* hasRedefinitions = 1; */ + xmlSchemaParseModelGroupDefinition(pctxt, + schema, child); + } else if (IS_SCHEMA(child, "attributeGroup")) { + /* hasRedefinitions = 1; */ + xmlSchemaParseAttributeGroupDefinition(pctxt, schema, + child); } child = child->next; } + pctxt->redefined = NULL; pctxt->isRedefine = 0; } else { if (IS_SCHEMA(child, "annotation")) { @@ -10241,11 +11069,11 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt, res = XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED; if (type == XML_SCHEMA_SCHEMA_REDEFINE) { xmlSchemaPContentErr(pctxt, res, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation | (simpleType | complexType | group | attributeGroup))*"); } else { xmlSchemaPContentErr(pctxt, res, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?)"); } } @@ -10292,7 +11120,18 @@ xmlSchemaParseInclude(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema, * @type: the "compositor" type * @particleNeeded: if a a model group with a particle * - * parse a XML schema Sequence definition + * parse a XML schema Sequence definition. + * Applies parts of: + * Schema Representation Constraint: + * Redefinition Constraints and Semantics (src-redefine) + * (6.1), (6.1.1), (6.1.2) + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) (2) + * TODO: Actually this should go to component-level checks, + * but is done here due to performance. Move it to an other layer + * is schema construction via an API is implemented. + * * *WARNING* this interface is highly subject to change * * Returns -1 in case of error, 0 if the declaration is improper and @@ -10307,7 +11146,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaParticlePtr particle = NULL; xmlNodePtr child = NULL; xmlAttrPtr attr; - int min = 0, max = 0; + int min = 1, max = 1, isElemRef, hasRefs = 0; if ((ctxt == NULL) || (schema == NULL) || (node == NULL)) return (NULL); @@ -10346,13 +11185,11 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) && (!xmlStrEqual(attr->name, BAD_CAST "minOccurs"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -10365,29 +11202,26 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (attr->ns == NULL) { if (!xmlStrEqual(attr->name, BAD_CAST "id")) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - } /* * Extract and validate attributes. */ - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - item->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + item->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } if (type == XML_SCHEMA_TYPE_ALL) { @@ -10395,17 +11229,33 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, while (IS_SCHEMA(child, "element")) { part = (xmlSchemaParticlePtr) xmlSchemaParseElement(ctxt, - schema, child, 0); + schema, child, &isElemRef, 0); + /* + * SPEC cos-all-limited (2) + * "The {max occurs} of all the particles in the {particles} + * of the ('all') group must be 0 or 1. + */ if (part != NULL) { - if (part->minOccurs > 1) - xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MINOCCURS, - NULL, NULL, child, - "Invalid value for minOccurs (must be 0 or 1)", NULL); - if (part->maxOccurs > 1) - xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INVALID_MAXOCCURS, - NULL, NULL, child, + if (isElemRef) + hasRefs++; + if (part->minOccurs > 1) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_COS_ALL_LIMITED, + NULL, child, + "Invalid value for minOccurs (must be 0 or 1)", + NULL); + /* Reset to 1. */ + part->minOccurs = 1; + } + if (part->maxOccurs > 1) { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_COS_ALL_LIMITED, + NULL, child, "Invalid value for maxOccurs (must be 0 or 1)", NULL); + /* Reset to 1. */ + part->maxOccurs = 1; + } if (last == NULL) item->children = (xmlSchemaTreeItemPtr) part; else @@ -10417,7 +11267,7 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (annotation?, element*)"); } } else { @@ -10432,10 +11282,76 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (IS_SCHEMA(child, "element")) { part = (xmlSchemaTreeItemPtr) - xmlSchemaParseElement(ctxt, schema, child, 0); + xmlSchemaParseElement(ctxt, schema, child, &isElemRef, 0); + if (part && isElemRef) + hasRefs++; } else if (IS_SCHEMA(child, "group")) { part = xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + if (part != NULL) + hasRefs++; + /* + * Handle redefinitions. + */ + if (ctxt->isRedefine && ctxt->redef && + (ctxt->redef->item->type == XML_SCHEMA_TYPE_GROUP) && + part && part->children) + { + if ((xmlSchemaGetQNameRefName(part->children) == + ctxt->redef->refName) && + (xmlSchemaGetQNameRefTargetNs(part->children) == + ctxt->redef->refTargetNs)) + { + /* + * SPEC src-redefine: + * (6.1) "If it has a <group> among its contents at + * some level the ·actual value· of whose ref + * [attribute] is the same as the ·actual value· of + * its own name attribute plus target namespace, then + * all of the following must be true:" + * (6.1.1) "It must have exactly one such group." + */ + if (ctxt->redefCounter != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_SRC_REDEFINE, child, NULL, + "The redefining model group definition " + "'%s' must not contain more than one " + "reference to the redefined definition", + xmlSchemaFormatQName(&str, + ctxt->redef->refTargetNs, + ctxt->redef->refName), + NULL); + FREE_AND_NULL(str) + part = NULL; + } else if (((WXS_PARTICLE(part))->minOccurs != 1) || + ((WXS_PARTICLE(part))->maxOccurs != 1)) + { + xmlChar *str = NULL; + /* + * SPEC src-redefine: + * (6.1.2) "The ·actual value· of both that + * group's minOccurs and maxOccurs [attribute] + * must be 1 (or ·absent·). + */ + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_SRC_REDEFINE, child, NULL, + "The redefining model group definition " + "'%s' must not contain a reference to the " + "redefined definition with a " + "maxOccurs/minOccurs other than 1", + xmlSchemaFormatQName(&str, + ctxt->redef->refTargetNs, + ctxt->redef->refName), + NULL); + FREE_AND_NULL(str) + part = NULL; + } + ctxt->redef->reference = WXS_BASIC_CAST part; + ctxt->redefCounter++; + } + } } else if (IS_SCHEMA(child, "any")) { part = (xmlSchemaTreeItemPtr) xmlSchemaParseAny(ctxt, schema, child); @@ -10458,16 +11374,21 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (element | group | choice | sequence | any)*)"); } } - if (withParticle) { - if ((min == 0) && (max == 0)) - return (NULL); - else - return ((xmlSchemaTreeItemPtr) particle); - } else + if ((max == 0) && (min == 0)) + return (NULL); + if (hasRefs) { + /* + * We need to resolve references. + */ + WXS_ADD_PENDING(ctxt, item); + } + if (withParticle) + return ((xmlSchemaTreeItemPtr) particle); + else return ((xmlSchemaTreeItemPtr) item); } @@ -10505,20 +11426,18 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "base"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } /* * Extract and validate attributes. */ - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute */ @@ -10531,21 +11450,20 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * the {content type} of the type definition ·resolved· to by * the ·actual value· of the base [attribute]" */ - if (xmlSchemaPValAttrQName(ctxt, schema, - NULL, NULL, node, "base", + if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base", &(type->baseNs), &(type->base)) == 0) { if ((type->base == NULL) && (type->type == XML_SCHEMA_TYPE_COMPLEX)) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - type, node, "base", NULL); + NULL, node, "base", NULL); } else if ((ctxt->isRedefine) && (type->flags & XML_SCHEMAS_TYPE_GLOBAL)) { if (type->base == NULL) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, - type, node, "base", NULL); + NULL, node, "base", NULL); } else if ((! xmlStrEqual(type->base, type->name)) || (! xmlStrEqual(type->baseNs, type->targetNamespace))) { @@ -10558,7 +11476,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * of its own name attribute plus target namespace;" */ xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, but the QName " + NULL, node, "This is a redefinition, but the QName " "value '%s' of the 'base' attribute does not match the " "type's designation '%s'", xmlSchemaFormatQName(&str1, type->baseNs, type->base), @@ -10566,6 +11484,9 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, type->name), NULL); FREE_AND_NULL(str1); FREE_AND_NULL(str2); + /* Avoid confusion and erase the values. */ + type->base = NULL; + type->baseNs = NULL; } } } @@ -10578,7 +11499,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the simple type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (parentType == XML_SCHEMA_TYPE_SIMPLE) { @@ -10594,7 +11515,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, - NULL, NULL, node, child, + NULL, node, child, "The attribute 'base' and the <simpleType> child are " "mutually exclusive", NULL); } else { @@ -10605,7 +11526,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (type->base == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, - NULL, NULL, node, child, + NULL, node, child, "Either the attribute 'base' or a <simpleType> child " "must be present", NULL); } @@ -10634,9 +11555,13 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Model group reference <group>. */ - } else if (IS_SCHEMA(child, "group")) { + } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) { @@ -10728,7 +11653,10 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute uses/declarations. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1) + return(NULL); /* * Attribute wildcard. */ @@ -10742,13 +11670,13 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "annotation?, (group | all | choice | sequence)?, " "((attribute | attributeGroup)*, anyAttribute?))"); } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (simpleType?, (minExclusive | minInclusive | " "maxExclusive | maxInclusive | totalDigits | fractionDigits | " "length | minLength | maxLength | enumeration | whiteSpace | " @@ -10757,7 +11685,7 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* Simple type */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (simpleType?, (minExclusive | minInclusive | " "maxExclusive | maxInclusive | totalDigits | fractionDigits | " "length | minLength | maxLength | enumeration | whiteSpace | " @@ -10802,24 +11730,22 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if ((!xmlStrEqual(attr->name, BAD_CAST "id")) && (!xmlStrEqual(attr->name, BAD_CAST "base"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Attribute "base" - mandatory. */ - if ((xmlSchemaPValAttrQName(ctxt, schema, - NULL, NULL, node, "base", &(type->baseNs), &(type->base)) == 0) && + if ((xmlSchemaPValAttrQName(ctxt, schema, NULL, node, + "base", &(type->baseNs), &(type->base)) == 0) && (type->base == NULL)) { xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, @@ -10834,7 +11760,7 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, * Add the annotation to the type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) { @@ -10861,6 +11787,10 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } } @@ -10868,7 +11798,10 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute uses/declarations. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_EXTENSION, NULL) == -1) + return(NULL); /* * Attribute wildcard. */ @@ -10883,14 +11816,14 @@ xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* Complex content extension. */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, ((group | all | choice | sequence)?, " "((attribute | attributeGroup)*, anyAttribute?)))"); } else { /* Simple content extension. */ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, ((attribute | attributeGroup)*, " "anyAttribute?))"); } @@ -10933,18 +11866,16 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, if (attr->ns == NULL) { if ((!xmlStrEqual(attr->name, BAD_CAST "id"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * And now for the children... @@ -10955,19 +11886,19 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the complex type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (IS_SCHEMA(child, "restriction")) { @@ -10984,7 +11915,7 @@ xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, NULL, + NULL, node, child, NULL, "(annotation?, (restriction | extension))"); } return (0); @@ -11026,23 +11957,21 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, (!xmlStrEqual(attr->name, BAD_CAST "mixed"))) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, NULL, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } - xmlSchemaPValAttrID(ctxt, NULL, NULL, node, BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); /* * Set the 'mixed' on the complex type ancestor. */ - if (xmlGetBooleanProp(ctxt, NULL, NULL, node, "mixed", 0)) { + if (xmlGetBooleanProp(ctxt, node, "mixed", 0)) { if ((type->flags & XML_SCHEMAS_TYPE_MIXED) == 0) type->flags |= XML_SCHEMAS_TYPE_MIXED; } @@ -11052,19 +11981,19 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, * Add the annotation to the complex type ancestor. */ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type, - xmlSchemaParseAnnotation(ctxt, schema, child)); + xmlSchemaParseAnnotation(ctxt, schema, child, 1)); child = child->next; } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (child == NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING, - NULL, NULL, node, NULL, + NULL, node, NULL, NULL, "(annotation?, (restriction | extension))"); } if (IS_SCHEMA(child, "restriction")) { @@ -11081,7 +12010,7 @@ xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, NULL, node, child, + NULL, node, child, NULL, "(annotation?, (restriction | extension))"); } return (0); @@ -11124,8 +12053,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaPMissingAttrErr(ctxt, XML_SCHEMAP_S4S_ATTR_MISSING, NULL, node, "name", NULL); return (NULL); - } else if (xmlSchemaPValAttrNode(ctxt, - NULL, NULL, attr, + } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr, xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) { return (NULL); } @@ -11137,11 +12065,14 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 39, "#CT%d", ctxt->counter++ + 1); - type = xmlSchemaAddType(ctxt, schema, (const xmlChar *)buf, + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1), ctxt->targetNamespace, node, 0); #else - type = xmlSchemaAddType(ctxt, schema, NULL, - ctxt->targetNamespace, node, 0); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + NULL, ctxt->targetNamespace, node, 0); #endif if (type == NULL) return (NULL); @@ -11155,8 +12086,9 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Parse as global complex type definition. */ - type = xmlSchemaAddType(ctxt, schema, name, ctxt->targetNamespace, - node, 1); + type = xmlSchemaAddType(ctxt, schema, + XML_SCHEMA_TYPE_COMPLEX, + name, ctxt->targetNamespace, node, 1); if (type == NULL) return (NULL); type->node = node; @@ -11174,14 +12106,13 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute "id". */ - xmlSchemaPValAttrID(ctxt, NULL, type, node, - BAD_CAST "id"); + xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id"); } else if (xmlStrEqual(attr->name, BAD_CAST "mixed")) { /* * Attribute "mixed". */ - if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type, - (xmlNodePtr) attr)) + if (xmlSchemaPGetBoolNodeValue(ctxt, + NULL, (xmlNodePtr) attr)) type->flags |= XML_SCHEMAS_TYPE_MIXED; } else if (topLevel) { /* @@ -11193,8 +12124,8 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, /* * Attribute "abstract". */ - if (xmlSchemaPGetBoolNodeValue(ctxt, NULL, type, - (xmlNodePtr) attr)) + if (xmlSchemaPGetBoolNodeValue(ctxt, + NULL, (xmlNodePtr) attr)) type->flags |= XML_SCHEMAS_TYPE_ABSTRACT; } else if (xmlStrEqual(attr->name, BAD_CAST "final")) { /* @@ -11211,7 +12142,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, NULL, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction))", attrValue, NULL, NULL, NULL); } else @@ -11229,25 +12160,22 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, -1, -1, -1) != 0) { xmlSchemaPSimpleTypeErr(ctxt, XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - type, (xmlNodePtr) attr, NULL, + NULL, (xmlNodePtr) attr, NULL, "(#all | List of (extension | restriction)) ", attrValue, NULL, NULL, NULL); } else block = 1; } else { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else { xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) { - xmlSchemaPIllegalAttrErr(ctxt, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - NULL, type, attr); + xmlSchemaPIllegalAttrErr(ctxt, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr); } attr = attr->next; } @@ -11274,7 +12202,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ child = node->children; if (IS_SCHEMA(child, "annotation")) { - type->annot = xmlSchemaParseAnnotation(ctxt, schema, child); + type->annot = xmlSchemaParseAnnotation(ctxt, schema, child, 1); child = child->next; } ctxt->ctxtType = type; @@ -11331,12 +12259,19 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, } else if (IS_SCHEMA(child, "group")) { type->subtypes = (xmlSchemaTypePtr) xmlSchemaParseModelGroupDefRef(ctxt, schema, child); + /* + * Note that the reference will be resolved in + * xmlSchemaResolveTypeReferences(); + */ child = child->next; } /* * Parse attribute decls/refs. */ - child = xmlSchemaParseAttrDecls(ctxt, schema, child, type); + if (xmlSchemaParseLocalAttributes(ctxt, schema, &child, + (xmlSchemaItemListPtr *) &(type->attrUses), + XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1) + return(NULL); /* * Parse attribute wildcard. */ @@ -11348,7 +12283,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, if (child != NULL) { xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - NULL, type, node, child, + NULL, node, child, NULL, "(annotation?, (simpleContent | complexContent | " "((group | all | choice | sequence)?, ((attribute | " "attributeGroup)*, anyAttribute?))))"); @@ -11358,7 +12293,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, */ if (topLevel && ctxt->isRedefine && (! hasRestrictionOrExtension)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE, - NULL, NULL, node, "This is a redefinition, thus the " + NULL, node, "This is a redefinition, thus the " "<complexType> must have a <restriction> or <extension> " "grand-child", NULL); } @@ -11527,6 +12462,8 @@ xmlSchemaFreeParserCtxt(xmlSchemaParserCtxtPtr ctxt) ctxt->constructor = NULL; ctxt->ownsConstructor = 0; } + if (ctxt->attrProhibs != NULL) + xmlSchemaItemListFree(ctxt->attrProhibs); xmlDictFree(ctxt->dict); xmlFree(ctxt); } @@ -11555,7 +12492,7 @@ xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt, end = xmlAutomataNewState(pctxt->am); substGroup = xmlSchemaSubstGroupGet(pctxt, elemDecl); if (substGroup == NULL) { - xmlSchemaPErr(pctxt, GET_NODE(particle), + xmlSchemaPErr(pctxt, WXS_ITEM_NODE(particle), XML_SCHEMAP_INTERNAL, "Internal error: xmlSchemaBuildContentModelForSubstGroup, " "declaration is marked having a subst. group but none " @@ -11658,10 +12595,11 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, } else if ((particle->maxOccurs >= UNBOUNDED) && (particle->minOccurs < 2)) { /* Special case. */ - start = ctxt->state; + start = ctxt->state; ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL, - elemDecl->name, elemDecl->targetNamespace, elemDecl); - xmlAutomataNewEpsilon(ctxt->am, ctxt->state, start); + elemDecl->name, elemDecl->targetNamespace, elemDecl); + ctxt->state = xmlAutomataNewTransition2(ctxt->am, ctxt->state, ctxt->state, + elemDecl->name, elemDecl->targetNamespace, elemDecl); } else { int counter; int maxOccurs = particle->maxOccurs == UNBOUNDED ? @@ -11688,7 +12626,8 @@ xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt, * @particle: the particle component * @name: the complex type's name whose content is being built * - * Generate the automata sequence needed for that type + * Create the automaton for the {content type} of a complex type. + * */ static void xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, @@ -11699,7 +12638,10 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, return; } if (particle->children == NULL) { - PERROR_INT("xmlSchemaBuildAContentModel", "no term on particle"); + /* + * Just return in this case. A missing "term" of the particle + * might arise due to an invalid "term" component. + */ return; } @@ -12037,7 +12979,7 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt, xmlSchemaInternalErr2(ACTXT_CAST pctxt, "xmlSchemaBuildAContentModel", "found unexpected term of type '%s' in content model", - xmlSchemaCompTypeToString(particle->children->type), NULL); + WXS_ITEM_TYPE_NAME(particle->children), NULL); return; } } @@ -12054,8 +12996,6 @@ static void xmlSchemaBuildContentModel(xmlSchemaTypePtr type, xmlSchemaParserCtxtPtr ctxt) { - xmlAutomataStatePtr start; - if ((type->type != XML_SCHEMA_TYPE_COMPLEX) || (type->contModel != NULL) || ((type->contentType != XML_SCHEMA_CONTENT_ELEMENTS) && @@ -12066,27 +13006,30 @@ xmlSchemaBuildContentModel(xmlSchemaTypePtr type, xmlGenericError(xmlGenericErrorContext, "Building content model for %s\n", name); #endif - + ctxt->am = NULL; ctxt->am = xmlNewAutomata(); if (ctxt->am == NULL) { xmlGenericError(xmlGenericErrorContext, "Cannot create automata for complex type %s\n", type->name); return; } - start = ctxt->state = xmlAutomataGetInitState(ctxt->am); - xmlSchemaBuildAContentModel(ctxt, (xmlSchemaParticlePtr) type->subtypes); + ctxt->state = xmlAutomataGetInitState(ctxt->am); + /* + * Build the automaton. + */ + xmlSchemaBuildAContentModel(ctxt, WXS_TYPE_PARTICLE(type)); xmlAutomataSetFinalState(ctxt->am, ctxt->state); type->contModel = xmlAutomataCompile(ctxt->am); if (type->contModel == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "Failed to compile the content model", NULL); } else if (xmlRegexpIsDeterminist(type->contModel) != 1) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_NOT_DETERMINISTIC, /* XML_SCHEMAS_ERR_NOTDETERMINIST, */ - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "The content model is not determinist", NULL); } else { #ifdef DEBUG_CONTENT_REGEXP @@ -12130,7 +13073,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, if (type == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, elemDecl->node, "type", elemDecl->namedType, elemDecl->namedTypeNs, XML_SCHEMA_TYPE_BASIC, "type definition"); } else @@ -12148,7 +13091,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, if (substHead == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) elemDecl, NULL, + WXS_BASIC_CAST elemDecl, NULL, "substitutionGroup", elemDecl->substGroup, elemDecl->substGroupNs, XML_SCHEMA_TYPE_ELEMENT, NULL); } else { @@ -12157,7 +13100,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl, * Set the "substitution group affiliation". * NOTE that now we use the "refDecl" field for this. */ - SUBST_GROUP_AFF(elemDecl) = substHead; + WXS_SUBST_HEAD(elemDecl) = substHead; /* * The type definitions is set to: * SPEC "...the {type definition} of the element @@ -12216,9 +13159,9 @@ xmlSchemaResolveUnionMemberTypes(xmlSchemaParserCtxtPtr ctxt, nsName = ((xmlSchemaQNameRefPtr) link->type)->targetNamespace; memberType = xmlSchemaGetType(ctxt->schema, name, nsName); - if ((memberType == NULL) || (! IS_SIMPLE_TYPE(memberType))) { + if ((memberType == NULL) || (! WXS_IS_SIMPLE(memberType))) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - type, type->node, "memberTypes", + WXS_BASIC_CAST type, type->node, "memberTypes", name, nsName, XML_SCHEMA_TYPE_SIMPLE, NULL); /* * Remove the member type link. @@ -12273,7 +13216,7 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) { if (type == NULL) return (0); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (0); if (type->type == XML_SCHEMA_TYPE_BASIC) { if (type->builtInType == valType) @@ -12282,10 +13225,8 @@ xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) (type->builtInType == XML_SCHEMAS_ANYTYPE)) return (0); return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); - } else - return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); - - return (0); + } + return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); } #if 0 @@ -12304,7 +13245,7 @@ xmlSchemaIsUserDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) { if (type == NULL) return (0); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (0); if (type->type == XML_SCHEMA_TYPE_BASIC) { if (type->builtInType == valType) @@ -12322,14 +13263,11 @@ xmlSchemaQueryBuiltInType(xmlSchemaTypePtr type) { if (type == NULL) return (NULL); - if (IS_COMPLEX_TYPE(type)) + if (WXS_IS_COMPLEX(type)) return (NULL); if (type->type == XML_SCHEMA_TYPE_BASIC) - return(type); - else - return(xmlSchemaQueryBuiltInType(type->subtypes)); - - return (NULL); + return(type); + return(xmlSchemaQueryBuiltInType(type->subtypes)); } /** @@ -12368,7 +13306,7 @@ xmlSchemaGetPrimitiveType(xmlSchemaTypePtr type) static xmlSchemaTypePtr xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type) { - if (VARIETY_LIST(type) || VARIETY_UNION(type)) + if (WXS_IS_LIST(type) || WXS_IS_UNION(type)) return (0); while (type != NULL) { if (type->type == XML_SCHEMA_TYPE_BASIC) @@ -12381,73 +13319,6 @@ xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type) #endif /** - * xmlSchemaBuildAttributeUsesOwned: - * @ctxt: the schema parser context - * @type: the complex type definition - * @cur: the attribute declaration list - * @lastUse: the top of the attribute use list - * - * Builds the attribute uses list on the given complex type. - * This one is supposed to be called by - * xmlSchemaBuildAttributeValidation only. - */ -static int -xmlSchemaBuildAttributeUsesOwned(xmlSchemaParserCtxtPtr ctxt, - int isRestriction, - xmlSchemaAttributePtr cur, - xmlSchemaAttributeLinkPtr *uses, - xmlSchemaAttributeLinkPtr *lastUse, - int *hasProhibitions) -{ - xmlSchemaAttributeLinkPtr tmp; - while (cur != NULL) { - if (cur->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - /* - * W3C: "2 The {attribute uses} of the attribute groups ·resolved· - * to by the ·actual value·s of the ref [attribute] of the - * <attributeGroup> [children], if any." - */ - if (xmlSchemaBuildAttributeUsesOwned(ctxt, isRestriction, - ((xmlSchemaAttributeGroupPtr) cur)->attributes, uses, - lastUse, hasProhibitions) == -1) { - return (-1); - } - } else if ((! isRestriction) && - (cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)) { - /* - * Warn about pointless prohibitions when extending. - */ - xmlSchemaCustomWarning(ACTXT_CAST ctxt, - XML_SCHEMAP_WARN_ATTR_REDECL_PROH, - cur->node, NULL, - "Attribute use prohibitions are pointless when " - "extending a type", NULL, NULL, NULL); - } else { - /* W3C: "1 The set of attribute uses corresponding to the - * <attribute> [children], if any." - */ - tmp = (xmlSchemaAttributeLinkPtr) - xmlMalloc(sizeof(xmlSchemaAttributeLink)); - if (tmp == NULL) { - xmlSchemaPErrMemory(ctxt, "building attribute uses", NULL); - return (-1); - } - tmp->attr = cur; - tmp->next = NULL; - if (*uses == NULL) - *uses = tmp; - else - (*lastUse)->next = tmp; - *lastUse = tmp; - if (cur->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) - (*hasProhibitions)++; - } - cur = cur->next; - } - return (0); -} - -/** * xmlSchemaCloneWildcardNsConstraints: * @ctxt: the schema parser context * @dest: the destination wildcard @@ -12459,14 +13330,14 @@ xmlSchemaBuildAttributeUsesOwned(xmlSchemaParserCtxtPtr ctxt, */ static int xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaWildcardPtr *dest, + xmlSchemaWildcardPtr dest, xmlSchemaWildcardPtr source) { xmlSchemaWildcardNsPtr cur, tmp, last; - if ((source == NULL) || (*dest == NULL)) + if ((source == NULL) || (dest == NULL)) return(-1); - (*dest)->any = source->any; + dest->any = source->any; cur = source->nsSet; last = NULL; while (cur != NULL) { @@ -12475,21 +13346,21 @@ xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt, return(-1); tmp->value = cur->value; if (last == NULL) - (*dest)->nsSet = tmp; + dest->nsSet = tmp; else last->next = tmp; last = tmp; cur = cur->next; } - if ((*dest)->negNsSet != NULL) - xmlSchemaFreeWildcardNsSet((*dest)->negNsSet); + if (dest->negNsSet != NULL) + xmlSchemaFreeWildcardNsSet(dest->negNsSet); if (source->negNsSet != NULL) { - (*dest)->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt); - if ((*dest)->negNsSet == NULL) + dest->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt); + if (dest->negNsSet == NULL) return(-1); - (*dest)->negNsSet->value = source->negNsSet->value; + dest->negNsSet->value = source->negNsSet->value; } else - (*dest)->negNsSet = NULL; + dest->negNsSet = NULL; return(0); } @@ -12813,7 +13684,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt, * 2 If either O1 or O2 is any, then the other must be the value. */ if ((completeWild->any != curWild->any) && (completeWild->any)) { - if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1) + if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1) return(-1); return(0); } @@ -12829,7 +13700,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt, if (completeWild->nsSet == NULL) { neg = completeWild->negNsSet->value; - if (xmlSchemaCloneWildcardNsConstraints(ctxt, &completeWild, curWild) == -1) + if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1) return(-1); } else neg = curWild->negNsSet->value; @@ -13005,85 +13876,8 @@ xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub, return (1); } -/** - * xmlSchemaBuildCompleteAttributeWildcard: - * @ctxt: the schema parser context - * @attrs: the attribute list - * @completeWild: the resulting complete wildcard - * - * Returns -1 in case of an internal error, 0 otherwise. - */ -static int -xmlSchemaBuildCompleteAttributeWildcard(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaAttributePtr attrs, - xmlSchemaWildcardPtr *completeWild) -{ - while (attrs != NULL) { - if (attrs->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - xmlSchemaAttributeGroupPtr group; - - group = (xmlSchemaAttributeGroupPtr) attrs; - /* - * Handle attribute group references. - */ - if (group->ref != NULL) { - if (group->refItem == NULL) { - /* - * TODO: Should we raise a warning here? - */ - /* - * The referenced attribute group definition could not - * be resolved beforehand, so skip. - */ - attrs = attrs->next; - continue; - } else - group = group->refItem; - } - /* - * For every attribute group definition, an intersected wildcard - * will be created (assumed that a wildcard exists on the - * particular attr. gr. def. or on any contained attr. gr. def - * at all). - * The flag XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED ensures - * that the intersection will be performed only once. - */ - if ((group->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) { - if (group->attributes != NULL) { - if (xmlSchemaBuildCompleteAttributeWildcard(ctxt, - group->attributes, &group->attributeWildcard) == -1) - return (-1); - } - group->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED; - } - if (group->attributeWildcard != NULL) { - if (*completeWild == NULL) { - /* - * Copy the first encountered wildcard as context, except for the annotation. - * - * Although the complete wildcard might not correspond to any - * node in the schema, we will save this context node. - */ - *completeWild = xmlSchemaAddWildcard(ctxt, ctxt->schema, - XML_SCHEMA_TYPE_ANY_ATTRIBUTE, - group->attributeWildcard->node); - if (xmlSchemaCloneWildcardNsConstraints(ctxt, - completeWild, group->attributeWildcard) == -1) - return (-1); - (*completeWild)->processContents = group->attributeWildcard->processContents; - (*completeWild)->node = group->attributeWildcard->node; - } else if (xmlSchemaIntersectWildcards(ctxt, *completeWild, group->attributeWildcard) == -1) - return (-1); - } - } - attrs = attrs->next; - } - - return (0); -} - static int -xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, +xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributeUsePtr attruse, int *fixed, const xmlChar **value, xmlSchemaValPtr *val) @@ -13093,21 +13887,23 @@ xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, if (val != 0) *val = NULL; - if (item->defValue == NULL) - item = item->refDecl; - - if (item == NULL) - return (0); - - if (item->defValue != NULL) { - *value = item->defValue; - if (val != 0) - *val = item->defVal; - if (item->flags & XML_SCHEMAS_ATTR_FIXED) + if (attruse->defValue != NULL) { + *value = attruse->defValue; + if (val != NULL) + *val = attruse->defVal; + if (attruse->flags & XML_SCHEMA_ATTR_USE_FIXED) *fixed = 1; - return (1); + return(1); + } else if ((attruse->attrDecl != NULL) && + (attruse->attrDecl->defValue != NULL)) { + *value = attruse->attrDecl->defValue; + if (val != NULL) + *val = attruse->attrDecl->defVal; + if (attruse->attrDecl->flags & XML_SCHEMAS_ATTR_FIXED) + *fixed = 1; + return(1); } - return (0); + return(0); } /** * xmlSchemaCheckCVCWildcardNamespace: @@ -13117,9 +13913,8 @@ xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributePtr item, * Validation Rule: Wildcard allows Namespace Name * (cvc-wildcard-namespace) * - * - * Returns 1 if the given namespace matches the wildcard, - * 0 otherwise. + * Returns 0 if the given namespace matches the wildcard, + * 1 otherwise and -1 on API errors. */ static int xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild, @@ -13129,659 +13924,527 @@ xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild, return(-1); if (wild->any) - return(1); + return(0); else if (wild->nsSet != NULL) { xmlSchemaWildcardNsPtr cur; cur = wild->nsSet; while (cur != NULL) { if (xmlStrEqual(cur->value, ns)) - return(1); + return(0); cur = cur->next; } } else if ((wild->negNsSet != NULL) && (ns != NULL) && (!xmlStrEqual(wild->negNsSet->value, ns))) - return(1); + return(0); - return(0); + return(1); } -/** - * xmlSchemaBuildAttributeValidation: - * @ctxt: the schema parser context - * @type: the complex type definition - * - * - * Builds the wildcard and the attribute uses on the given complex type. - * Returns -1 if an internal error occurs, 0 otherwise. - */ -static int -xmlSchemaBuildAttributeValidation(xmlSchemaParserCtxtPtr pctxt, - xmlSchemaTypePtr type) -{ - xmlSchemaTypePtr baseType = NULL; - xmlSchemaAttributeLinkPtr cur, base, tmp, id = NULL, - prev = NULL, localUses = NULL, lastUse = NULL, lastBaseUse = NULL; - xmlSchemaAttributePtr attrs; - xmlSchemaTypePtr anyType; - xmlChar *str = NULL; - int err = 0, hasProhibitions = 0; +#define XML_SCHEMA_ACTION_DERIVE 0 +#define XML_SCHEMA_ACTION_REDEFINE 1 - anyType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE); - /* - * Complex Type Definition with complex content Schema Component. - * - * Attribute uses. - * TODO: Add checks for absent referenced attribute declarations and - * simple types. - */ - if (type->attributeUses != NULL) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "attribute uses already builded"); - return (-1); - } - if (type->baseType == NULL) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "no base type"); - return (-1); - } - baseType = type->baseType; - /* - * Gather attribute uses defined by this type. - */ - attrs = type->attributes; - if (attrs != NULL) { - if (xmlSchemaBuildAttributeUsesOwned(pctxt, - WXS_IS_RESTRICTION(type) ? 1 : 0, - attrs, - &localUses, &lastUse, &hasProhibitions) == -1) { - return (-1); - } - /* - * Handle attribute wildcards. - */ - err = xmlSchemaBuildCompleteAttributeWildcard(pctxt, - attrs, &type->attributeWildcard); - /* - * NOTE: During the parse time, the wildcard is created - * on the complexType directly, if encountered in a - * <restriction> or <extension> element. - */ - if (err == -1) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "failed to build an intersected attribute wildcard"); - return (-1); - } - } - - if (hasProhibitions) { - xmlSchemaAttributeLinkPtr tmpPrev = NULL; - /* - * Handle annoying pointless prohibitions. - * Note that this will be done for restrictions only, since - * prohibitions are not gathered for extensions. - */ - cur = localUses; +#define WXS_ACTION_STR(a) \ +((a) == XML_SCHEMA_ACTION_DERIVE) ? (const xmlChar *) "base" : (const xmlChar *) "redefined" -pointless_prohib_next: - while (cur != NULL) { - tmp = cur->next; - tmpPrev = cur; - while (tmp != NULL) { - if ( ((cur->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) && - (tmp->attr->occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED)) || - (xmlSchemaGetAttrName(cur->attr) != - xmlSchemaGetAttrName(tmp->attr)) || - (xmlSchemaGetAttrTargetNsURI(cur->attr) != - xmlSchemaGetAttrTargetNsURI(tmp->attr))) +/* +* Schema Component Constraint: +* Derivation Valid (Restriction, Complex) +* derivation-ok-restriction (2) - (4) +* +* ATTENTION: +* In XML Schema 1.1 this will be: +* Validation Rule: +* Checking complex type subsumption (practicalSubsumption) (1, 2 and 3) +* +*/ +static int +xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt, + int action, + xmlSchemaBasicItemPtr item, + xmlSchemaBasicItemPtr baseItem, + xmlSchemaItemListPtr uses, + xmlSchemaItemListPtr baseUses, + xmlSchemaWildcardPtr wild, + xmlSchemaWildcardPtr baseWild) +{ + xmlSchemaAttributeUsePtr cur = NULL, bcur; + int i, j, found; /* err = 0; */ + const xmlChar *bEffValue; + int effFixed; + + if (uses != NULL) { + for (i = 0; i < uses->nbItems; i++) { + cur = uses->items[i]; + found = 0; + if (baseUses == NULL) + goto not_found; + for (j = 0; j < baseUses->nbItems; j++) { + bcur = baseUses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(cur) == + WXS_ATTRUSE_DECL_NAME(bcur)) && + (WXS_ATTRUSE_DECL_TNS(cur) == + WXS_ATTRUSE_DECL_TNS(bcur))) { - tmpPrev = tmp; - tmp = tmp->next; - continue; - } - if (cur->attr->occurs == tmp->attr->occurs) { - xmlSchemaAttributeLinkPtr tmpFree; - /* - * Warn about duplicate prohibitions. - */ - xmlSchemaCustomWarning(ACTXT_CAST pctxt, - XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, - tmp->attr->node, NULL, - "Skipping duplicate prohibition " - "of attribute use '%s'", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(tmp->attr), - xmlSchemaGetAttrName(tmp->attr)), - NULL, NULL); - FREE_AND_NULL(str) - /* - * Remove the duplicate prohibition. - */ - tmpFree = tmp; - tmpPrev->next = tmp->next; - tmp = tmp->next; - xmlFree(tmpFree); - hasProhibitions--; - continue; - } else { - xmlSchemaAttributeLinkPtr tmpFree; - xmlSchemaAttributePtr reattr; - /* - * Annoying case: - * This is the case when we prohibited - * the base attribute decl in the previous - * step; i.e. when we prohibit and declare the - * same attribute in the same <complexType>. - */ - if (cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_PROHIBITED) - reattr = cur->attr; - else - reattr = tmp->attr; - xmlSchemaCustomWarning(ACTXT_CAST pctxt, - XML_SCHEMAP_WARN_ATTR_REDECL_PROH, - reattr->node, NULL, - "Skipping pointless prohibition of " - "attribute use '%s', since a corresponding " - "attribute was explicitely declared as well", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(reattr), - xmlSchemaGetAttrName(reattr)), - NULL, NULL); - FREE_AND_NULL(str); /* - * Remove the prohibition. + * (2.1) "If there is an attribute use in the {attribute + * uses} of the {base type definition} (call this B) whose + * {attribute declaration} has the same {name} and {target + * namespace}, then all of the following must be true:" */ - if (reattr == cur->attr) { - tmpFree = cur; - if (prev != NULL) - prev->next = cur->next; - else - localUses = cur->next; - cur = cur->next; - xmlFree(tmpFree); - hasProhibitions--; - goto pointless_prohib_next; + found = 1; + + if ((cur->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) && + (bcur->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED)) + { + xmlChar *str = NULL; + /* + * (2.1.1) "one of the following must be true:" + * (2.1.1.1) "B's {required} is false." + * (2.1.1.2) "R's {required} is true." + */ + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, + WXS_ITEM_NODE(item), item, cur, + "The 'optional' attribute use is inconsistent " + "with the corresponding 'required' attribute use of " + "the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ + } else if (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, + WXS_ATTRUSE_TYPEDEF(cur), + WXS_ATTRUSE_TYPEDEF(bcur), 0) != 0) + { + xmlChar *strA = NULL, *strB = NULL, *strC = NULL; + + /* + * SPEC (2.1.2) "R's {attribute declaration}'s + * {type definition} must be validly derived from + * B's {type definition} given the empty set as + * defined in Type Derivation OK (Simple) (§3.14.6)." + */ + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, + WXS_ITEM_NODE(item), item, cur, + "The attribute declaration's %s " + "is not validly derived from " + "the corresponding %s of the " + "attribute declaration in the %s %s", + xmlSchemaGetComponentDesignation(&strA, + WXS_ATTRUSE_TYPEDEF(cur)), + xmlSchemaGetComponentDesignation(&strB, + WXS_ATTRUSE_TYPEDEF(bcur)), + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&strC, baseItem)); + /* xmlSchemaGetComponentDesignation(&str, baseItem), */ + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + FREE_AND_NULL(strC); + /* err = pctxt->err; */ } else { - tmpFree = tmp; - tmpPrev->next = tmp->next; - tmp = tmp->next; - xmlFree(tmpFree); - hasProhibitions--; - continue; + /* + * 2.1.3 [Definition:] Let the effective value + * constraint of an attribute use be its {value + * constraint}, if present, otherwise its {attribute + * declaration}'s {value constraint} . + */ + xmlSchemaGetEffectiveValueConstraint(bcur, + &effFixed, &bEffValue, NULL); + /* + * 2.1.3 ... one of the following must be true + * + * 2.1.3.1 B's ·effective value constraint· is + * ·absent· or default. + */ + if ((bEffValue != NULL) && + (effFixed == 1)) { + const xmlChar *rEffValue = NULL; + + xmlSchemaGetEffectiveValueConstraint(bcur, + &effFixed, &rEffValue, NULL); + /* + * 2.1.3.2 R's ·effective value constraint· is + * fixed with the same string as B's. + * MAYBE TODO: Compare the computed values. + * Hmm, it says "same string" so + * string-equality might really be sufficient. + */ + if ((effFixed == 0) || + (! WXS_ARE_DEFAULT_STR_EQUAL(rEffValue, bEffValue))) + { + xmlChar *str = NULL; + + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, + WXS_ITEM_NODE(item), item, cur, + "The effective value constraint of the " + "attribute use is inconsistent with " + "its correspondent in the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, + baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ + } + } } + break; + } + } +not_found: + if (!found) { + /* + * (2.2) "otherwise the {base type definition} must have an + * {attribute wildcard} and the {target namespace} of the + * R's {attribute declaration} must be ·valid· with respect + * to that wildcard, as defined in Wildcard allows Namespace + * Name (§3.10.4)." + */ + if ((baseWild == NULL) || + (xmlSchemaCheckCVCWildcardNamespace(baseWild, + (WXS_ATTRUSE_DECL(cur))->targetNamespace) != 0)) + { + xmlChar *str = NULL; + + xmlSchemaPAttrUseErr4(pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, + WXS_ITEM_NODE(item), item, cur, + "Neither a matching attribute use, " + "nor a matching wildcard exists in the %s %s", + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&str, baseItem), + NULL, NULL); + FREE_AND_NULL(str); + /* err = pctxt->err; */ } - tmpPrev = tmp; - tmp = tmp->next; } - prev = cur; - cur = cur->next; } } - - /* 3.4.6 -> Complex Type Definition Properties Correct 4. - * "Two distinct attribute declarations in the {attribute uses} must - * not have identical {name}s and {target namespace}s." - * - * This is done here for <restriction>s. We will compare only the - * attr uses of the current type. - * For <extension>s this is done further down. + /* + * SPEC derivation-ok-restriction (3): + * (3) "For each attribute use in the {attribute uses} of the {base type + * definition} whose {required} is true, there must be an attribute + * use with an {attribute declaration} with the same {name} and + * {target namespace} as its {attribute declaration} in the {attribute + * uses} of the complex type definition itself whose {required} is true. */ - if ((localUses != NULL) && (localUses->next != NULL) && - (WXS_IS_RESTRICTION(type))) { - cur = localUses; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - cur = cur->next; + if (baseUses != NULL) { + for (j = 0; j < baseUses->nbItems; j++) { + bcur = baseUses->items[j]; + if (bcur->occurs != XML_SCHEMAS_ATTR_USE_REQUIRED) continue; - } - tmp = cur->next; - while (tmp != NULL) { - if (tmp->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - tmp = tmp->next; - continue; - } - if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(tmp->attr))) && - (xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(tmp->attr)))) { - /* - * Duplicate attr uses. - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_4, - type, cur->attr, - "Duplicate attribute use '%s' specified", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(tmp->attr), - xmlSchemaGetAttrName(tmp->attr))); - FREE_AND_NULL(str) - break; + found = 0; + if (uses != NULL) { + for (i = 0; i < uses->nbItems; i++) { + cur = uses->items[i]; + if ((WXS_ATTRUSE_DECL_NAME(cur) == + WXS_ATTRUSE_DECL_NAME(bcur)) && + (WXS_ATTRUSE_DECL_TNS(cur) == + WXS_ATTRUSE_DECL_TNS(bcur))) { + found = 1; + break; + } } - tmp = tmp->next; } - cur = cur->next; + if (!found) { + xmlChar *strA = NULL, *strB = NULL; + + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, + NULL, item, + "A matching attribute use for the " + "'required' %s of the %s %s is missing", + xmlSchemaGetComponentDesignation(&strA, bcur), + WXS_ACTION_STR(action), + xmlSchemaGetComponentDesignation(&strB, baseItem), + NULL); + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + } } } - /* - * Inherit the attribute uses of the base type, but leave out - * prohibited ones. - * NOTE: It is allowed to "extend" the anyType complex type. - */ - if (baseType->attributeUses != NULL) { - base = baseType->attributeUses; -inherit_start: - while (base != NULL) { - /* - * Check if prohibited. - */ - if (hasProhibitions) { - cur = localUses; - while (cur != NULL) { - if ((cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_PROHIBITED) && - xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(base->attr)) && - xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(base->attr))) - { - /* - * Don't inherit prohibited attr uses. - */ - if (base->attr->occurs == - XML_SCHEMAS_ATTR_USE_REQUIRED) { - /* - * derivation-ok-restriction 3 - * There won't be an attr use left if - * prohibiting the inherited one, so this - * will automatically violate required - * attr uses. - */ - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, - NULL, type, NULL, - "A matching attribute use for the " - "'required' attribute use '%s' of the " - "base type is missing", - xmlSchemaFormatQName(&str, - xmlSchemaGetAttrTargetNsURI(base->attr), - xmlSchemaGetAttrName(base->attr))); - FREE_AND_NULL(str) - } - base = base->next; - goto inherit_start; - } - cur = cur->next; - } - } - tmp = (xmlSchemaAttributeLinkPtr) - xmlMalloc(sizeof(xmlSchemaAttributeLink)); - if (tmp == NULL) { - xmlSchemaPErrMemory(pctxt, - "allocating attribute uses", NULL); - return (-1); - } - tmp->attr = base->attr; - tmp->next = NULL; - if (type->attributeUses == NULL) { - type->attributeUses = tmp; - } else - lastBaseUse->next = tmp; - lastBaseUse = tmp; - /* next */ - base = base->next; - } - } + * derivation-ok-restriction (4) + */ + if (wild != NULL) { + /* + * (4) "If there is an {attribute wildcard}, all of the + * following must be true:" + */ + if (baseWild == NULL) { + xmlChar *str = NULL; - if ((WXS_IS_EXTENSION(type)) && - ((IS_ANYTYPE(baseType)) || - ((baseType != NULL) && - (baseType->type == XML_SCHEMA_TYPE_COMPLEX) && - (baseType->attributeWildcard != NULL)))) { - if (type->attributeWildcard != NULL) { /* - * Union the complete wildcard with the base wildcard. - */ - if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard, - baseType->attributeWildcard) == -1) - return (-1); - } else { + * (4.1) "The {base type definition} must also have one." + */ + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, + NULL, item, + "The %s has an attribute wildcard, " + "but the %s %s '%s' does not have one", + WXS_ITEM_TYPE_NAME(item), + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem)); + FREE_AND_NULL(str); + return(pctxt->err); + } else if ((baseWild->any == 0) && + xmlSchemaCheckCOSNSSubset(wild, baseWild)) + { + xmlChar *str = NULL; /* - * Just inherit the wildcard. + * (4.2) "The complex type definition's {attribute wildcard}'s + * {namespace constraint} must be a subset of the {base type + * definition}'s {attribute wildcard}'s {namespace constraint}, + * as defined by Wildcard Subset (§3.10.6)." */ - /* - * NOTE: This is the only case where an attribute - * wildcard is shared. - */ - type->attributeWildcard = baseType->attributeWildcard; + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, + NULL, item, + "The attribute wildcard is not a valid " + "subset of the wildcard in the %s %s '%s'", + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem), + NULL); + FREE_AND_NULL(str); + return(pctxt->err); + } + /* 4.3 Unless the {base type definition} is the ·ur-type + * definition·, the complex type definition's {attribute + * wildcard}'s {process contents} must be identical to or + * stronger than the {base type definition}'s {attribute + * wildcard}'s {process contents}, where strict is stronger + * than lax is stronger than skip. + */ + if ((! WXS_IS_ANYTYPE(baseItem)) && + (wild->processContents < baseWild->processContents)) { + xmlChar *str = NULL; + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, + NULL, baseItem, + "The {process contents} of the attribute wildcard is " + "weaker than the one in the %s %s '%s'", + WXS_ACTION_STR(action), + WXS_ITEM_TYPE_NAME(baseItem), + xmlSchemaGetComponentQName(&str, baseItem), + NULL); + FREE_AND_NULL(str) + return(pctxt->err); } } + return(0); +} - if (WXS_IS_RESTRICTION(type)) { - if (type->attributeWildcard != NULL) { + +static int +xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBasicItemPtr item, + xmlSchemaWildcardPtr *completeWild, + xmlSchemaItemListPtr list, + xmlSchemaItemListPtr prohibs); +/** + * xmlSchemaFixupTypeAttributeUses: + * @ctxt: the schema parser context + * @type: the complex type definition + * + * + * Builds the wildcard and the attribute uses on the given complex type. + * Returns -1 if an internal error occurs, 0 otherwise. + * + * ATTENTION TODO: Experimantally this uses pointer comparisons for + * strings, so recheck this if we start to hardcode some schemata, since + * they might not be in the same dict. + * NOTE: It is allowed to "extend" the xs:anyType type. + */ +static int +xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaTypePtr type) +{ + xmlSchemaTypePtr baseType = NULL; + xmlSchemaAttributeUsePtr use; + xmlSchemaItemListPtr uses, baseUses, prohibs = NULL; + + if (type->baseType == NULL) { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "no base type"); + return (-1); + } + baseType = type->baseType; + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + if (xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt) == -1) + return(-1); + + uses = type->attrUses; + baseUses = baseType->attrUses; + /* + * Expand attribute group references. And build the 'complete' + * wildcard, i.e. intersect multiple wildcards. + * Move attribute prohibitions into a separate list. + */ + if (uses != NULL) { + if (WXS_IS_RESTRICTION(type)) { /* - * Derivation Valid (Restriction, Complex) - * 4.1 The {base type definition} must also have one. + * This one will transfer all attr. prohibitions + * into pctxt->attrProhibs. */ - if (baseType->attributeWildcard == NULL) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, - NULL, type, NULL, - "The type has an attribute wildcard, " - "but the base type %s does not have one", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); - } else if (xmlSchemaCheckCOSNSSubset( - type->attributeWildcard, baseType->attributeWildcard)) { - /* 4.2 */ - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, - NULL, type, NULL, - "The attribute wildcard is not a valid " - "subset of the wildcard in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); - } - /* 4.3 Unless the {base type definition} is the ·ur-type - * definition·, the complex type definition's {attribute - * wildcard}'s {process contents} must be identical to or - * stronger than the {base type definition}'s {attribute - * wildcard}'s {process contents}, where strict is stronger - * than lax is stronger than skip. - */ - if ((! IS_ANYTYPE(baseType)) && - (type->attributeWildcard->processContents < - baseType->attributeWildcard->processContents)) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, - NULL, type, NULL, - "The 'process contents' of the attribute wildcard is " - "weaker than the one in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); + if (xmlSchemaExpandAttributeGroupRefs(pctxt, + WXS_BASIC_CAST type, &(type->attributeWildcard), uses, + pctxt->attrProhibs) == -1) + { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "failed to expand attributes"); } - } - } else if (WXS_IS_EXTENSION(type)) { - /* - * Derivation Valid (Extension) - * At this point the type and the base have both, either - * no wildcard or a wildcard. - */ - if ((baseType->attributeWildcard != NULL) && - (baseType->attributeWildcard != type->attributeWildcard)) { - /* 1.3 */ - if (xmlSchemaCheckCOSNSSubset( - baseType->attributeWildcard, type->attributeWildcard)) { - xmlSchemaPCustomErr(pctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_3, - NULL, type, NULL, - "The attribute wildcard is not a valid " - "superset of the one in the base type %s", - xmlSchemaFormatItemForReport(&str, NULL, baseType, NULL)); - FREE_AND_NULL(str) - return (1); + if (pctxt->attrProhibs->nbItems != 0) + prohibs = pctxt->attrProhibs; + } else { + if (xmlSchemaExpandAttributeGroupRefs(pctxt, + WXS_BASIC_CAST type, &(type->attributeWildcard), uses, + NULL) == -1) + { + PERROR_INT("xmlSchemaFixupTypeAttributeUses", + "failed to expand attributes"); } } } - - if (localUses == NULL) { - /* PASS */ - } else if (WXS_IS_RESTRICTION(type)) { - /* - * Derive by restriction. At this point prohibited uses are already - * filtered out. - */ - if (IS_ANYTYPE(baseType)) { - type->attributeUses = localUses; - } else { - int found, valid; - const xmlChar *bEffValue; - int effFixed; + /* + * Inherit the attribute uses of the base type. + */ + if (baseUses != NULL) { + int i, j; + xmlSchemaAttributeUseProhibPtr pro; - cur = localUses; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - prev = cur; - cur = cur->next; - continue; - } - found = 0; - valid = 1; - base = type->attributeUses; - while (base != NULL) { - if (xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(base->attr)) && - xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr), - xmlSchemaGetAttrTargetNsURI(base->attr))) { + if (WXS_IS_RESTRICTION(type)) { + int usesCount; + xmlSchemaAttributeUsePtr tmp; - found = 1; - - if ((cur->attr->occurs == - XML_SCHEMAS_ATTR_USE_OPTIONAL) && - (base->attr->occurs == - XML_SCHEMAS_ATTR_USE_REQUIRED)) { - /* - * derivation-ok-restriction 2.1.1 - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, - type, cur->attr, - "The 'optional' use is inconsistent with a " - "matching 'required' use of the base type", - NULL); - } else if (xmlSchemaCheckCOSSTDerivedOK( - cur->attr->subtypes, base->attr->subtypes, 0) != 0) { - - /* - * SPEC (2.1.2) "R's {attribute declaration}'s - * {type definition} must be validly derived from - * B's {type definition} given the empty set as - * defined in Type Derivation OK (Simple) (§3.14.6)." - */ - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, - type, cur->attr, - "The attribute declaration's type " - "definition is not validly derived from " - "the corresponding definition in the " - "base type", NULL); - } else { - /* - * 2.1.3 [Definition:] Let the effective value - * constraint of an attribute use be its {value - * constraint}, if present, otherwise its {attribute - * declaration}'s {value constraint} . - */ - xmlSchemaGetEffectiveValueConstraint(base->attr, - &effFixed, &bEffValue, NULL); - /* - * 2.1.3 ... one of the following must be true - * - * 2.1.3.1 B's ·effective value constraint· is - * ·absent· or default. - */ - if ((bEffValue != NULL) && - (effFixed == 1)) { - const xmlChar *rEffValue = NULL; - - xmlSchemaGetEffectiveValueConstraint(base->attr, - &effFixed, &rEffValue, NULL); - /* - * 2.1.3.2 R's ·effective value constraint· is - * fixed with the same string as B's. - * TODO: Compare the computed values. - */ - if ((effFixed == 0) || - (! xmlStrEqual(rEffValue, bEffValue))) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, - type, cur->attr, - "The effective value constraint of the " - "attribute use is inconsistent with " - "its correspondent of the base type", - NULL); - } else { - /* - * Override the attribute use. - */ - base->attr = cur->attr; - } - } else - base->attr = cur->attr; - } + if (uses != NULL) + usesCount = uses->nbItems; + else + usesCount = 0; - break; + /* Restriction. */ + for (i = 0; i < baseUses->nbItems; i++) { + use = baseUses->items[i]; + if (prohibs) { + /* + * Filter out prohibited uses. + */ + for (j = 0; j < prohibs->nbItems; j++) { + pro = prohibs->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == pro->name) && + (WXS_ATTRUSE_DECL_TNS(use) == + pro->targetNamespace)) + { + goto inherit_next; + } } - base = base->next; } - - if (!found) { + if (usesCount) { /* - * derivation-ok-restriction 2.2 + * Filter out existing uses. */ - if ((baseType->attributeWildcard == NULL) || - (xmlSchemaCheckCVCWildcardNamespace( - baseType->attributeWildcard, - cur->attr->targetNamespace) != 1)) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, - type, cur->attr, - "Neither a matching attribute use, " - "nor a matching wildcard in the base type does exist", - NULL); - } else { - /* - * Add the attribute use. - * - * Note that this may lead to funny derivation error reports, if - * multiple equal attribute uses exist; but this is not - * allowed anyway, and it will be reported beforehand. - */ - tmp = cur; - if (prev != NULL) - prev->next = cur->next; - else - localUses = cur->next; - cur = cur->next; - tmp->next = NULL; - if (type->attributeUses == NULL) { - type->attributeUses = tmp; - } else - lastBaseUse->next = tmp; - lastBaseUse = tmp; - - continue; + for (j = 0; j < usesCount; j++) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + goto inherit_next; + } } } - prev = cur; - cur = cur->next; + if (uses == NULL) { + type->attrUses = xmlSchemaItemListCreate(); + if (type->attrUses == NULL) + goto exit_failure; + uses = type->attrUses; + } + xmlSchemaItemListAddSize(uses, 2, use); +inherit_next: {} + } + } else { + /* Extension. */ + for (i = 0; i < baseUses->nbItems; i++) { + use = baseUses->items[i]; + if (uses == NULL) { + type->attrUses = xmlSchemaItemListCreate(); + if (type->attrUses == NULL) + goto exit_failure; + uses = type->attrUses; + } + xmlSchemaItemListAddSize(uses, baseUses->nbItems, use); } - if (localUses != NULL) - xmlSchemaFreeAttributeUseList(localUses); } - } else if (WXS_IS_EXTENSION(type)) { - /* - * The spec allows only appending, and not other kinds of extensions. - * - * This ensures: Schema Component Constraint: Derivation Valid (Extension) : 1.2 - */ - if (localUses != NULL) { - if (type->attributeUses == NULL) { - type->attributeUses = localUses; - } else - lastBaseUse->next = localUses; + } + /* + * Shrink attr. uses. + */ + if (uses) { + if (uses->nbItems == 0) { + xmlSchemaItemListFree(uses); + type->attrUses = NULL; } - } else { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "no derivation method"); - return (-1); + /* + * TODO: We could shrink the size of the array + * to fit the actual number of items. + */ } /* - * 3.4.6 -> Complex Type Definition Properties Correct - */ - if (type->attributeUses != NULL) { - cur = type->attributeUses; - prev = NULL; - while (cur != NULL) { - if (cur->attr->occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) { - /* - * Remove "prohibited" attribute uses. The reason this is - * done at this late stage is to be able to catch - * dublicate attribute uses. So we had to keep prohibited - * uses in the list as well. - */ - tmp = cur; - if (prev == NULL) - type->attributeUses = cur->next; - else - prev->next = cur->next; - cur = cur->next; - xmlFree(tmp); - continue; - } + * Compute the complete wildcard. + */ + if (WXS_IS_EXTENSION(type)) { + if (baseType->attributeWildcard != NULL) { /* - * 4. Two distinct attribute declarations in the {attribute uses} must - * not have identical {name}s and {target namespace}s. - * - * Note that this was already done for "restriction" and types derived from - * the ur-type. + * (3.2.2.1) "If the ·base wildcard· is non-·absent·, then + * the appropriate case among the following:" */ - if (WXS_IS_EXTENSION(type)) { - tmp = cur->next; - while (tmp != NULL) { - if ((xmlStrEqual(xmlSchemaGetAttrName(cur->attr), - xmlSchemaGetAttrName(tmp->attr))) && - (xmlStrEqual(xmlSchemaGetAttrTargetNsURI(cur->attr ), - xmlSchemaGetAttrTargetNsURI(tmp->attr)))) { - - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_4, - type, tmp->attr, - "Duplicate attribute use specified", NULL); - break; - } - tmp = tmp->next; - } - } - + if (type->attributeWildcard != NULL) { + /* + * Union the complete wildcard with the base wildcard. + * SPEC {attribute wildcard} + * (3.2.2.1.2) "otherwise a wildcard whose {process contents} + * and {annotation} are those of the ·complete wildcard·, + * and whose {namespace constraint} is the intensional union + * of the {namespace constraint} of the ·complete wildcard· + * and of the ·base wildcard·, as defined in Attribute + * Wildcard Union (§3.10.6)." + */ + if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard, + baseType->attributeWildcard) == -1) + goto exit_failure; + } else { + /* + * (3.2.2.1.1) "If the ·complete wildcard· is ·absent·, + * then the ·base wildcard·." + */ + type->attributeWildcard = baseType->attributeWildcard; + } + } else { /* - * 5. Two distinct attribute declarations in the - * {attribute uses} must not have {type definition}s which - * are or are derived from ID. + * (3.2.2.2) "otherwise (the ·base wildcard· is ·absent·) the + * ·complete wildcard" + * NOOP */ - if ((cur->attr->subtypes != NULL) && - (xmlSchemaIsDerivedFromBuiltInType(cur->attr->subtypes, - XML_SCHEMAS_ID))) { - if (id != NULL) { - xmlSchemaPAttrUseErr(pctxt, - XML_SCHEMAP_CT_PROPS_CORRECT_5, - type, cur->attr, - "There must not exist more than one attribute " - "use, declared of type 'ID' or derived from it", - NULL); - FREE_AND_NULL(str) - } - id = cur; - } - prev = cur; - cur = cur->next; } + } else { + /* + * SPEC {attribute wildcard} + * (3.1) "If the <restriction> alternative is chosen, then the + * ·complete wildcard·;" + * NOOP + */ } - /* - * TODO: This check should be removed if we are 100% sure of - * the base type attribute uses already being built. - */ - if ((baseType != NULL) && (! IS_ANYTYPE(baseType)) && - (baseType->type == XML_SCHEMA_TYPE_COMPLEX) && - (IS_NOT_TYPEFIXED(baseType))) { - PERROR_INT("xmlSchemaBuildAttributeValidation", - "attribute uses not builded on base type"); - } + return (0); + +exit_failure: + return(-1); } /** @@ -13963,7 +14626,7 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) * SPEC (2) "Its {term} is a group and the minimum part of the * effective total range of that group, [...] is 0." */ - if (IS_MODEL_GROUP(particle->children)) { + if (WXS_IS_MODEL_GROUP(particle->children)) { if (xmlSchemaGetParticleTotalRangeMin(particle) == 0) return (1); } @@ -13972,8 +14635,10 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) /** * xmlSchemaCheckCOSSTDerivedOK: + * @actxt: a context * @type: the derived simple type definition * @baseType: the base type definition + * @subset: the subset of ('restriction', ect.) * * Schema Component Constraint: * Type Derivation OK (Simple) (cos-st-derived-OK) @@ -13984,7 +14649,8 @@ xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle) * Returns 0 on success, an positive error code otherwise. */ static int -xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int subset) { @@ -13997,7 +14663,18 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, /* * 2.1 restriction is not in the subset, or in the {final} * of its own {base type definition}; + * + * NOTE that this will be used also via "xsi:type". + * + * TODO: Revise this, it looks strange. How can the "type" + * not be fixed or *in* fixing? */ + if (WXS_IS_TYPE_NOT_FIXED(type)) + if (xmlSchemaTypeFixup(type, actxt) == -1) + return(-1); + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + if (xmlSchemaTypeFixup(baseType, actxt) == -1) + return(-1); if ((subset & SUBSET_RESTRICTION) || (xmlSchemaTypeFinalContains(type->baseType, XML_SCHEMAS_TYPE_FINAL_RESTRICTION))) { @@ -14015,8 +14692,8 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * and is validly derived from B given the subset, as defined by this * constraint. */ - if ((! IS_ANYTYPE(type->baseType)) && - (xmlSchemaCheckCOSSTDerivedOK(type->baseType, + if ((! WXS_IS_ANYTYPE(type->baseType)) && + (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType, baseType, subset) == 0)) { return (0); } @@ -14024,8 +14701,8 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * 2.2.3 D's {variety} is list or union and B is the ·simple ur-type * definition·. */ - if (IS_ANY_SIMPLE_TYPE(baseType) && - (VARIETY_LIST(type) || VARIETY_UNION(type))) { + if (WXS_IS_ANY_SIMPLE_TYPE(baseType) && + (WXS_IS_LIST(type) || WXS_IS_UNION(type))) { return (0); } /* @@ -14036,17 +14713,26 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaTypePtr type, * NOTE: This seems not to involve built-in types, since there is no * built-in Union Simple Type. */ - if (VARIETY_UNION(baseType)) { + if (WXS_IS_UNION(baseType)) { xmlSchemaTypeLinkPtr cur; cur = baseType->memberTypes; while (cur != NULL) { - if (xmlSchemaCheckCOSSTDerivedOK(type, cur->type, subset) == 0) + if (WXS_IS_TYPE_NOT_FIXED(cur->type)) + if (xmlSchemaTypeFixup(cur->type, actxt) == -1) + return(-1); + if (xmlSchemaCheckCOSSTDerivedOK(actxt, + type, cur->type, subset) == 0) + { + /* + * It just has to be validly derived from at least one + * member-type. + */ return (0); + } cur = cur->next; } } - return (XML_SCHEMAP_COS_ST_DERIVED_OK_2_2); } @@ -14075,7 +14761,7 @@ xmlSchemaCheckTypeDefCircularInternal(xmlSchemaParserCtxtPtr pctxt, if (ctxtType == ancestor) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_ST_PROPS_CORRECT_2, - NULL, ctxtType, GET_NODE(ctxtType), + WXS_BASIC_CAST ctxtType, WXS_ITEM_NODE(ctxtType), "The definition is circular", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_2); } @@ -14105,17 +14791,11 @@ xmlSchemaCheckTypeDefCircular(xmlSchemaTypePtr item, xmlSchemaParserCtxtPtr ctxt) { if ((item == NULL) || - ((item->type != XML_SCHEMA_TYPE_COMPLEX) && - (item->type != XML_SCHEMA_TYPE_SIMPLE))) + (item->type == XML_SCHEMA_TYPE_BASIC) || + (item->baseType == NULL)) return; - if (item->redef != NULL) { - xmlSchemaTypePtr cur = item; - do { - xmlSchemaCheckTypeDefCircularInternal(ctxt, cur, cur->baseType); - cur = cur->redef; - } while (cur != NULL); - } else - xmlSchemaCheckTypeDefCircularInternal(ctxt, item, item->baseType); + xmlSchemaCheckTypeDefCircularInternal(ctxt, item, + item->baseType); } /* @@ -14147,11 +14827,11 @@ xmlSchemaCheckUnionTypeDefCircularRecur(xmlSchemaParserCtxtPtr pctxt, if (memberType == ctxType) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_SRC_SIMPLE_TYPE_4, - NULL, ctxType, NULL, + WXS_BASIC_CAST ctxType, NULL, "The union type definition is circular", NULL); return (XML_SCHEMAP_SRC_SIMPLE_TYPE_4); } - if ((VARIETY_UNION(memberType)) && + if ((WXS_IS_UNION(memberType)) && ((memberType->flags & XML_SCHEMAS_TYPE_MARKED) == 0)) { int res; @@ -14174,7 +14854,7 @@ static int xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt, xmlSchemaTypePtr type) { - if (! VARIETY_UNION(type)) + if (! WXS_IS_UNION(type)) return(0); return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type, type->memberTypes)); @@ -14190,8 +14870,7 @@ xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt, */ static void xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) + xmlSchemaParserCtxtPtr ctxt) { if (typeDef == NULL) return; @@ -14205,38 +14884,103 @@ xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef, if (typeDef->baseType == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - typeDef, typeDef->node, + WXS_BASIC_CAST typeDef, typeDef->node, "base", typeDef->base, typeDef->baseNs, XML_SCHEMA_TYPE_SIMPLE, NULL); return; } } - if (IS_SIMPLE_TYPE(typeDef)) { - if (VARIETY_UNION(typeDef)) { + if (WXS_IS_SIMPLE(typeDef)) { + if (WXS_IS_UNION(typeDef)) { /* * Resolve the memberTypes. */ xmlSchemaResolveUnionMemberTypes(ctxt, typeDef); return; - } else if (VARIETY_LIST(typeDef)) { + } else if (WXS_IS_LIST(typeDef)) { /* * Resolve the itemType. */ - if ((typeDef->subtypes == NULL) && (typeDef->ref != NULL)) { + if ((typeDef->subtypes == NULL) && (typeDef->base != NULL)) { + typeDef->subtypes = xmlSchemaGetType(ctxt->schema, - typeDef->ref, typeDef->refNs); + typeDef->base, typeDef->baseNs); + if ((typeDef->subtypes == NULL) || - (! IS_SIMPLE_TYPE(typeDef->subtypes))) { + (! WXS_IS_SIMPLE(typeDef->subtypes))) + { typeDef->subtypes = NULL; xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - typeDef, typeDef->node, - "itemType", typeDef->ref, typeDef->refNs, + WXS_BASIC_CAST typeDef, typeDef->node, + "itemType", typeDef->base, typeDef->baseNs, XML_SCHEMA_TYPE_SIMPLE, NULL); } } return; } + } + /* + * The ball of letters below means, that if we have a particle + * which has a QName-helper component as its {term}, we want + * to resolve it... + */ + else if ((WXS_TYPE_CONTENTTYPE(typeDef) != NULL) && + ((WXS_TYPE_CONTENTTYPE(typeDef))->type == + XML_SCHEMA_TYPE_PARTICLE) && + (WXS_TYPE_PARTICLE_TERM(typeDef) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(typeDef))->type == + XML_SCHEMA_EXTRA_QNAMEREF)) + { + xmlSchemaQNameRefPtr ref = + WXS_QNAME_CAST WXS_TYPE_PARTICLE_TERM(typeDef); + xmlSchemaModelGroupDefPtr groupDef; + + /* + * URGENT TODO: Test this. + */ + WXS_TYPE_PARTICLE_TERM(typeDef) = NULL; + /* + * Resolve the MG definition reference. + */ + groupDef = + WXS_MODEL_GROUPDEF_CAST xmlSchemaGetNamedComponent(ctxt->schema, + ref->itemType, ref->name, ref->targetNamespace); + if (groupDef == NULL) { + xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, + NULL, WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), + "ref", ref->name, ref->targetNamespace, ref->itemType, + NULL); + /* Remove the particle. */ + WXS_TYPE_CONTENTTYPE(typeDef) = NULL; + } else if (WXS_MODELGROUPDEF_MODEL(groupDef) == NULL) + /* Remove the particle. */ + WXS_TYPE_CONTENTTYPE(typeDef) = NULL; + else { + /* + * Assign the MG definition's {model group} to the + * particle's {term}. + */ + WXS_TYPE_PARTICLE_TERM(typeDef) = WXS_MODELGROUPDEF_MODEL(groupDef); + + if (WXS_MODELGROUPDEF_MODEL(groupDef)->type == XML_SCHEMA_TYPE_ALL) { + /* + * SPEC cos-all-limited (1.2) + * "1.2 the {term} property of a particle with + * {max occurs}=1 which is part of a pair which constitutes + * the {content type} of a complex type definition." + */ + if ((WXS_TYPE_PARTICLE(typeDef))->maxOccurs != 1) { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), NULL, + "The particle's {max occurs} must be 1, since the " + "reference resolves to an 'all' model group", + NULL, NULL); + } + } + } } } @@ -14278,26 +15022,26 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "No base type existent", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } - if (! IS_SIMPLE_TYPE(baseType)) { + if (! WXS_IS_SIMPLE(baseType)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not a simple type", xmlSchemaGetComponentQName(&str, baseType)); FREE_AND_NULL(str) return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } - if ( (VARIETY_LIST(type) || VARIETY_UNION(type)) && + if ( (WXS_IS_LIST(type) || WXS_IS_UNION(type)) && (WXS_IS_RESTRICTION(type) == 0) && - (! IS_ANY_SIMPLE_TYPE(baseType))) { + (! WXS_IS_ANY_SIMPLE_TYPE(baseType))) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "A type, derived by list or union, must have" "the simple ur-type definition as base type, not '%s'", xmlSchemaGetComponentQName(&str, baseType)); @@ -14307,11 +15051,11 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, /* * Variety: One of {atomic, list, union}. */ - if ((! VARIETY_ATOMIC(type)) && (! VARIETY_UNION(type)) && - (! VARIETY_LIST(type))) { + if ((! WXS_IS_ATOMIC(type)) && (! WXS_IS_UNION(type)) && + (! WXS_IS_LIST(type))) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The variety is absent", NULL); return (XML_SCHEMAP_ST_PROPS_CORRECT_1); } @@ -14324,7 +15068,7 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_ST_PROPS_CORRECT_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of its base type '%s' must not contain " "'restriction'", xmlSchemaGetComponentQName(&str, baseType)); @@ -14369,16 +15113,16 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, return (-1); } - if (VARIETY_ATOMIC(type)) { + if (WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr primitive; /* * 1.1 The {base type definition} must be an atomic simple * type definition or a built-in primitive datatype. */ - if (! VARIETY_ATOMIC(type->baseType)) { + if (! WXS_IS_ATOMIC(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not an atomic simple type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14392,7 +15136,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The final of its base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14420,7 +15164,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, ok = 0; xmlSchemaPIllegalFacetAtomicErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, - NULL, type, primitive, facet); + type, primitive, facet); } facet = facet->next; } while (facet != NULL); @@ -14436,40 +15180,40 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * NOTE (1.3.2) Facet derivation constraints are currently handled in * xmlSchemaDeriveAndValidateFacets() */ - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { xmlSchemaTypePtr itemType = NULL; itemType = type->subtypes; - if ((itemType == NULL) || (! IS_SIMPLE_TYPE(itemType))) { + if ((itemType == NULL) || (! WXS_IS_SIMPLE(itemType))) { PERROR_INT("xmlSchemaCheckCOSSTRestricts", "failed to evaluate the item type"); return (-1); } - if (IS_NOT_TYPEFIXED(itemType)) - xmlSchemaTypeFixup(itemType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(itemType)) + xmlSchemaTypeFixup(itemType, ACTXT_CAST pctxt); /* * 2.1 The {item type definition} must have a {variety} of atomic or * union (in which case all the {member type definitions} * must be atomic). */ - if ((! VARIETY_ATOMIC(itemType)) && - (! VARIETY_UNION(itemType))) { + if ((! WXS_IS_ATOMIC(itemType)) && + (! WXS_IS_UNION(itemType))) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type '%s' does not have a variety of atomic or union", xmlSchemaGetComponentQName(&str, itemType)); FREE_AND_NULL(str) return (XML_SCHEMAP_COS_ST_RESTRICTS_2_1); - } else if (VARIETY_UNION(itemType)) { + } else if (WXS_IS_UNION(itemType)) { xmlSchemaTypeLinkPtr member; member = itemType->memberTypes; while (member != NULL) { - if (! VARIETY_ATOMIC(member->type)) { + if (! WXS_IS_ATOMIC(member->type)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type is a union type, but the " "member type '%s' of this item type is not atomic", xmlSchemaGetComponentQName(&str, member->type)); @@ -14480,7 +15224,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, } } - if (IS_ANY_SIMPLE_TYPE(type->baseType)) { + if (WXS_IS_ANY_SIMPLE_TYPE(type->baseType)) { xmlSchemaFacetPtr facet; /* * This is the case if we have: <simpleType><list .. @@ -14494,7 +15238,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_LIST)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The final of its item type '%s' must not contain 'list'", xmlSchemaGetComponentQName(&str, itemType)); FREE_AND_NULL(str) @@ -14512,7 +15256,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, if (facet->type != XML_SCHEMA_FACET_WHITESPACE) { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, - NULL, type, facet); + type, facet); return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2); } facet = facet->next; @@ -14534,10 +15278,10 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * 2.3.2 * 2.3.2.1 The {base type definition} must have a {variety} of list. */ - if (! VARIETY_LIST(type->baseType)) { + if (! WXS_IS_LIST(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' must be a list type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14551,7 +15295,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14566,18 +15310,18 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, xmlSchemaTypePtr baseItemType; baseItemType = type->baseType->subtypes; - if ((baseItemType == NULL) || (! IS_SIMPLE_TYPE(baseItemType))) { + if ((baseItemType == NULL) || (! WXS_IS_SIMPLE(baseItemType))) { PERROR_INT("xmlSchemaCheckCOSSTRestricts", "failed to eval the item type of a base type"); return (-1); } if ((itemType != baseItemType) && - (xmlSchemaCheckCOSSTDerivedOK(itemType, + (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, itemType, baseItemType, 0) != 0)) { xmlChar *strBIT = NULL, *strBT = NULL; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The item type '%s' is not validly derived from " "the item type '%s' of the base type '%s'", xmlSchemaGetComponentQName(&str, itemType), @@ -14615,7 +15359,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, default: { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, - NULL, type, facet); + type, facet); /* * We could return, but it's nicer to report all * invalid facets. @@ -14635,7 +15379,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, */ } } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * 3.1 The {member type definitions} must all have {variety} of * atomic or list. @@ -14644,14 +15388,14 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, member = type->memberTypes; while (member != NULL) { - if (IS_NOT_TYPEFIXED(member->type)) - xmlSchemaTypeFixup(member->type, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(member->type)) + xmlSchemaTypeFixup(member->type, ACTXT_CAST pctxt); - if ((! VARIETY_ATOMIC(member->type)) && - (! VARIETY_LIST(member->type))) { + if ((! WXS_IS_ATOMIC(member->type)) && + (! WXS_IS_LIST(member->type))) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The member type '%s' is neither an atomic, nor a list type", xmlSchemaGetComponentQName(&str, member->type)); FREE_AND_NULL(str) @@ -14674,7 +15418,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_UNION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of member type '%s' contains 'union'", xmlSchemaGetComponentQName(&str, member->type)); FREE_AND_NULL(str) @@ -14688,7 +15432,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, if (type->facetSet != NULL) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "No facets allowed", NULL); return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2); } @@ -14697,10 +15441,10 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, * 3.3.2.1 The {base type definition} must have a {variety} of union. * I.e. the variety of "list" is inherited. */ - if (! VARIETY_UNION(type->baseType)) { + if (! WXS_IS_UNION(type->baseType)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The base type '%s' is not a union type", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14713,7 +15457,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of its base type '%s' must not contain 'restriction'", xmlSchemaGetComponentQName(&str, type->baseType)); FREE_AND_NULL(str) @@ -14753,13 +15497,13 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, "different number of member types in base"); } if ((member->type != baseMember->type) && - (xmlSchemaCheckCOSSTDerivedOK( + (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, member->type, baseMember->type, 0) != 0)) { xmlChar *strBMT = NULL, *strBT = NULL; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The member type %s is not validly " "derived from its corresponding member " "type %s of the base type %s", @@ -14790,7 +15534,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt, (facet->type != XML_SCHEMA_FACET_ENUMERATION)) { xmlSchemaPIllegalFacetListUnionErr(pctxt, XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, - NULL, type, facet); + type, facet); ok = 0; } facet = facet->next; @@ -14842,14 +15586,14 @@ xmlSchemaCheckSRCSimpleType(xmlSchemaParserCtxtPtr ctxt, /* * */ - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { /* src-simple-type.3 "If the <list> alternative is chosen, either it must have * an itemType [attribute] or a <simpleType> among its [children], * but not both." * * NOTE: This is checked in the parse function of <list>. */ - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * src-simple-type.4 is checked in xmlSchemaCheckUnionTypeDefCircular(). */ @@ -14873,7 +15617,9 @@ xmlSchemaCreateVCtxtOnPCtxt(xmlSchemaParserCtxtPtr ctxt) } /* TODO: Pass user data. */ xmlSchemaSetValidErrors(ctxt->vctxt, - ctxt->error, ctxt->warning, ctxt->userData); + ctxt->error, ctxt->warning, ctxt->errCtxt); + xmlSchemaSetValidStructuredErrors(ctxt->vctxt, + ctxt->serror, ctxt->errCtxt); } return (0); } @@ -14919,7 +15665,7 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * For a string to be a valid default with respect to a type * definition the appropriate case among the following must be true: */ - if IS_COMPLEX_TYPE(type) { + if WXS_IS_COMPLEX(type) { /* * Complex type. * @@ -14929,12 +15675,12 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * type}'s particle must be ·emptiable· as defined by * Particle Emptiable (§3.9.6)." */ - if ((! HAS_SIMPLE_CONTENT(type)) && - ((! HAS_MIXED_CONTENT(type)) || (! IS_PARTICLE_EMPTIABLE(type)))) { + if ((! WXS_HAS_SIMPLE_CONTENT(type)) && + ((! WXS_HAS_MIXED_CONTENT(type)) || (! WXS_EMPTIABLE(type)))) { /* NOTE that this covers (2.2.2) as well. */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_COS_VALID_DEFAULT_2_1, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "For a string to be a valid default, the type definition " "must be a simple type or a complex type with mixed content " "and a particle emptiable", NULL); @@ -14952,10 +15698,10 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt, * string must be ·valid· with respect to that simple type definition * as defined by String Valid (§3.14.4). */ - if (IS_SIMPLE_TYPE(type)) + if (WXS_IS_SIMPLE(type)) ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node, type, value, val, 1, 1, 0); - else if (HAS_SIMPLE_CONTENT(type)) + else if (WXS_HAS_SIMPLE_CONTENT(type)) ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node, type->contentTypeDef, value, val, 1, 1, 0); else @@ -14995,17 +15741,17 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * Sub-components (§5.3)." */ if ((type->baseType != NULL) && - (IS_SIMPLE_TYPE(type->baseType)) && + (WXS_IS_SIMPLE(type->baseType)) && (WXS_IS_EXTENSION(type) == 0)) { /* * SPEC (2) "If the {base type definition} is a simple type definition, * the {derivation method} must be extension." */ - xmlSchemaPCustomErr(pctxt, + xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + NULL, WXS_BASIC_CAST type, "If the base type is a simple type, the derivation method must be " - "'extension'", NULL); + "'extension'", NULL, NULL); return (XML_SCHEMAP_SRC_CT_1); } /* @@ -15014,15 +15760,91 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * definition by repeatedly following the {base type definition}." * * NOTE (3) is done in xmlSchemaCheckTypeDefCircular(). - * - * SPEC (4) "Two distinct attribute declarations in the {attribute uses} - * must not have identical {name}s and {target namespace}s." - * SPEC (5) "Two distinct attribute declarations in the {attribute uses} - * must not have {type definition}s which are or are derived from ID." - * - * NOTE (4) and (5) are done in xmlSchemaBuildAttributeValidation(). */ + /* + * NOTE that (4) and (5) need the following: + * - attribute uses need to be already inherited (apply attr. prohibitions) + * - attribute group references need to be expanded already + * - simple types need to be typefixed already + */ + if (type->attrUses && + (((xmlSchemaItemListPtr) type->attrUses)->nbItems > 1)) + { + xmlSchemaItemListPtr uses = (xmlSchemaItemListPtr) type->attrUses; + xmlSchemaAttributeUsePtr use, tmp; + int i, j, hasId = 0; + + for (i = uses->nbItems -1; i >= 0; i--) { + use = uses->items[i]; + + /* + * SPEC ct-props-correct + * (4) "Two distinct attribute declarations in the + * {attribute uses} must not have identical {name}s and + * {target namespace}s." + */ + if (i > 0) { + for (j = i -1; j >= 0; j--) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + NULL, WXS_BASIC_CAST type, + "Duplicate %s", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + /* + * Remove the duplicate. + */ + if (xmlSchemaItemListRemove(uses, i) == -1) + goto exit_failure; + goto next_use; + } + } + } + /* + * SPEC ct-props-correct + * (5) "Two distinct attribute declarations in the + * {attribute uses} must not have {type definition}s which + * are or are derived from ID." + */ + if (WXS_ATTRUSE_TYPEDEF(use) != NULL) { + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + if (hasId) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + NULL, WXS_BASIC_CAST type, + "There must not exist more than one attribute " + "declaration of type 'xs:ID' " + "(or derived from 'xs:ID'). The %s violates this " + "constraint", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + if (xmlSchemaItemListRemove(uses, i) == -1) + goto exit_failure; + } + + hasId = 1; + } + } +next_use: {} + } + } return (0); +exit_failure: + return(-1); } static int @@ -15054,7 +15876,8 @@ xmlSchemaAreEqualTypes(xmlSchemaTypePtr typeA, * if not. */ static int -xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int set) { @@ -15089,16 +15912,16 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * SPEC (2.3.1) "D's {base type definition} must not be the ·ur-type * definition·." */ - if (IS_ANYTYPE(type->baseType)) + if (WXS_IS_ANYTYPE(type->baseType)) return (1); - if (IS_COMPLEX_TYPE(type->baseType)) { + if (WXS_IS_COMPLEX(type->baseType)) { /* * SPEC (2.3.2.1) "If D's {base type definition} is complex, then it * must be validly derived from B given the subset as defined by this * constraint." */ - return (xmlSchemaCheckCOSCTDerivedOK(type->baseType, + return (xmlSchemaCheckCOSCTDerivedOK(actxt, type->baseType, baseType, set)); } else { /* @@ -15106,7 +15929,8 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * must be validly derived from B given the subset as defined in Type * Derivation OK (Simple) (§3.14.6). */ - return (xmlSchemaCheckCOSSTDerivedOK(type->baseType, baseType, set)); + return (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType, + baseType, set)); } } @@ -15123,14 +15947,15 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaTypePtr type, * Returns 0 on success, an positive error code otherwise. */ static int -xmlSchemaCheckCOSDerivedOK(xmlSchemaTypePtr type, +xmlSchemaCheckCOSDerivedOK(xmlSchemaAbstractCtxtPtr actxt, + xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, int set) { - if (IS_SIMPLE_TYPE(type)) - return (xmlSchemaCheckCOSSTDerivedOK(type, baseType, set)); + if (WXS_IS_SIMPLE(type)) + return (xmlSchemaCheckCOSSTDerivedOK(actxt, type, baseType, set)); else - return (xmlSchemaCheckCOSCTDerivedOK(type, baseType, set)); + return (xmlSchemaCheckCOSCTDerivedOK(actxt, type, baseType, set)); } /** @@ -15145,7 +15970,7 @@ xmlSchemaCheckCOSDerivedOK(xmlSchemaTypePtr type, * STATUS: * missing: * (1.5) - * (1.4.3.2.2.2) "Particle Valid (Extension)", which is not really needed. + * (1.4.3.2.2.2) "Particle Valid (Extension)" * * Returns 0 if the constraints are satisfied, a positive * error code if not and -1 if an internal error occured. @@ -15163,7 +15988,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * SPEC (1) "If the {base type definition} is a complex type definition, * then all of the following must be true:" */ - if (IS_COMPLEX_TYPE(base)) { + if (WXS_IS_COMPLEX(base)) { /* * SPEC (1.1) "The {final} of the {base type definition} must not * contain extension." @@ -15171,11 +15996,20 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, if (base->flags & XML_SCHEMAS_TYPE_FINAL_EXTENSION) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type definition " "contains 'extension'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } + + /* + * ATTENTION: The constrains (1.2) and (1.3) are not applied, + * since they are automatically satisfied through the + * inheriting mechanism. + * Note that even if redefining components, the inheriting mechanism + * is used. + */ +#if 0 /* * SPEC (1.2) "Its {attribute uses} must be a subset of the {attribute * uses} @@ -15185,22 +16019,89 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * type definition itself whose {attribute declaration} has the same * {name}, {target namespace} and {type definition} as its attribute * declaration" - * - * NOTE (1.2): This will be already satisfied by the way the attribute - * uses are extended in xmlSchemaBuildAttributeValidation(); thus this - * check is not needed. */ + if (base->attrUses != NULL) { + int i, j, found; + xmlSchemaAttributeUsePtr use, buse; + for (i = 0; i < (WXS_LIST_CAST base->attrUses)->nbItems; i ++) { + buse = (WXS_LIST_CAST base->attrUses)->items[i]; + found = 0; + if (type->attrUses != NULL) { + use = (WXS_LIST_CAST type->attrUses)->items[j]; + for (j = 0; j < (WXS_LIST_CAST type->attrUses)->nbItems; j ++) + { + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(buse)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(buse)) && + (WXS_ATTRUSE_TYPEDEF(use) == + WXS_ATTRUSE_TYPEDEF(buse)) + { + found = 1; + break; + } + } + } + if (! found) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_2, + NULL, WXS_BASIC_CAST type, + /* + * TODO: The report does not indicate that also the + * type needs to be the same. + */ + "This type is missing a matching correspondent " + "for its {base type}'s %s in its {attribute uses}", + xmlSchemaGetComponentDesignation(&str, + buse->children), + NULL); + FREE_AND_NULL(str) + } + } + } /* * SPEC (1.3) "If it has an {attribute wildcard}, the complex type * definition must also have one, and the base type definition's * {attribute wildcard}'s {namespace constraint} must be a subset * of the complex type definition's {attribute wildcard}'s {namespace * constraint}, as defined by Wildcard Subset (§3.10.6)." - * - * NOTE (1.3) This is already checked in - * xmlSchemaBuildAttributeValidation; thus this check is not needed. - * + */ + + /* + * MAYBE TODO: Enable if ever needed. But this will be needed only + * if created the type via a schema construction API. + */ + if (base->attributeWildcard != NULL) { + if (type->attributeWilcard == NULL) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_3, + NULL, type, + "The base %s has an attribute wildcard, " + "but this type is missing an attribute wildcard", + xmlSchemaGetComponentDesignation(&str, base)); + FREE_AND_NULL(str) + + } else if (xmlSchemaCheckCOSNSSubset( + base->attributeWildcard, type->attributeWildcard)) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_COS_CT_EXTENDS_1_3, + NULL, type, + "The attribute wildcard is not a valid " + "superset of the one in the base %s", + xmlSchemaGetComponentDesignation(&str, base)); + FREE_AND_NULL(str) + } + } +#endif + /* * SPEC (1.4) "One of the following must be true:" */ if ((type->contentTypeDef != NULL) && @@ -15230,7 +16131,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type must specify a particle", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } @@ -15256,13 +16157,13 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type of both, the type and its base " "type, must either 'mixed' or 'element-only'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } /* - * FUTURE TODO SPEC (1.4.3.2.2.2) "The particle of the + * URGENT TODO SPEC (1.4.3.2.2.2) "The particle of the * complex type definition must be a ·valid extension· * of the {base type definition}'s particle, as defined * in Particle Valid (Extension) (§3.9.6)." @@ -15271,10 +16172,11 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * since it is ensured by the derivation process in * xmlSchemaTypeFixup(). We need to implement this when heading * for a construction API + * TODO: !! This is needed to be checked if redefining a type !! */ } /* - * TODO (1.5) + * URGENT TODO (1.5) */ } } else { @@ -15289,7 +16191,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The content type must be the simple base type", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); } @@ -15301,7 +16203,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "The 'final' of the base type definition " "contains 'extension'", NULL); return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); @@ -15321,7 +16223,11 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt, * * STATUS: * missing: - * (5.4.2), (5.2.2.1) + * (5.4.2) ??? + * + * ATTENTION: + * In XML Schema 1.1 this will be: + * Validation Rule: Checking complex type subsumption * * Returns 0 if the constraints are satisfied, a positive * error code if not and -1 if an internal error occured. @@ -15333,25 +16239,45 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaTypePtr base; /* - * TODO: Correct the error code; XML_SCHEMAP_COS_CT_EXTENDS_1_1 is used + * TODO: Correct the error code; XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 is used * temporarily only. */ base = type->baseType; + if (! WXS_IS_COMPLEX(base)) { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + type->node, WXS_BASIC_CAST type, + "The base type must be a complex type", NULL, NULL); + return(ctxt->err); + } if (base->flags & XML_SCHEMAS_TYPE_FINAL_RESTRICTION) { /* * SPEC (1) "The {base type definition} must be a complex type * definition whose {final} does not contain restriction." */ - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + type->node, WXS_BASIC_CAST type, "The 'final' of the base type definition " - "contains 'restriction'", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + "contains 'restriction'", NULL, NULL); + return (ctxt->err); + } + /* + * SPEC (2), (3) and (4) + * Those are handled in a separate function, since the + * same constraints are needed for redefinition of + * attribute groups as well. + */ + if (xmlSchemaCheckDerivationOKRestriction2to4(ctxt, + XML_SCHEMA_ACTION_DERIVE, + WXS_BASIC_CAST type, WXS_BASIC_CAST base, + type->attrUses, base->attrUses, + type->attributeWildcard, + base->attributeWildcard) == -1) + { + return(-1); } /* - * NOTE (3) and (4) are done in xmlSchemaBuildAttributeValidation(). - * * SPEC (5) "One of the following must be true:" */ if (base->builtInType == XML_SCHEMAS_ANYTYPE) { @@ -15369,14 +16295,39 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, * SPEC (5.2.2) "One of the following must be true:" */ if ((base->contentType == XML_SCHEMA_CONTENT_SIMPLE) || - (base->contentType == XML_SCHEMA_CONTENT_BASIC)) { + (base->contentType == XML_SCHEMA_CONTENT_BASIC)) + { + int err; /* * SPEC (5.2.2.1) "The {content type} of the {base type * definition} must be a simple type definition from which * the {content type} is validly derived given the empty * set as defined in Type Derivation OK (Simple) (§3.14.6)." - * URGENT TODO + * + * ATTENTION TODO: This seems not needed if the type implicitely + * derived from the base type. + * */ + err = xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST ctxt, + type->contentTypeDef, base->contentTypeDef, 0); + if (err != 0) { + xmlChar *strA = NULL, *strB = NULL; + + if (err == -1) + return(-1); + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + NULL, WXS_BASIC_CAST type, + "The {content type} %s is not validly derived from the " + "base type's {content type} %s", + xmlSchemaGetComponentDesignation(&strA, + type->contentTypeDef), + xmlSchemaGetComponentDesignation(&strB, + base->contentTypeDef)); + FREE_AND_NULL(strA); + FREE_AND_NULL(strB); + return(ctxt->err); + } } else if ((base->contentType == XML_SCHEMA_CONTENT_MIXED) && (xmlSchemaIsParticleEmptiable( (xmlSchemaParticlePtr) base->subtypes))) { @@ -15388,11 +16339,11 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The content type of the base type must be either " "a simple type or 'mixed' and an emptiable particle", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } } else if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) { /* @@ -15417,31 +16368,31 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The content type of the base type must be either " "empty or 'mixed' (or 'elements-only') and an emptiable " "particle", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } } else if ((type->contentType == XML_SCHEMA_CONTENT_ELEMENTS) || - HAS_MIXED_CONTENT(type)) { + WXS_HAS_MIXED_CONTENT(type)) { /* * SPEC (5.4.1.1) "The {content type} of the complex type definition * itself must be element-only" */ - if (HAS_MIXED_CONTENT(type) && (! HAS_MIXED_CONTENT(base))) { + if (WXS_HAS_MIXED_CONTENT(type) && (! WXS_HAS_MIXED_CONTENT(base))) { /* * SPEC (5.4.1.2) "The {content type} of the complex type * definition itself and of the {base type definition} must be * mixed" */ xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "If the content type is 'mixed', then the content type of the " "base type must also be 'mixed'", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } /* * SPEC (5.4.2) "The particle of the complex type definition itself @@ -15453,10 +16404,10 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt, */ } else { xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - NULL, type, NULL, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + WXS_BASIC_CAST type, NULL, "The type is not a valid restriction of its base type", NULL); - return (XML_SCHEMAP_COS_CT_EXTENDS_1_1); + return (ctxt->err); } return (0); } @@ -15513,17 +16464,17 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * XML_SCHEMAP_SRC_CT_1 only yet. */ base = type->baseType; - if (! HAS_SIMPLE_CONTENT(type)) { + if (! WXS_HAS_SIMPLE_CONTENT(type)) { /* * 1 If the <complexContent> alternative is chosen, the type definition * ·resolved· to by the ·actual value· of the base [attribute] * must be a complex type definition; */ - if (! IS_COMPLEX_TYPE(base)) { + if (! WXS_IS_COMPLEX(base)) { xmlChar *str = NULL; xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, type->node, + WXS_BASIC_CAST type, type->node, "If using <complexContent>, the base type is expected to be " "a complex type. The base type '%s' is a simple type", xmlSchemaFormatQName(&str, base->targetNamespace, @@ -15539,7 +16490,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * 2.1 The type definition ·resolved· to by the ·actual value· of the * base [attribute] must be one of the following: */ - if (IS_SIMPLE_TYPE(base)) { + if (WXS_IS_SIMPLE(base)) { if (WXS_IS_EXTENSION(type) == 0) { xmlChar *str = NULL; /* @@ -15549,7 +16500,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, /* TODO: Change error code to ..._SRC_CT_2_1_3. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If using <simpleContent> and <restriction>, the base " "type must be a complex type. The base type '%s' is " "a simple type", @@ -15569,7 +16520,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, */ if (base->contentTypeDef == NULL) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaCheckSRCCT, " "'%s', base type has no content type", type->name); @@ -15601,7 +16552,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, /* TODO: Change error code to ..._SRC_CT_2_2. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "A <simpleType> is expected among the children " "of <restriction>, if <simpleContent> is used and " "the base type '%s' is a complex type", @@ -15619,7 +16570,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, if (WXS_IS_RESTRICTION(type)) { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If <simpleContent> and <restriction> is used, the " "base type must be a simple type or a complex type with " "mixed content and particle emptiable. The base type " @@ -15629,7 +16580,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, } else { xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_CT_1, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "If <simpleContent> and <extension> is used, the " "base type must be a simple type. The base type '%s' " "is a complex type", @@ -15650,7 +16601,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, * above for {attribute wildcard} is satisfied, the intensional * intersection must be expressible, as defined in Attribute Wildcard * Intersection (§3.10.6). - * NOTE (4) is done in xmlSchemaBuildAttributeValidation(). + * NOTE (4) is done in xmlSchemaFixupTypeAttributeUses(). */ return (ret); } @@ -15782,7 +16733,7 @@ xmlSchemaCheckRCaseNameAndTypeOK(xmlSchemaParserCtxtPtr ctxt, set |= SUBSET_EXTENSION; set |= SUBSET_LIST; set |= SUBSET_UNION; - if (xmlSchemaCheckCOSDerivedOK(elemR->subtypes, + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST ctxt, elemR->subtypes, elemB->subtypes, set) != 0) return (1); } @@ -15932,8 +16883,8 @@ xmlSchemaCheckCOSParticleRestrict(xmlSchemaParserCtxtPtr ctxt, { int ret = 0; - /*part = GET_PARTICLE(type); - basePart = GET_PARTICLE(base); + /*part = WXS_TYPE_PARTICLE(type); + basePart = WXS_TYPE_PARTICLE(base); */ TODO @@ -16049,7 +17000,7 @@ xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt, #define FACET_RESTR_MUTUAL_ERR(fac1, fac2) \ xmlSchemaPCustomErrExt(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac1, fac1->node, \ + WXS_BASIC_CAST fac1, fac1->node, \ "It is an error for both '%s' and '%s' to be specified on the "\ "same type definition", \ BAD_CAST xmlSchemaFacetTypeToString(fac1->type), \ @@ -16058,13 +17009,13 @@ xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt, #define FACET_RESTR_ERR(fac1, msg) \ xmlSchemaPCustomErr(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac1, fac1->node, \ + WXS_BASIC_CAST fac1, fac1->node, \ msg, NULL); #define FACET_RESTR_FIXED_ERR(fac) \ xmlSchemaPCustomErr(pctxt, \ XML_SCHEMAP_INVALID_FACET_VALUE, \ - NULL, (xmlSchemaTypePtr) fac, fac->node, \ + WXS_BASIC_CAST fac, fac->node, \ "The base type's facet is 'fixed', thus the value must not " \ "differ", NULL); @@ -16099,7 +17050,7 @@ xmlSchemaDeriveFacetErr(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INVALID_FACET_VALUE, - NULL, (xmlSchemaTypePtr) facet1, facet1->node, + WXS_BASIC_CAST facet1, NULL, (const char *) msg, NULL); if (msg != NULL) @@ -16127,7 +17078,7 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, bfmaxlen = NULL, bfminlen = NULL, /* facets of the base type */ bfmininc = NULL, bfmaxinc = NULL, bfminexc = NULL, bfmaxexc = NULL; - int res, err = 0, fixedErr; + int res; /* err = 0, fixedErr; */ /* * SPEC st-restrict-facets 1: @@ -16211,7 +17162,6 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, break; } } - err = 0; /* * length and minLength or maxLength (2.2) + (3.2) */ @@ -16593,8 +17543,8 @@ xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt, * Search for a duplicate facet in the current type. */ link = type->facetSet; - err = 0; - fixedErr = 0; + /* err = 0; */ + /* fixedErr = 0; */ while (link != NULL) { facet = link->facet; if (facet->type == bfacet->type) { @@ -16661,14 +17611,18 @@ xmlSchemaFinishMemberTypeDefinitionsProperty(xmlSchemaParserCtxtPtr pctxt, * The actual value is then formed by replacing any union type * definition in the ·explicit members· with the members of their * {member type definitions}, in order. + * + * TODO: There's a bug entry at + * "http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0287.html" + * which indicates that we'll keep the union types the future. */ link = type->memberTypes; while (link != NULL) { - if (IS_NOT_TYPEFIXED(link->type)) - xmlSchemaTypeFixup(link->type, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(link->type)) + xmlSchemaTypeFixup(link->type, ACTXT_CAST pctxt); - if (VARIETY_UNION(link->type)) { + if (WXS_IS_UNION(link->type)) { subLink = xmlSchemaGetUnionSimpleTypeMemberTypes(link->type); if (subLink != NULL) { link->type = subLink->type; @@ -16740,7 +17694,7 @@ xmlSchemaTypeFixupOptimFacets(xmlSchemaTypePtr type) if (has) type->flags |= XML_SCHEMAS_TYPE_HAS_FACETS; - if (has && (! needVal) && VARIETY_ATOMIC(type)) { + if (has && (! needVal) && WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr prim = xmlSchemaGetPrimitiveType(type); /* * OPTIMIZE VAL TODO: Some facets need a computed value. @@ -16760,10 +17714,10 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type) /* * Evaluate the whitespace-facet value. */ - if (VARIETY_LIST(type)) { + if (WXS_IS_LIST(type)) { type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE; return (0); - } else if (VARIETY_UNION(type)) + } else if (WXS_IS_UNION(type)) return (0); if (type->facetSet != NULL) { @@ -16813,7 +17767,6 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type) break; } } - return (0); } return (0); } @@ -16824,11 +17777,11 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, { if (type->type != XML_SCHEMA_TYPE_SIMPLE) return(0); - if (! TYPE_IS_NOT_FIXEDUP_1(type)) + if (! WXS_IS_TYPE_NOT_FIXED_1(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_FIXUP_1; - if (VARIETY_LIST(type)) { + if (WXS_IS_LIST(type)) { /* * Corresponds to <simpleType><list>... */ @@ -16840,7 +17793,7 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, "list type has no item-type assigned"); return(-1); } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { /* * Corresponds to <simpleType><union>... */ @@ -16861,7 +17814,7 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, "type has no base-type assigned"); return(-1); } - if (TYPE_IS_NOT_FIXEDUP_1(type->baseType)) + if (WXS_IS_TYPE_NOT_FIXED_1(type->baseType)) if (xmlSchemaFixupSimpleTypeStageOne(pctxt, type->baseType) == -1) return(-1); /* @@ -16869,15 +17822,15 @@ xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt, * If the <restriction> alternative is chosen, then the * {variety} of the {base type definition}. */ - if (VARIETY_ATOMIC(type->baseType)) + if (WXS_IS_ATOMIC(type->baseType)) type->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC; - else if (VARIETY_LIST(type->baseType)) { + else if (WXS_IS_LIST(type->baseType)) { type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST; /* * Inherit the itemType. */ type->subtypes = type->baseType->subtypes; - } else if (VARIETY_UNION(type->baseType)) { + } else if (WXS_IS_UNION(type->baseType)) { type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION; /* * NOTE that we won't assign the memberTypes of the base, @@ -16902,7 +17855,7 @@ xmlSchemaDebugFixedType(xmlSchemaParserCtxtPtr pctxt, } else { xmlGenericError(xmlGenericErrorContext, "Type of %s :", name); } - if ((IS_SIMPLE_TYPE(type)) || (IS_COMPLEX_TYPE(type))) { + if ((WXS_IS_SIMPLE(type)) || (WXS_IS_COMPLEX(type))) { switch (type->contentType) { case XML_SCHEMA_CONTENT_SIMPLE: xmlGenericError(xmlGenericErrorContext, "simple\n"); @@ -16954,7 +17907,7 @@ xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt, if (type->type != XML_SCHEMA_TYPE_SIMPLE) return(-1); - if (! IS_NOT_TYPEFIXED(type)) + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED; @@ -16965,11 +17918,13 @@ xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt, "missing baseType"); goto exit_failure; } - if (IS_NOT_TYPEFIXED(type->baseType)) - xmlSchemaTypeFixup(type->baseType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(type->baseType)) + xmlSchemaTypeFixup(type->baseType, ACTXT_CAST pctxt); /* * If a member type of a union is a union itself, we need to substitute * that member type for its member types. + * NOTE that this might change in WXS 1.1; i.e. we will keep the union + * types in WXS 1.1. */ if ((type->memberTypes != NULL) && (xmlSchemaFinishMemberTypeDefinitionsProperty(pctxt, type) == -1)) @@ -17043,19 +17998,19 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, int res = 0, olderrs = pctxt->nberrors; xmlSchemaTypePtr baseType = type->baseType; - if (! IS_NOT_TYPEFIXED(type)) + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED; if (baseType == NULL) { - PERROR_INT("xmlSchemaFixupSimpleTypeStageTwo", + PERROR_INT("xmlSchemaFixupComplexType", "missing baseType"); goto exit_failure; } /* * Fixup the base type. */ - if (IS_NOT_TYPEFIXED(baseType)) - xmlSchemaTypeFixup(baseType, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(baseType)) + xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt); if (baseType->flags & XML_SCHEMAS_TYPE_INTERNAL_INVALID) { /* * Skip fixup if the base type is invalid. @@ -17075,7 +18030,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, /* * Corresponds to <complexType><simpleContent>... */ - if ((IS_COMPLEX_TYPE(baseType)) && + if ((WXS_IS_COMPLEX(baseType)) && (baseType->contentTypeDef != NULL) && (WXS_IS_RESTRICTION(type))) { xmlSchemaTypePtr contentBase, content; @@ -17117,12 +18072,12 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, #ifdef ENABLE_NAMED_LOCALS snprintf(buf, 29, "#scST%d", ++(pctxt->counter)); tmpname = xmlDictLookup(pctxt->dict, BAD_CAST buf, -1); - content = xmlSchemaAddType(pctxt, - pctxt->schema, tmpname, type->targetNamespace, + content = xmlSchemaAddType(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_SIMPLE, tmpname, type->targetNamespace, type->node, 0); #else - content = xmlSchemaAddType(pctxt, - pctxt->schema, NULL, type->targetNamespace, + content = xmlSchemaAddType(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_SIMPLE, NULL, type->targetNamespace, type->node, 0); #endif if (content == NULL) @@ -17143,8 +18098,8 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, type->facetSet = NULL; type->contentTypeDef = content; - if (IS_NOT_TYPEFIXED(contentBase)) - xmlSchemaTypeFixup(contentBase, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(contentBase)) + xmlSchemaTypeFixup(contentBase, ACTXT_CAST pctxt); /* * Fixup the newly created type. We don't need to check * for circularity here. @@ -17154,7 +18109,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, res = xmlSchemaFixupSimpleTypeStageTwo(pctxt, content); HFAILURE HERROR - } else if ((IS_COMPLEX_TYPE(baseType)) && + } else if ((WXS_IS_COMPLEX(baseType)) && (baseType->contentType == XML_SCHEMA_CONTENT_MIXED) && (WXS_IS_RESTRICTION(type))) { /* @@ -17169,14 +18124,14 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s': the <simpleContent><restriction> " "is missing a <simpleType> child, but was not catched " "by xmlSchemaCheckSRCCT()", type->name); goto exit_failure; } - } else if ((IS_COMPLEX_TYPE(baseType)) && WXS_IS_EXTENSION(type)) { + } else if ((WXS_IS_COMPLEX(baseType)) && WXS_IS_EXTENSION(type)) { /* * SPEC (3) If <extension> + base is <complexType> with * <simpleType> content, "...then the {content type} of that @@ -17189,7 +18144,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s': the <extension>ed base type is " "a complex type with no simple content type", @@ -17197,7 +18152,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, goto exit_failure; } type->contentTypeDef = baseType->contentTypeDef; - } else if ((IS_SIMPLE_TYPE(baseType)) && WXS_IS_EXTENSION(type)) { + } else if ((WXS_IS_SIMPLE(baseType)) && WXS_IS_EXTENSION(type)) { /* * SPEC (4) <extension> + base is <simpleType> * "... then that simple type definition" @@ -17209,7 +18164,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, */ xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_INTERNAL, - NULL, type, NULL, + WXS_BASIC_CAST type, NULL, "Internal error: xmlSchemaTypeFixup, " "complex type '%s' with <simpleContent>: unhandled " "derivation case", type->name); @@ -17257,7 +18212,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, goto exit_failure; /* * Create the model group. - */ + */ /* URGENT TODO: avoid adding to pending items. */ particle->children = (xmlSchemaTreeItemPtr) xmlSchemaAddModelGroup(pctxt, pctxt->schema, XML_SCHEMA_TYPE_SEQUENCE, type->node); @@ -17322,7 +18277,47 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, * "A model group whose {compositor} is sequence and whose * {particles} are..." */ - if (! dummySequence) { + if ((WXS_TYPE_PARTICLE(type) != NULL) && + (WXS_TYPE_PARTICLE_TERM(type) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(type))->type == + XML_SCHEMA_TYPE_ALL)) + { + /* + * SPEC cos-all-limited (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(type), NULL, + "The type has an 'all' model group in its " + "{content type} and thus cannot be derived from " + "a non-empty type, since this would produce a " + "'sequence' model group containing the 'all' " + "model group; 'all' model groups are not " + "allowed to appear inside other model groups", + NULL, NULL); + + } else if ((WXS_TYPE_PARTICLE(baseType) != NULL) && + (WXS_TYPE_PARTICLE_TERM(baseType) != NULL) && + ((WXS_TYPE_PARTICLE_TERM(baseType))->type == + XML_SCHEMA_TYPE_ALL)) + { + /* + * SPEC cos-all-limited (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(type), NULL, + "A type cannot be derived by extension from a type " + "which has an 'all' model group in its " + "{content type}, since this would produce a " + "'sequence' model group containing the 'all' " + "model group; 'all' model groups are not " + "allowed to appear inside other model groups", + NULL, NULL); + + } else if (! dummySequence) { xmlSchemaTreeItemPtr effectiveContent = (xmlSchemaTreeItemPtr) type->subtypes; /* @@ -17340,7 +18335,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, XML_SCHEMA_TYPE_SEQUENCE, type->node); if (particle->children == NULL) goto exit_failure; - type->subtypes = (xmlSchemaTypePtr) particle; + WXS_TYPE_CONTENTTYPE(type) = (xmlSchemaTypePtr) particle; /* * SPEC "the particle of the {content type} of * the ... base ..." @@ -17362,6 +18357,16 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, * SPEC "followed by the ·effective content·." */ particle->next = effectiveContent; + /* + * This all will result in: + * new-particle + * --> new-sequence( + * new-particle + * --> base-model, + * this-particle + * --> this-model + * ) + */ } else { /* * This is the case when there is already an empty @@ -17379,16 +18384,21 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt, } } /* - * Apply the complex type component constraints; this will not - * check attributes, since this is done in - * xmlSchemaBuildAttributeValidation(). + * Now fixup attribute uses: + * - expand attr. group references + * - intersect attribute wildcards + * - inherit attribute uses of the base type + * - inherit or union attr. wildcards if extending + * - apply attr. use prohibitions if restricting */ - res = xmlSchemaCheckCTComponent(pctxt, type); + res = xmlSchemaFixupTypeAttributeUses(pctxt, type); HFAILURE HERROR /* - * Inherit & check constraints for attributes. + * Apply the complex type component constraints; this will not + * check attributes, since this is done in + * xmlSchemaFixupTypeAttributeUses(). */ - res = xmlSchemaBuildAttributeValidation(pctxt, type); + res = xmlSchemaCheckCTComponent(pctxt, type); HFAILURE HERROR #ifdef DEBUG_TYPE @@ -17425,16 +18435,21 @@ exit_failure: */ static int xmlSchemaTypeFixup(xmlSchemaTypePtr type, - xmlSchemaParserCtxtPtr pctxt) + xmlSchemaAbstractCtxtPtr actxt) { if (type == NULL) return(0); - if (! IS_NOT_TYPEFIXED(type)) + if (actxt->type != XML_SCHEMA_CTXT_PARSER) { + AERROR_INT("xmlSchemaTypeFixup", + "this function needs a parser context"); + return(-1); + } + if (! WXS_IS_TYPE_NOT_FIXED(type)) return(0); if (type->type == XML_SCHEMA_TYPE_COMPLEX) - return(xmlSchemaFixupComplexType(pctxt, type)); + return(xmlSchemaFixupComplexType(PCTXT_CAST actxt, type)); else if (type->type == XML_SCHEMA_TYPE_SIMPLE) - return(xmlSchemaFixupSimpleTypeStageTwo(pctxt, type)); + return(xmlSchemaFixupSimpleTypeStageTwo(PCTXT_CAST actxt, type)); return(0); } @@ -17546,7 +18561,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, xmlChar *str = NULL; xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, (xmlSchemaTypePtr) facet, + ret, facet->node, WXS_BASIC_CAST facet, "The value '%s' of the facet does not validate " "against the base type '%s'", facet->value, @@ -17571,7 +18586,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, /* No error message for RelaxNG. */ if (ctxtGiven) { xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, + ret, facet->node, WXS_BASIC_CAST typeDecl, "The value '%s' of the facet 'pattern' is not a " "valid regular expression", facet->value, NULL); @@ -17582,33 +18597,43 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, case XML_SCHEMA_FACET_FRACTIONDIGITS: case XML_SCHEMA_FACET_LENGTH: case XML_SCHEMA_FACET_MAXLENGTH: - case XML_SCHEMA_FACET_MINLENGTH:{ + case XML_SCHEMA_FACET_MINLENGTH: + + if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) { + ret = xmlSchemaValidatePredefinedType( + xmlSchemaGetBuiltInType(XML_SCHEMAS_PINTEGER), + facet->value, &(facet->val)); + } else { ret = xmlSchemaValidatePredefinedType( xmlSchemaGetBuiltInType(XML_SCHEMAS_NNINTEGER), facet->value, &(facet->val)); - if (ret != 0) { - if (ret < 0) { - /* No error message for RelaxNG. */ - if (ctxtGiven) { - PERROR_INT("xmlSchemaCheckFacet", - "validating facet value"); - } - goto internal_error; - } - ret = XML_SCHEMAP_INVALID_FACET_VALUE; + } + if (ret != 0) { + if (ret < 0) { /* No error message for RelaxNG. */ if (ctxtGiven) { - /* error code */ - xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, - "The value '%s' of the facet '%s' is not a valid " - "'nonNegativeInteger'", - facet->value, - xmlSchemaFacetTypeToString(facet->type)); - } - } - break; - } + PERROR_INT("xmlSchemaCheckFacet", + "validating facet value"); + } + goto internal_error; + } + ret = XML_SCHEMAP_INVALID_FACET_VALUE; + /* No error message for RelaxNG. */ + if (ctxtGiven) { + /* error code */ + xmlSchemaCustomErr4(ACTXT_CAST pctxt, + ret, facet->node, WXS_BASIC_CAST typeDecl, + "The value '%s' of the facet '%s' is not a valid '%s'", + facet->value, + xmlSchemaFacetTypeToString(facet->type), + (facet->type != XML_SCHEMA_FACET_TOTALDIGITS) ? + BAD_CAST "nonNegativeInteger" : + BAD_CAST "positiveInteger", + NULL); + } + } + break; + case XML_SCHEMA_FACET_WHITESPACE:{ if (xmlStrEqual(facet->value, BAD_CAST "preserve")) { facet->whitespace = XML_SCHEMAS_FACET_PRESERVE; @@ -17622,7 +18647,7 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, if (ctxtGiven) { /* error was previously: XML_SCHEMAP_INVALID_WHITE_SPACE */ xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, facet->node, typeDecl, + ret, facet->node, WXS_BASIC_CAST typeDecl, "The value '%s' of the facet 'whitespace' is not " "valid", facet->value, NULL); } @@ -17779,7 +18804,7 @@ xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item, */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_MG_PROPS_CORRECT_2, - NULL, NULL, GET_NODE(circ), + NULL, WXS_ITEM_NODE(circ), "Circular reference to the model group definition '%s' " "defined", xmlSchemaFormatQName(&str, item->targetNamespace, item->name)); @@ -17794,114 +18819,115 @@ xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item, } /** - * xmlSchemaGroupDefReferenceTermFixup: - * @item: the particle with a model group definition as term + * xmlSchemaModelGroupToModelGroupDefFixup: * @ctxt: the parser context - * @name: the name - * - * Checks cos-all-limited. + * @mg: the model group * * Assigns the model group of model group definitions to the "term" * of the referencing particle. - * In xmlSchemaResolveParticleReferences the model group definitions was assigned - * to the "term", since needed for the circularity check. + * In xmlSchemaResolveModelGroupParticleReferences the model group + * definitions were assigned to the "term", since needed for the + * circularity check. + * + * Schema Component Constraint: + * All Group Limited (cos-all-limited) (1.2) */ static void -xmlSchemaGroupDefReferenceTermFixup(xmlSchemaParticlePtr item, - xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED, - const xmlChar * name ATTRIBUTE_UNUSED) +xmlSchemaModelGroupToModelGroupDefFixup( + xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED, + xmlSchemaModelGroupPtr mg) { - if ((item == NULL) || - (item->type != XML_SCHEMA_TYPE_PARTICLE) || - (item->children == NULL) || - (item->children->type != XML_SCHEMA_TYPE_GROUP) || - (item->children->children == NULL)) - return; - item->children = item->children->children; - /* - * TODO: Not nice, but we will anchor cos-all-limited here. - */ - if ((item->children->type == XML_SCHEMA_TYPE_ALL) && - (item->maxOccurs != 1)) { + xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg); + + while (particle != NULL) { + if ((WXS_PARTICLE_TERM(particle) == NULL) || + ((WXS_PARTICLE_TERM(particle))->type != + XML_SCHEMA_TYPE_GROUP)) + { + particle = WXS_PTC_CAST particle->next; + continue; + } + if (WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)) == NULL) { + /* + * TODO: Remove the particle. + */ + WXS_PARTICLE_TERM(particle) = NULL; + particle = WXS_PTC_CAST particle->next; + continue; + } /* - * SPEC (1.2) "the {term} property of a particle with - * {max occurs}=1which is part of a pair which constitutes the - * {content type} of a complex type definition." + * Assign the model group to the {term} of the particle. */ - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, - NULL, (xmlSchemaTypePtr) item, item->node, - "The particle's 'maxOccurs' must be 1, since an xs:all model " - "group is its term", NULL); + WXS_PARTICLE_TERM(particle) = + WXS_TREE_CAST WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)); + + particle = WXS_PTC_CAST particle->next; } } /** - * xmlSchemaGetCircAttrGrRef: + * xmlSchemaCheckAttrGroupCircularRecur: * @ctxtGr: the searched attribute group * @attr: the current attribute list to be processed * * This one is intended to be used by - * xmlSchemaCheckSRCAttributeGroupCircular only. + * xmlSchemaCheckAttrGroupCircular only. * * Returns the circular attribute grou reference, otherwise NULL. */ -static xmlSchemaAttributeGroupPtr -xmlSchemaGetCircAttrGrRef(xmlSchemaAttributeGroupPtr ctxtGr, - xmlSchemaAttributePtr attr) +static xmlSchemaQNameRefPtr +xmlSchemaCheckAttrGroupCircularRecur(xmlSchemaAttributeGroupPtr ctxtGr, + xmlSchemaItemListPtr list) { - xmlSchemaAttributeGroupPtr circ = NULL, gr; - int marked; + xmlSchemaAttributeGroupPtr gr; + xmlSchemaQNameRefPtr ref, circ; + int i; /* * We will search for an attribute group reference which * references the context attribute group. */ - while (attr != NULL) { - marked = 0; - if (attr->type == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) { - gr = (xmlSchemaAttributeGroupPtr) attr; - if (gr->refItem != NULL) { - if (gr->refItem == ctxtGr) - return (gr); - else if (gr->refItem->flags & - XML_SCHEMAS_ATTRGROUP_MARKED) { - attr = attr->next; - continue; - } else { - /* - * Mark as visited to avoid infinite recursion on - * circular references not yet examined. - */ - gr->refItem->flags |= XML_SCHEMAS_ATTRGROUP_MARKED; - marked = 1; - } - } - if (gr->attributes != NULL) - circ = xmlSchemaGetCircAttrGrRef(ctxtGr, gr->attributes); + for (i = 0; i < list->nbItems; i++) { + ref = list->items[i]; + if ((ref->type == XML_SCHEMA_EXTRA_QNAMEREF) && + (ref->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) && + (ref->item != NULL)) + { + gr = WXS_ATTR_GROUP_CAST ref->item; + if (gr == ctxtGr) + return(ref); + if (gr->flags & XML_SCHEMAS_ATTRGROUP_MARKED) + continue; /* - * Unmark the visited group's attributes. + * Mark as visited to avoid infinite recursion on + * circular references not yet examined. */ - if (marked) - gr->refItem->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED; - if (circ != NULL) - return (circ); + if ((gr->attrUses) && + (gr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS)) + { + gr->flags |= XML_SCHEMAS_ATTRGROUP_MARKED; + circ = xmlSchemaCheckAttrGroupCircularRecur(ctxtGr, + (xmlSchemaItemListPtr) gr->attrUses); + gr->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED; + if (circ != NULL) + return (circ); + } + } - attr = attr->next; } return (NULL); } /** - * xmlSchemaCheckSRCAttributeGroupCircular: + * xmlSchemaCheckAttrGroupCircular: * attrGr: the attribute group definition * @ctxt: the parser context * @name: the name * * Checks for circular references of attribute groups. */ -static void +static int xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, - xmlSchemaParserCtxtPtr ctxt) + xmlSchemaParserCtxtPtr ctxt) { /* * Schema Representation Constraint: @@ -17917,34 +18943,341 @@ xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, * it must not be the case that a ·QName· is encountered at any depth * which resolves to the component corresponding to this <attributeGroup>. */ - /* - * Only global components can be referenced. - */ - if (((attrGr->flags & XML_SCHEMAS_ATTRGROUP_GLOBAL) == 0) || - (attrGr->attributes == NULL)) - return; + if (attrGr->attrUses == NULL) + return(0); + else if ((attrGr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) == 0) + return(0); else { - xmlSchemaAttributeGroupPtr circ; - - circ = xmlSchemaGetCircAttrGrRef(attrGr, attrGr->attributes); + xmlSchemaQNameRefPtr circ; + + circ = xmlSchemaCheckAttrGroupCircularRecur(attrGr, + (xmlSchemaItemListPtr) attrGr->attrUses); if (circ != NULL) { + xmlChar *str = NULL; /* * TODO: Report the referenced attr group as QName. */ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, - NULL, NULL, circ->node, + NULL, WXS_ITEM_NODE(WXS_BASIC_CAST circ), "Circular reference to the attribute group '%s' " - "defined", attrGr->name); + "defined", xmlSchemaGetComponentQName(&str, attrGr)); + FREE_AND_NULL(str); /* * NOTE: We will cut the reference to avoid further * confusion of the processor. - * BADSPEC: The spec should define how to process in this case. + * BADSPEC TODO: The spec should define how to process in this case. */ - circ->attributes = NULL; - circ->refItem = NULL; + circ->item = NULL; + return(ctxt->err); } } + return(0); +} + +static int +xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr); + +/** + * xmlSchemaExpandAttributeGroupRefs: + * @pctxt: the parser context + * @node: the node of the component holding the attribute uses + * @completeWild: the intersected wildcard to be returned + * @list: the attribute uses + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + * Attribute use prohibitions are removed from the list + * and returned via the @prohibs list. + * Pointlessness of attr. prohibs, if a matching attr. decl + * is existent a well, are checked. + */ +static int +xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBasicItemPtr item, + xmlSchemaWildcardPtr *completeWild, + xmlSchemaItemListPtr list, + xmlSchemaItemListPtr prohibs) +{ + xmlSchemaAttributeGroupPtr gr; + xmlSchemaAttributeUsePtr use; + xmlSchemaItemListPtr sublist; + int i, j; + int created = (*completeWild == NULL) ? 0 : 1; + + if (prohibs) + prohibs->nbItems = 0; + + for (i = 0; i < list->nbItems; i++) { + use = list->items[i]; + + if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) { + if (prohibs == NULL) { + PERROR_INT("xmlSchemaExpandAttributeGroupRefs", + "unexpected attr prohibition found"); + return(-1); + } + /* + * Remove from attribute uses. + */ + if (xmlSchemaItemListRemove(list, i) == -1) + return(-1); + i--; + /* + * Note that duplicate prohibitions were already + * handled at parsing time. + */ + /* + * Add to list of prohibitions. + */ + xmlSchemaItemListAddSize(prohibs, 2, use); + continue; + } + if ((use->type == XML_SCHEMA_EXTRA_QNAMEREF) && + ((WXS_QNAME_CAST use)->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP)) + { + if ((WXS_QNAME_CAST use)->item == NULL) + return(-1); + gr = WXS_ATTR_GROUP_CAST (WXS_QNAME_CAST use)->item; + /* + * Expand the referenced attr. group. + * TODO: remove this, this is done in a previous step, so + * already done here. + */ + if ((gr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) { + if (xmlSchemaAttributeGroupExpandRefs(pctxt, gr) == -1) + return(-1); + } + /* + * Build the 'complete' wildcard; i.e. intersect multiple + * wildcards. + */ + if (gr->attributeWildcard != NULL) { + if (*completeWild == NULL) { + *completeWild = gr->attributeWildcard; + } else { + if (! created) { + xmlSchemaWildcardPtr tmpWild; + + /* + * Copy the first encountered wildcard as context, + * except for the annotation. + * + * Although the complete wildcard might not correspond + * to any node in the schema, we will anchor it on + * the node of the owner component. + */ + tmpWild = xmlSchemaAddWildcard(pctxt, pctxt->schema, + XML_SCHEMA_TYPE_ANY_ATTRIBUTE, + WXS_ITEM_NODE(item)); + if (tmpWild == NULL) + return(-1); + if (xmlSchemaCloneWildcardNsConstraints(pctxt, + tmpWild, *completeWild) == -1) + return (-1); + tmpWild->processContents = (*completeWild)->processContents; + *completeWild = tmpWild; + created = 1; + } + + if (xmlSchemaIntersectWildcards(pctxt, *completeWild, + gr->attributeWildcard) == -1) + return(-1); + } + } + /* + * Just remove the reference if the referenced group does not + * contain any attribute uses. + */ + if (gr->attrUses == NULL) { + if (xmlSchemaItemListRemove(list, i) == -1) + return(-1); + i--; + continue; + } + /* + * Add the attribute uses. + */ + sublist = ((xmlSchemaItemListPtr) gr->attrUses); + if (sublist->nbItems != 0) { + list->items[i] = sublist->items[0]; + if (sublist->nbItems != 1) { + for (j = 1; j < sublist->nbItems; j++) { + i++; + if (xmlSchemaItemListInsert(list, + sublist->items[j], i) == -1) + return(-1); + } + } + } + } + + } + /* + * Handle pointless prohibitions of declared attributes. + */ + if (prohibs && (prohibs->nbItems != 0) && (list->nbItems != 0)) { + xmlSchemaAttributeUseProhibPtr prohib; + + for (i = prohibs->nbItems -1; i >= 0; i--) { + prohib = prohibs->items[i]; + for (j = 0; j < list->nbItems; j++) { + use = list->items[j]; + + if ((prohib->name == WXS_ATTRUSE_DECL_NAME(use)) && + (prohib->targetNamespace == WXS_ATTRUSE_DECL_TNS(use))) + { + xmlChar *str = NULL; + + xmlSchemaCustomWarning(ACTXT_CAST pctxt, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + prohib->node, NULL, + "Skipping pointless attribute use prohibition " + "'%s', since a corresponding attribute use " + "exists already in the type definition", + xmlSchemaFormatQName(&str, + prohib->targetNamespace, prohib->name), + NULL, NULL); + FREE_AND_NULL(str); + /* + * Remove the prohibition. + */ + if (xmlSchemaItemListRemove(prohibs, i) == -1) + return(-1); + break; + } + } + } + } + return(0); +} + +/** + * xmlSchemaAttributeGroupExpandRefs: + * @pctxt: the parser context + * @attrGr: the attribute group definition + * + * Computation of: + * {attribute uses} property + * {attribute wildcard} property + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + */ +static int +xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr) +{ + if ((attrGr->attrUses == NULL) || + (attrGr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED)) + return(0); + + attrGr->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED; + if (xmlSchemaExpandAttributeGroupRefs(pctxt, WXS_BASIC_CAST attrGr, + &(attrGr->attributeWildcard), attrGr->attrUses, NULL) == -1) + return(-1); + return(0); +} + +/** + * xmlSchemaAttributeGroupExpandRefs: + * @pctxt: the parser context + * @attrGr: the attribute group definition + * + * Substitutes contained attribute group references + * for their attribute uses. Wilcards are intersected. + * + * Schema Component Constraint: + * Attribute Group Definition Properties Correct (ag-props-correct) + */ +static int +xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributeGroupPtr attrGr) +{ + /* + * SPEC ag-props-correct + * (1) "The values of the properties of an attribute group definition + * must be as described in the property tableau in The Attribute + * Group Definition Schema Component (§3.6.1), modulo the impact of + * Missing Sub-components (§5.3);" + */ + + if ((attrGr->attrUses != NULL) && + (WXS_LIST_CAST attrGr->attrUses)->nbItems > 1) + { + xmlSchemaItemListPtr uses = WXS_LIST_CAST attrGr->attrUses; + xmlSchemaAttributeUsePtr use, tmp; + int i, j, hasId = 0; + + for (i = uses->nbItems -1; i >= 0; i--) { + use = uses->items[i]; + /* + * SPEC ag-props-correct + * (2) "Two distinct members of the {attribute uses} must not have + * {attribute declaration}s both of whose {name}s match and whose + * {target namespace}s are identical." + */ + if (i > 0) { + for (j = i -1; j >= 0; j--) { + tmp = uses->items[j]; + if ((WXS_ATTRUSE_DECL_NAME(use) == + WXS_ATTRUSE_DECL_NAME(tmp)) && + (WXS_ATTRUSE_DECL_TNS(use) == + WXS_ATTRUSE_DECL_TNS(tmp))) + { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + attrGr->node, WXS_BASIC_CAST attrGr, + "Duplicate %s", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + /* + * Remove the duplicate. + */ + if (xmlSchemaItemListRemove(uses, i) == -1) + return(-1); + goto next_use; + } + } + } + /* + * SPEC ag-props-correct + * (3) "Two distinct members of the {attribute uses} must not have + * {attribute declaration}s both of whose {type definition}s are or + * are derived from ID." + * TODO: Does 'derived' include member-types of unions? + */ + if (WXS_ATTRUSE_TYPEDEF(use) != NULL) { + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + if (hasId) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_AG_PROPS_CORRECT, + attrGr->node, WXS_BASIC_CAST attrGr, + "There must not exist more than one attribute " + "declaration of type 'xs:ID' " + "(or derived from 'xs:ID'). The %s violates this " + "constraint", + xmlSchemaGetComponentDesignation(&str, use), + NULL); + FREE_AND_NULL(str); + if (xmlSchemaItemListRemove(uses, i) == -1) + return(-1); + } + hasId = 1; + } + } +next_use: {} + } + } + return(0); } /** @@ -17953,88 +19286,108 @@ xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr, * @ctxt: the schema parser context * @name: the attribute name * - * Fixes finish doing the computations on the attributes definitions + * Resolves references to attribute group definitions. */ -static void -xmlSchemaResolveAttrGroupReferences(xmlSchemaAttributeGroupPtr attrgrp, - xmlSchemaParserCtxtPtr ctxt, const xmlChar * name) +static int +xmlSchemaResolveAttrGroupReferences(xmlSchemaQNameRefPtr ref, + xmlSchemaParserCtxtPtr ctxt) { - if (name == NULL) - name = attrgrp->name; - if (attrgrp->attributes != NULL) - return; - if (attrgrp->ref != NULL) { - xmlSchemaAttributeGroupPtr ref; + xmlSchemaAttributeGroupPtr group; - ref = xmlSchemaGetAttributeGroup(ctxt->schema, attrgrp->ref, - attrgrp->refNs); - if (ref == NULL) { - xmlSchemaPResCompAttrErr(ctxt, - XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) attrgrp, attrgrp->node, - "ref", attrgrp->ref, attrgrp->refNs, - XML_SCHEMA_TYPE_ATTRIBUTEGROUP, NULL); - return; - } - attrgrp->refItem = ref; - /* - * URGENT TODO: Do we need to resolve refs of the - * referenced attr. group itself first? I don't think so. - * If we need this, then check for circularity first! - * REMOVED: xmlSchemaResolveAttrGroupReferences(ref, ctxt, NULL); - */ - attrgrp->attributes = ref->attributes; - attrgrp->attributeWildcard = ref->attributeWildcard; - } + if (ref->item != NULL) + return(0); + group = xmlSchemaGetAttributeGroup(ctxt->schema, + ref->name, + ref->targetNamespace); + if (group == NULL) { + xmlSchemaPResCompAttrErr(ctxt, + XML_SCHEMAP_SRC_RESOLVE, + NULL, ref->node, + "ref", ref->name, ref->targetNamespace, + ref->itemType, NULL); + return(ctxt->err); + } + ref->item = WXS_BASIC_CAST group; + return(0); } /** - * xmlSchemaAttrCheckValConstr: + * xmlSchemaCheckAttrPropsCorrect: * @item: an schema attribute declaration/use * @ctxt: a schema parser context * @name: the name of the attribute * * - * Schema Component Constraint: Attribute Declaration Properties Correct - * (a-props-correct) - * Validates the value constraints of an attribute declaration/use. + * Schema Component Constraint: + * Attribute Declaration Properties Correct (a-props-correct) * - * Fixes finish doing the computations on the attributes definitions + * Validates the value constraints of an attribute declaration/use. + * NOTE that this needs the simle type definitions to be already + * builded and checked. */ -static void -xmlSchemaCheckAttrValConstr(xmlSchemaAttributePtr item, - xmlSchemaParserCtxtPtr pctxt) +static int +xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaAttributePtr attr) { /* - * 2 if there is a {value constraint}, the canonical lexical - * representation of its value must be ·valid· with respect - * to the {type definition} as defined in String Valid (§3.14.4). + * SPEC a-props-correct (1) + * "The values of the properties of an attribute declaration must + * be as described in the property tableau in The Attribute + * Declaration Schema Component (§3.2.1), modulo the impact of + * Missing Sub-components (§5.3)." */ - if (item->defValue != NULL) { + + if (WXS_ATTR_TYPEDEF(attr) == NULL) + return(0); + + if (attr->defValue != NULL) { int ret; - if (item->subtypes == NULL) { - PERROR_INT("xmlSchemaCheckAttrValConstr", - "type is missing"); - return; + /* + * SPEC a-props-correct (3) + * "If the {type definition} is or is derived from ID then there + * must not be a {value constraint}." + */ + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTR_TYPEDEF(attr), XML_SCHEMAS_ID)) + { + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_A_PROPS_CORRECT_3, + NULL, WXS_BASIC_CAST attr, + "Value constraints are not allowed if the type definition " + "is or is derived from xs:ID", + NULL, NULL); + return(pctxt->err); } + /* + * SPEC a-props-correct (2) + * "if there is a {value constraint}, the canonical lexical + * representation of its value must be ·valid· with respect + * to the {type definition} as defined in String Valid (§3.14.4)." + * TODO: Don't care about the *cononical* stuff here, this requirement + * will be removed in WXS 1.1 anyway. + */ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, - item->node, item->subtypes, item->defValue, &(item->defVal), + attr->node, WXS_ATTR_TYPEDEF(attr), + attr->defValue, &(attr->defVal), 1, 1, 0); if (ret != 0) { if (ret < 0) { - PERROR_INT("xmlSchemaAttrCheckValConstr", + PERROR_INT("xmlSchemaCheckAttrPropsCorrect", "calling xmlSchemaVCheckCVCSimpleType()"); - return; + return(-1); } - ret = XML_SCHEMAP_A_PROPS_CORRECT_2; xmlSchemaCustomErr(ACTXT_CAST pctxt, - ret, item->node, (xmlSchemaTypePtr) item, - "The value of the value constraint is not valid", NULL, NULL); - return; + XML_SCHEMAP_A_PROPS_CORRECT_2, + NULL, WXS_BASIC_CAST attr, + "The value of the value constraint is not valid", + NULL, NULL); + return(pctxt->err); } } + + return(0); } static xmlSchemaElementPtr @@ -18043,17 +19396,17 @@ xmlSchemaCheckSubstGroupCircular(xmlSchemaElementPtr elemDecl, { xmlSchemaElementPtr ret; - if (SUBST_GROUP_AFF(ancestor) == NULL) + if (WXS_SUBST_HEAD(ancestor) == NULL) return (NULL); - if (SUBST_GROUP_AFF(ancestor) == elemDecl) + if (WXS_SUBST_HEAD(ancestor) == elemDecl) return (ancestor); - if (SUBST_GROUP_AFF(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR) + if (WXS_SUBST_HEAD(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR) return (NULL); - SUBST_GROUP_AFF(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR; + WXS_SUBST_HEAD(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR; ret = xmlSchemaCheckSubstGroupCircular(elemDecl, - SUBST_GROUP_AFF(ancestor)); - SUBST_GROUP_AFF(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR; + WXS_SUBST_HEAD(ancestor)); + WXS_SUBST_HEAD(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR; return (ret); } @@ -18075,15 +19428,15 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, xmlSchemaElementPtr elemDecl) { int ret = 0; - xmlSchemaTypePtr typeDef = ELEM_TYPE(elemDecl); + xmlSchemaTypePtr typeDef = WXS_ELEM_TYPEDEF(elemDecl); /* * SPEC (1) "The values of the properties of an element declaration * must be as described in the property tableau in The Element * Declaration Schema Component (§3.3.1), modulo the impact of Missing * Sub-components (§5.3)." */ - if (SUBST_GROUP_AFF(elemDecl) != NULL) { - xmlSchemaElementPtr head = SUBST_GROUP_AFF(elemDecl), circ; + if (WXS_SUBST_HEAD(elemDecl) != NULL) { + xmlSchemaElementPtr head = WXS_SUBST_HEAD(elemDecl), circ; xmlSchemaCheckElementDeclComponent(head, pctxt); /* @@ -18093,7 +19446,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, if ((elemDecl->flags & XML_SCHEMAS_ELEM_GLOBAL) == 0) { xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_3, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "Only global element declarations can have a " "substitution group affiliation", NULL); ret = XML_SCHEMAP_E_PROPS_CORRECT_3; @@ -18106,7 +19459,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, */ if (head == elemDecl) circ = head; - else if (SUBST_GROUP_AFF(head) != NULL) + else if (WXS_SUBST_HEAD(head) != NULL) circ = xmlSchemaCheckSubstGroupCircular(head, head); else circ = NULL; @@ -18115,7 +19468,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_6, - NULL, (xmlSchemaTypePtr) circ, circ->node, + WXS_BASIC_CAST circ, NULL, "The element declaration '%s' defines a circular " "substitution group to element declaration '%s'", xmlSchemaGetComponentQName(&strA, circ), @@ -18140,7 +19493,7 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * attribute "final". */ - if (typeDef != ELEM_TYPE(SUBST_GROUP_AFF(elemDecl))) { + if (typeDef != WXS_ELEM_TYPEDEF(WXS_SUBST_HEAD(elemDecl))) { int set = 0; if (head->flags & XML_SCHEMAS_ELEM_FINAL_EXTENSION) @@ -18148,21 +19501,21 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, if (head->flags & XML_SCHEMAS_ELEM_FINAL_RESTRICTION) set |= SUBSET_RESTRICTION; - if (xmlSchemaCheckCOSDerivedOK(typeDef, - ELEM_TYPE(head), set) != 0) { + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST pctxt, typeDef, + WXS_ELEM_TYPEDEF(head), set) != 0) { xmlChar *strA = NULL, *strB = NULL, *strC = NULL; ret = XML_SCHEMAP_E_PROPS_CORRECT_4; xmlSchemaPCustomErrExt(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_4, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "The type definition '%s' was " "either rejected by the substitution group " "affiliation '%s', or not validly derived from its type " "definition '%s'", xmlSchemaGetComponentQName(&strA, typeDef), xmlSchemaGetComponentQName(&strB, head), - xmlSchemaGetComponentQName(&strC, ELEM_TYPE(head))); + xmlSchemaGetComponentQName(&strC, WXS_ELEM_TYPEDEF(head))); FREE_AND_NULL(strA) FREE_AND_NULL(strB) FREE_AND_NULL(strC) @@ -18177,17 +19530,17 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt, * XML 1.0, and should be avoided if backwards compatibility is desired" */ if ((elemDecl->value != NULL) && - ((IS_SIMPLE_TYPE(typeDef) && + ((WXS_IS_SIMPLE(typeDef) && xmlSchemaIsDerivedFromBuiltInType(typeDef, XML_SCHEMAS_ID)) || - (IS_COMPLEX_TYPE(typeDef) && - HAS_SIMPLE_CONTENT(typeDef) && + (WXS_IS_COMPLEX(typeDef) && + WXS_HAS_SIMPLE_CONTENT(typeDef) && xmlSchemaIsDerivedFromBuiltInType(typeDef->contentTypeDef, XML_SCHEMAS_ID)))) { ret = XML_SCHEMAP_E_PROPS_CORRECT_5; xmlSchemaPCustomErr(pctxt, XML_SCHEMAP_E_PROPS_CORRECT_5, - NULL, (xmlSchemaTypePtr) elemDecl, elemDecl->node, + WXS_BASIC_CAST elemDecl, NULL, "The type definition (or type definition's content type) is or " "is derived from ID; value constraints are not allowed in " "conjunction with such a type definition", NULL); @@ -18256,7 +19609,7 @@ static void xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaElementPtr elemDecl) { - if ((SUBST_GROUP_AFF(elemDecl) == NULL) || + if ((WXS_SUBST_HEAD(elemDecl) == NULL) || /* SPEC (1) "Its {abstract} is false." */ (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT)) return; @@ -18269,8 +19622,8 @@ xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, * {disallowed substitutions} as the blocking constraint, as defined in * Substitution Group OK (Transitive) (§3.3.6)." */ - for (head = SUBST_GROUP_AFF(elemDecl); head != NULL; - head = SUBST_GROUP_AFF(head)) { + for (head = WXS_SUBST_HEAD(elemDecl); head != NULL; + head = WXS_SUBST_HEAD(head)) { set = 0; methSet = 0; /* @@ -18321,7 +19674,7 @@ xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt, */ type = elemDecl->subtypes->baseType; while (type != NULL) { - if (IS_COMPLEX_TYPE(type)) { + if (WXS_IS_COMPLEX(type)) { if ((type->flags & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) && ((set & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) == 0)) @@ -18375,47 +19728,92 @@ xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl, } /** - * xmlSchemaResolveParticleReferences: - * @item: an schema component - * @ctxt: a schema parser context - * @name: the internal name of the component + * xmlSchemaResolveModelGroupParticleReferences: + * @particle: a particle component + * @ctxt: a parser context * - * Resolves references of misc. schema components. + * Resolves references of a model group's {particles} to + * model group definitions and to element declarations. */ static void -xmlSchemaResolveParticleReferences(xmlSchemaTreeItemPtr item, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) +xmlSchemaResolveModelGroupParticleReferences( + xmlSchemaParserCtxtPtr ctxt, + xmlSchemaModelGroupPtr mg) { - if (item->type != XML_SCHEMA_TYPE_PARTICLE) - return; - if ((item->children != NULL) && - (item->children->type == XML_SCHEMA_EXTRA_QNAMEREF)) { - xmlSchemaQNameRefPtr ref = (xmlSchemaQNameRefPtr) item->children; - xmlSchemaBasicItemPtr refItem; + xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg); + xmlSchemaQNameRefPtr ref; + xmlSchemaBasicItemPtr refItem; + + /* + * URGENT TODO: Test this. + */ + while (particle != NULL) { + if ((WXS_PARTICLE_TERM(particle) == NULL) || + ((WXS_PARTICLE_TERM(particle))->type != + XML_SCHEMA_EXTRA_QNAMEREF)) + { + goto next_particle; + } + ref = WXS_QNAME_CAST WXS_PARTICLE_TERM(particle); /* * Resolve the reference. + * NULL the {term} by default. */ - item->children = NULL; + particle->children = NULL; + refItem = xmlSchemaGetNamedComponent(ctxt->schema, ref->itemType, ref->name, ref->targetNamespace); if (refItem == NULL) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - NULL, GET_NODE(item), "ref", ref->name, + NULL, WXS_ITEM_NODE(particle), "ref", ref->name, ref->targetNamespace, ref->itemType, NULL); - } else { - if (refItem->type == XML_SCHEMA_TYPE_GROUP) { + /* TODO: remove the particle. */ + goto next_particle; + } + if (refItem->type == XML_SCHEMA_TYPE_GROUP) { + if (WXS_MODELGROUPDEF_MODEL(refItem) == NULL) + /* TODO: remove the particle. */ + goto next_particle; + /* + * NOTE that we will assign the model group definition + * itself to the "term" of the particle. This will ease + * the check for circular model group definitions. After + * that the "term" will be assigned the model group of the + * model group definition. + */ + if ((WXS_MODELGROUPDEF_MODEL(refItem))->type == + XML_SCHEMA_TYPE_ALL) { /* - * NOTE that we will assign the model group definition - * itself to the "term" of the particle. This will ease - * the check for circular model group definitions. After - * that the "term" will be assigned the model group of the - * model group definition. + * SPEC cos-all-limited (1) + * SPEC cos-all-limited (1.2) + * "It appears only as the value of one or both of the + * following properties:" + * (1.1) "the {model group} property of a model group + * definition." + * (1.2) "the {term} property of a particle [... of] the " + * {content type} of a complex type definition." */ - item->children = (xmlSchemaTreeItemPtr) refItem; - } else - item->children = (xmlSchemaTreeItemPtr) refItem; + xmlSchemaCustomErr(ACTXT_CAST ctxt, + /* TODO: error code */ + XML_SCHEMAP_COS_ALL_LIMITED, + WXS_ITEM_NODE(particle), NULL, + "A model group definition is referenced, but " + "it contains an 'all' model group, which " + "cannot be contained by model groups", + NULL, NULL); + /* TODO: remove the particle. */ + goto next_particle; + } + particle->children = (xmlSchemaTreeItemPtr) refItem; + } else { + /* + * TODO: Are referenced element declarations the only + * other components we expect here? + */ + particle->children = (xmlSchemaTreeItemPtr) refItem; } +next_particle: + particle = WXS_PTC_CAST particle->next; } } @@ -18448,7 +19846,7 @@ xmlSchemaAreValuesEqual(xmlSchemaValPtr x, * string comparison for string based types. */ if ((ptx->builtInType == XML_SCHEMAS_STRING) || - IS_ANY_SIMPLE_TYPE(ptx)) { + WXS_IS_ANY_SIMPLE_TYPE(ptx)) { if (! xmlStrEqual( xmlSchemaValueGetAsString(x), xmlSchemaValueGetAsString(y))) @@ -18479,22 +19877,165 @@ xmlSchemaAreValuesEqual(xmlSchemaValPtr x, } /** - * xmlSchemaResolveAttrReferences: - * @item: an schema attribute declaration/use. - * @ctxt: a schema parser context - * @name: the name of the attribute + * xmlSchemaResolveAttrUseReferences: + * @item: an attribute use + * @ctxt: a parser context * - * Fixes finish doing the computations on attribute declarations/uses. + * Resolves the referenced attribute declaration. */ -static void -xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, - xmlSchemaParserCtxtPtr ctxt, - const xmlChar * name ATTRIBUTE_UNUSED) +static int +xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause, + xmlSchemaParserCtxtPtr ctxt) { + if ((ctxt == NULL) || (ause == NULL)) + return(-1); + if ((ause->attrDecl == NULL) || + (ause->attrDecl->type != XML_SCHEMA_EXTRA_QNAMEREF)) + return(0); + + { + xmlSchemaQNameRefPtr ref = WXS_QNAME_CAST ause->attrDecl; + + /* + * TODO: Evaluate, what errors could occur if the declaration is not + * found. + */ + ause->attrDecl = xmlSchemaGetAttributeDecl(ctxt->schema, + ref->name, ref->targetNamespace); + if (ause->attrDecl == NULL) { + xmlSchemaPResCompAttrErr(ctxt, + XML_SCHEMAP_SRC_RESOLVE, + WXS_BASIC_CAST ause, ause->node, + "ref", ref->name, ref->targetNamespace, + XML_SCHEMA_TYPE_ATTRIBUTE, NULL); + return(ctxt->err);; + } + } + return(0); +} + +/** + * xmlSchemaCheckAttrUsePropsCorrect: + * @ctxt: a parser context + * @use: an attribute use + * + * Schema Component Constraint: + * Attribute Use Correct (au-props-correct) + * + */ +static int +xmlSchemaCheckAttrUsePropsCorrect(xmlSchemaParserCtxtPtr ctxt, + xmlSchemaAttributeUsePtr use) +{ + if ((ctxt == NULL) || (use == NULL)) + return(-1); + if ((use->defValue == NULL) || (WXS_ATTRUSE_DECL(use) == NULL) || + ((WXS_ATTRUSE_DECL(use))->type != XML_SCHEMA_TYPE_ATTRIBUTE)) + return(0); + /* - * TODO: If including this is done twice (!) for every attribute. - * -> Hmm, check if this is still done. + * SPEC au-props-correct (1) + * "The values of the properties of an attribute use must be as + * described in the property tableau in The Attribute Use Schema + * Component (§3.5.1), modulo the impact of Missing + * Sub-components (§5.3)." */ + + if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) && + ((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMAS_ATTR_FIXED) && + ((use->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0)) + { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT_2, + WXS_BASIC_CAST use, NULL, + "The attribute declaration has a 'fixed' value constraint " + ", thus the attribute use must also have a 'fixed' value " + "constraint", + NULL); + return(ctxt->err); + } + /* + * Compute and check the value constraint's value. + */ + if ((use->defVal != NULL) && (WXS_ATTRUSE_TYPEDEF(use) != NULL)) { + int ret; + /* + * TODO: The spec seems to be missing a check of the + * value constraint of the attribute use. We will do it here. + */ + /* + * SPEC a-props-correct (3) + */ + if (xmlSchemaIsDerivedFromBuiltInType( + WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID)) + { + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT, + NULL, WXS_BASIC_CAST use, + "Value constraints are not allowed if the type definition " + "is or is derived from xs:ID", + NULL, NULL); + return(ctxt->err); + } + + ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST ctxt, + use->node, WXS_ATTRUSE_TYPEDEF(use), + use->defValue, &(use->defVal), + 1, 1, 0); + if (ret != 0) { + if (ret < 0) { + PERROR_INT2("xmlSchemaCheckAttrUsePropsCorrect", + "calling xmlSchemaVCheckCVCSimpleType()"); + return(-1); + } + xmlSchemaCustomErr(ACTXT_CAST ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT, + NULL, WXS_BASIC_CAST use, + "The value of the value constraint is not valid", + NULL, NULL); + return(ctxt->err); + } + } + /* + * SPEC au-props-correct (2) + * "If the {attribute declaration} has a fixed + * {value constraint}, then if the attribute use itself has a + * {value constraint}, it must also be fixed and its value must match + * that of the {attribute declaration}'s {value constraint}." + */ + if (((WXS_ATTRUSE_DECL(use))->defVal != NULL) && + (((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0)) + { + if (! xmlSchemaAreValuesEqual(use->defVal, + (WXS_ATTRUSE_DECL(use))->defVal)) + { + xmlSchemaPCustomErr(ctxt, + XML_SCHEMAP_AU_PROPS_CORRECT_2, + WXS_BASIC_CAST use, NULL, + "The 'fixed' value constraint of the attribute use " + "must match the attribute declaration's value " + "constraint '%s'", + (WXS_ATTRUSE_DECL(use))->defValue); + } + return(ctxt->err); + } + return(0); +} + + + + +/** + * xmlSchemaResolveAttrTypeReferences: + * @item: an attribute declaration + * @ctxt: a parser context + * + * Resolves the referenced type definition component. + */ +static int +xmlSchemaResolveAttrTypeReferences(xmlSchemaAttributePtr item, + xmlSchemaParserCtxtPtr ctxt) +{ /* * The simple type definition corresponding to the <simpleType> element * information item in the [children], if present, otherwise the simple @@ -18502,85 +20043,32 @@ xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, * [attribute], if present, otherwise the ·simple ur-type definition·. */ if (item->flags & XML_SCHEMAS_ATTR_INTERNAL_RESOLVED) - return; + return(0); item->flags |= XML_SCHEMAS_ATTR_INTERNAL_RESOLVED; if (item->subtypes != NULL) - return; + return(0); if (item->typeName != NULL) { xmlSchemaTypePtr type; type = xmlSchemaGetType(ctxt->schema, item->typeName, item->typeNs); - if ((type == NULL) || (! IS_SIMPLE_TYPE(type))) { + if ((type == NULL) || (! WXS_IS_SIMPLE(type))) { xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) item, item->node, + WXS_BASIC_CAST item, item->node, "type", item->typeName, item->typeNs, XML_SCHEMA_TYPE_SIMPLE, NULL); + return(ctxt->err); } else item->subtypes = type; - } else if (item->ref != NULL) { - xmlSchemaAttributePtr decl; - - /* - * We have an attribute use here; assign the referenced - * attribute declaration. - */ + } else { /* - * TODO: Evaluate, what errors could occur if the declaration is not - * found. It might be possible that the "typefixup" might crash if - * no ref declaration was found. + * The type defaults to the xs:anySimpleType. */ - decl = xmlSchemaGetAttributeDecl(ctxt->schema, item->ref, item->refNs); - if (decl == NULL) { - xmlSchemaPResCompAttrErr(ctxt, - XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) item, item->node, - "ref", item->ref, item->refNs, - XML_SCHEMA_TYPE_ATTRIBUTE, NULL); - return; - } - item->refDecl = decl; - xmlSchemaResolveAttrReferences(decl, ctxt, NULL); - item->subtypes = decl->subtypes; - /* - * Attribute Use Correct - * au-props-correct.2: If the {attribute declaration} has a fixed - * {value constraint}, then if the attribute use itself has a - * {value constraint}, it must also be fixed and its value must match - * that of the {attribute declaration}'s {value constraint}. - */ - if ((decl->flags & XML_SCHEMAS_ATTR_FIXED) && - (item->defValue != NULL)) { - if ((item->flags & XML_SCHEMAS_ATTR_FIXED) == 0) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_AU_PROPS_CORRECT_2, - NULL, NULL, item->node, - "The attribute declaration has a 'fixed' value constraint " - ", thus it must be 'fixed' in attribute use as well", - NULL); - } else { - if (! xmlSchemaAreValuesEqual(item->defVal, decl->defVal)) { - xmlSchemaPCustomErr(ctxt, - XML_SCHEMAP_AU_PROPS_CORRECT_2, - NULL, NULL, item->node, - "The 'fixed' value constraint of the attribute use " - "must match the attribute declaration's value " - "constraint '%s'", - decl->defValue); - } - } - /* - * FUTURE: One should change the values of the attr. use - * if ever validation should be attempted even if the - * schema itself was not fully valid. - */ - } - } else { - /* The type of this attribute is the xs:anySimpleType. */ item->subtypes = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE); } + return(0); } /** @@ -18590,14 +20078,15 @@ xmlSchemaResolveAttrReferences(xmlSchemaAttributePtr item, * @name: the attribute name * * Resolve keyRef references to key/unique IDCs. + * Schema Component Constraint: + * Identity-constraint Definition Properties Correct (c-props-correct) */ -static void +static int xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, - xmlSchemaParserCtxtPtr pctxt, - const xmlChar * name ATTRIBUTE_UNUSED) + xmlSchemaParserCtxtPtr pctxt) { if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) - return; + return(0); if (idc->ref->name != NULL) { idc->ref->item = (xmlSchemaBasicItemPtr) xmlSchemaGetIDC(pctxt->schema, idc->ref->name, @@ -18609,11 +20098,22 @@ xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, */ xmlSchemaPResCompAttrErr(pctxt, XML_SCHEMAP_SRC_RESOLVE, - (xmlSchemaTypePtr) idc, idc->node, + WXS_BASIC_CAST idc, idc->node, "refer", idc->ref->name, idc->ref->targetNamespace, XML_SCHEMA_TYPE_IDC_KEY, NULL); - return; + return(pctxt->err); + } else if (idc->ref->item->type == XML_SCHEMA_TYPE_IDC_KEYREF) { + /* + * SPEC c-props-correct (1) + */ + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_C_PROPS_CORRECT, + NULL, WXS_BASIC_CAST idc, + "The keyref references a keyref", + NULL, NULL); + idc->ref->item = NULL; + return(pctxt->err); } else { if (idc->nbFields != ((xmlSchemaIDCPtr) idc->ref->item)->nbFields) { @@ -18627,20 +20127,417 @@ xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc, * the cardinality of the {fields} must equal that of * the {fields} of the {referenced key}. */ - xmlSchemaPCustomErr(pctxt, + xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_C_PROPS_CORRECT, - NULL, (xmlSchemaTypePtr) idc, idc->node, + NULL, WXS_BASIC_CAST idc, "The cardinality of the keyref differs from the " - "cardinality of the referenced key '%s'", + "cardinality of the referenced key/unique '%s'", xmlSchemaFormatQName(&str, refer->targetNamespace, - refer->name) - ); + refer->name), + NULL); FREE_AND_NULL(str) + return(pctxt->err); } } } + return(0); +} + +static int +xmlSchemaResolveAttrUseProhibReferences(xmlSchemaAttributeUseProhibPtr prohib, + xmlSchemaParserCtxtPtr pctxt) +{ + if (xmlSchemaGetAttributeDecl(pctxt->schema, prohib->name, + prohib->targetNamespace) == NULL) { + + xmlSchemaPResCompAttrErr(pctxt, + XML_SCHEMAP_SRC_RESOLVE, + NULL, prohib->node, + "ref", prohib->name, prohib->targetNamespace, + XML_SCHEMA_TYPE_ATTRIBUTE, NULL); + return(XML_SCHEMAP_SRC_RESOLVE); + } + return(0); +} + +#define WXS_REDEFINED_TYPE(c) \ +(((xmlSchemaTypePtr) item)->flags & XML_SCHEMAS_TYPE_REDEFINED) + +#define WXS_REDEFINED_MODEL_GROUP_DEF(c) \ +(((xmlSchemaModelGroupDefPtr) item)->flags & XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED) + +#define WXS_REDEFINED_ATTR_GROUP(c) \ +(((xmlSchemaAttributeGroupPtr) item)->flags & XML_SCHEMAS_ATTRGROUP_REDEFINED) + +static int +xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt) +{ + int err = 0; + xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs; + xmlSchemaBasicItemPtr prev, item; + int wasRedefined; + + if (redef == NULL) + return(0); + + do { + item = redef->item; + /* + * First try to locate the redefined component in the + * schema graph starting with the redefined schema. + * NOTE: According to this schema bug entry: + * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005OctDec/0019.html + * it's not clear if the referenced component needs to originate + * from the <redefine>d schema _document_ or the schema; the latter + * would include all imported and included sub-schemas of the + * <redefine>d schema. Currenlty we latter approach is used. + * SUPPLEMENT: It seems that the WG moves towards the latter + * approach, so we are doing it right. + * + */ + prev = xmlSchemaFindRedefCompInGraph( + redef->targetBucket, item->type, + redef->refName, redef->refTargetNs); + if (prev == NULL) { + xmlChar *str = NULL; + xmlNodePtr node; + + /* + * SPEC src-redefine: + * (6.2.1) "The ·actual value· of its own name attribute plus + * target namespace must successfully ·resolve· to a model + * group definition in I." + * (7.2.1) "The ·actual value· of its own name attribute plus + * target namespace must successfully ·resolve· to an attribute + * group definition in I." + + * + * Note that, if we are redefining with the use of references + * to components, the spec assumes the src-resolve to be used; + * but this won't assure that we search only *inside* the + * redefined schema. + */ + if (redef->reference) + node = WXS_ITEM_NODE(redef->reference); + else + node = WXS_ITEM_NODE(item); + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* + * TODO: error code. + * Probably XML_SCHEMAP_SRC_RESOLVE, if this is using the + * reference kind. + */ + XML_SCHEMAP_SRC_REDEFINE, node, NULL, + "The %s '%s' to be redefined could not be found in " + "the redefined schema", + WXS_ITEM_TYPE_NAME(item), + xmlSchemaFormatQName(&str, redef->refTargetNs, + redef->refName)); + FREE_AND_NULL(str); + err = pctxt->err; + redef = redef->next; + continue; + } + /* + * TODO: Obtaining and setting the redefinition state is really + * clumsy. + */ + wasRedefined = 0; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if ((WXS_TYPE_CAST prev)->flags & + XML_SCHEMAS_TYPE_REDEFINED) + { + wasRedefined = 1; + break; + } + /* Mark it as redefined. */ + (WXS_TYPE_CAST prev)->flags |= XML_SCHEMAS_TYPE_REDEFINED; + /* + * Assign the redefined type to the + * base type of the redefining type. + * TODO: How + */ + ((xmlSchemaTypePtr) item)->baseType = + (xmlSchemaTypePtr) prev; + break; + case XML_SCHEMA_TYPE_GROUP: + if ((WXS_MODEL_GROUPDEF_CAST prev)->flags & + XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED) + { + wasRedefined = 1; + break; + } + /* Mark it as redefined. */ + (WXS_MODEL_GROUPDEF_CAST prev)->flags |= + XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED; + if (redef->reference != NULL) { + /* + * Overwrite the QName-reference with the + * referenced model group def. + */ + (WXS_PTC_CAST redef->reference)->children = + WXS_TREE_CAST prev; + } + redef->target = prev; + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((WXS_ATTR_GROUP_CAST prev)->flags & + XML_SCHEMAS_ATTRGROUP_REDEFINED) + { + wasRedefined = 1; + break; + } + (WXS_ATTR_GROUP_CAST prev)->flags |= + XML_SCHEMAS_ATTRGROUP_REDEFINED; + if (redef->reference != NULL) { + /* + * Assign the redefined attribute group to the + * QName-reference component. + * This is the easy case, since we will just + * expand the redefined group. + */ + (WXS_QNAME_CAST redef->reference)->item = prev; + redef->target = NULL; + } else { + /* + * This is the complicated case: we need + * to apply src-redefine (7.2.2) at a later + * stage, i.e. when attribute group references + * have beed expanded and simple types have + * beed fixed. + */ + redef->target = prev; + } + break; + default: + PERROR_INT("xmlSchemaResolveRedefReferences", + "Unexpected redefined component type"); + return(-1); + } + if (wasRedefined) { + xmlChar *str = NULL; + xmlNodePtr node; + + if (redef->reference) + node = WXS_ITEM_NODE(redef->reference); + else + node = WXS_ITEM_NODE(redef->item); + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + /* TODO: error code. */ + XML_SCHEMAP_SRC_REDEFINE, + node, NULL, + "The referenced %s was already redefined. Multiple " + "redefinition of the same component is not supported", + xmlSchemaGetComponentDesignation(&str, prev), + NULL); + FREE_AND_NULL(str) + err = pctxt->err; + redef = redef->next; + continue; + } + redef = redef->next; + } while (redef != NULL); + + return(err); +} + +static int +xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt) +{ + int err = 0; + xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs; + xmlSchemaBasicItemPtr item; + + if (redef == NULL) + return(0); + + do { + if (redef->target == NULL) { + redef = redef->next; + continue; + } + item = redef->item; + + switch (item->type) { + case XML_SCHEMA_TYPE_SIMPLE: + case XML_SCHEMA_TYPE_COMPLEX: + /* + * Since the spec wants the {name} of the redefined + * type to be 'absent', we'll NULL it. + */ + (WXS_TYPE_CAST redef->target)->name = NULL; + + /* + * TODO: Seems like there's nothing more to do. The normal + * inheritance mechanism is used. But not 100% sure. + */ + break; + case XML_SCHEMA_TYPE_GROUP: + /* + * URGENT TODO: + * SPEC src-redefine: + * (6.2.2) "The {model group} of the model group definition + * which corresponds to it per XML Representation of Model + * Group Definition Schema Components (§3.7.2) must be a + * ·valid restriction· of the {model group} of that model + * group definition in I, as defined in Particle Valid + * (Restriction) (§3.9.6)." + */ + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + /* + * SPEC src-redefine: + * (7.2.2) "The {attribute uses} and {attribute wildcard} of + * the attribute group definition which corresponds to it + * per XML Representation of Attribute Group Definition Schema + * Components (§3.6.2) must be ·valid restrictions· of the + * {attribute uses} and {attribute wildcard} of that attribute + * group definition in I, as defined in clause 2, clause 3 and + * clause 4 of Derivation Valid (Restriction, Complex) + * (§3.4.6) (where references to the base type definition are + * understood as references to the attribute group definition + * in I)." + */ + err = xmlSchemaCheckDerivationOKRestriction2to4(pctxt, + XML_SCHEMA_ACTION_REDEFINE, + item, redef->target, + (WXS_ATTR_GROUP_CAST item)->attrUses, + (WXS_ATTR_GROUP_CAST redef->target)->attrUses, + (WXS_ATTR_GROUP_CAST item)->attributeWildcard, + (WXS_ATTR_GROUP_CAST redef->target)->attributeWildcard); + if (err == -1) + return(-1); + break; + default: + break; + } + redef = redef->next; + } while (redef != NULL); + return(0); } + + +static int +xmlSchemaAddComponents(xmlSchemaParserCtxtPtr pctxt, + xmlSchemaBucketPtr bucket) +{ + xmlSchemaBasicItemPtr item; + int err; + xmlHashTablePtr *table; + const xmlChar *name; + int i; +#define WXS_GET_GLOBAL_HASH(c, s, slot) { \ + if (WXS_IS_BUCKET_IMPMAIN((c)->type)) \ + table = &(WXS_IMPBUCKET((c))->schema->slot); \ + else \ + table = &(WXS_INCBUCKET((c))->ownerImport->schema->slot); } + + /* + * Add global components to the schema's hash tables. + * This is the place where duplicate components will be + * detected. + * TODO: I think normally we should support imports of the + * same namespace from multiple locations. We don't do currently, + * but if we do then according to: + * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2224 + * we would need, if imported directly, to import redefined + * components as well to be able to catch clashing components. + * (I hope I'll still know what this means after some months :-() + */ + if (bucket == NULL) + return(-1); + if (bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) + return(0); + bucket->flags |= XML_SCHEMA_BUCKET_COMPS_ADDED; + + for (i = 0; i < bucket->globals->nbItems; i++) { + item = bucket->globals->items[i]; + table = NULL; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + case XML_SCHEMA_TYPE_SIMPLE: + if (WXS_REDEFINED_TYPE(item)) + continue; + name = (WXS_TYPE_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, typeDecl) + break; + case XML_SCHEMA_TYPE_ELEMENT: + name = (WXS_ELEM_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, elemDecl) + break; + case XML_SCHEMA_TYPE_ATTRIBUTE: + name = (WXS_ATTR_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, attrDecl) + break; + case XML_SCHEMA_TYPE_GROUP: + if (WXS_REDEFINED_MODEL_GROUP_DEF(item)) + continue; + name = (WXS_MODEL_GROUPDEF_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, groupDecl) + break; + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if (WXS_REDEFINED_ATTR_GROUP(item)) + continue; + name = (WXS_ATTR_GROUP_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, attrgrpDecl) + break; + case XML_SCHEMA_TYPE_IDC_KEY: + case XML_SCHEMA_TYPE_IDC_UNIQUE: + case XML_SCHEMA_TYPE_IDC_KEYREF: + name = (WXS_IDC_CAST item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, idcDef) + break; + case XML_SCHEMA_TYPE_NOTATION: + name = ((xmlSchemaNotationPtr) item)->name; + WXS_GET_GLOBAL_HASH(bucket, schema, notaDecl) + break; + default: + PERROR_INT("xmlSchemaAddComponents", + "Unexpected global component type"); + continue; + } + if (*table == NULL) { + *table = xmlHashCreateDict(10, pctxt->dict); + if (*table == NULL) { + PERROR_INT("xmlSchemaAddComponents", + "failed to create a component hash table"); + return(-1); + } + } + err = xmlHashAddEntry(*table, name, item); + if (err != 0) { + xmlChar *str = NULL; + + xmlSchemaCustomErr(ACTXT_CAST pctxt, + XML_SCHEMAP_REDEFINED_TYPE, + WXS_ITEM_NODE(item), + WXS_BASIC_CAST item, + "A global %s '%s' does already exist", + WXS_ITEM_TYPE_NAME(item), + xmlSchemaGetComponentQName(&str, item)); + FREE_AND_NULL(str); + } + } + /* + * Process imported/included schemas. + */ + if (bucket->relations != NULL) { + xmlSchemaSchemaRelationPtr rel = bucket->relations; + do { + if ((rel->bucket != NULL) && + ((rel->bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) == 0)) { + if (xmlSchemaAddComponents(pctxt, rel->bucket) == -1) + return(-1); + } + rel = rel->next; + } while (rel != NULL); + } + return(0); +} static int xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) @@ -18653,10 +20550,27 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) if ((con->pending == NULL) || (con->pending->nbItems == 0)) - return(0); + return(0); + + /* TODO: + * SPEC (src-redefine): + * (6.2) "If it has no such self-reference, then all of the + * following must be true:" + + * (6.2.2) The {model group} of the model group definition which + * corresponds to it per XML Representation of Model Group + * Definition Schema Components (§3.7.2) must be a ·valid + * restriction· of the {model group} of that model group definition + * in I, as defined in Particle Valid (Restriction) (§3.9.6)." + */ + xmlSchemaCheckSRCRedefineFirst(pctxt); + + /* + * Add global components to the schemata's hash tables. + */ + xmlSchemaAddComponents(pctxt, WXS_CONSTRUCTOR(pctxt)->mainBucket); pctxt->ctxtType = NULL; - pctxt->parentItem = NULL; items = (xmlSchemaTreeItemPtr *) con->pending->items; nbItems = con->pending->nbItems; /* @@ -18683,6 +20597,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) * - the term of the particle (e.g. a model group) * 6. IDC key-references: * - the referenced IDC 'key' or 'unique' definition + * 7. Attribute prohibitions which had a "ref" attribute. */ for (i = 0; i < nbItems; i++) { item = items[i]; @@ -18695,29 +20610,49 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) case XML_SCHEMA_TYPE_COMPLEX: case XML_SCHEMA_TYPE_SIMPLE: xmlSchemaResolveTypeReferences( - (xmlSchemaTypePtr) item, pctxt, NULL); + (xmlSchemaTypePtr) item, pctxt); FIXHFAILURE; break; case XML_SCHEMA_TYPE_ATTRIBUTE: - xmlSchemaResolveAttrReferences( - (xmlSchemaAttributePtr) item, pctxt, NULL); + xmlSchemaResolveAttrTypeReferences( + (xmlSchemaAttributePtr) item, pctxt); FIXHFAILURE; break; - case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: - xmlSchemaResolveAttrGroupReferences( - (xmlSchemaAttributeGroupPtr) item, pctxt, NULL); + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + xmlSchemaResolveAttrUseReferences( + (xmlSchemaAttributeUsePtr) item, pctxt); FIXHFAILURE; break; - case XML_SCHEMA_TYPE_PARTICLE: - xmlSchemaResolveParticleReferences( - (xmlSchemaTreeItemPtr) item, pctxt, NULL); + case XML_SCHEMA_EXTRA_QNAMEREF: + if ((WXS_QNAME_CAST item)->itemType == + XML_SCHEMA_TYPE_ATTRIBUTEGROUP) + { + xmlSchemaResolveAttrGroupReferences( + WXS_QNAME_CAST item, pctxt); + } + FIXHFAILURE; + break; + case XML_SCHEMA_TYPE_SEQUENCE: + case XML_SCHEMA_TYPE_CHOICE: + case XML_SCHEMA_TYPE_ALL: + xmlSchemaResolveModelGroupParticleReferences(pctxt, + WXS_MODEL_GROUP_CAST item); FIXHFAILURE; break; case XML_SCHEMA_TYPE_IDC_KEY: case XML_SCHEMA_TYPE_IDC_UNIQUE: case XML_SCHEMA_TYPE_IDC_KEYREF: xmlSchemaResolveIDCKeyReferences( - (xmlSchemaIDCPtr) item, pctxt, NULL); + (xmlSchemaIDCPtr) item, pctxt); + FIXHFAILURE; + break; + case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB: + /* + * Handle attribue prohibition which had a + * "ref" attribute. + */ + xmlSchemaResolveAttrUseProhibReferences( + WXS_ATTR_PROHIB_CAST item, pctxt); FIXHFAILURE; break; default: @@ -18767,6 +20702,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) break; } } + if (pctxt->nberrors != 0) + goto exit_error; /* * Model group definition references: * Such a reference is reflected by a particle at the component @@ -18777,26 +20714,39 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) */ for (i = 0; i < nbItems; i++) { item = items[i]; - if ((item->type == XML_SCHEMA_TYPE_PARTICLE) && - (item->children != NULL) && - (item->children->type == XML_SCHEMA_TYPE_GROUP)) { - xmlSchemaGroupDefReferenceTermFixup( - (xmlSchemaParticlePtr) item, pctxt, NULL); - FIXHFAILURE; + switch (item->type) { + case XML_SCHEMA_TYPE_SEQUENCE: + case XML_SCHEMA_TYPE_CHOICE: + xmlSchemaModelGroupToModelGroupDefFixup(pctxt, + WXS_MODEL_GROUP_CAST item); + break; + default: + break; } } if (pctxt->nberrors != 0) goto exit_error; /* - * Now that all references are resolved, no circularity occured - * and the 'term's of particles was fixed we can: - * 1. finish computation of properties of types - * 2. restrict type definitions and check those restrictions - * 3. extend type definitions and check those extensions - * - * This is the most complex part during schema construction. - * TODO: Maybe it would be better to stop at the first error here. + * Expand attribute group references of attribute group definitions. */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if ((! WXS_ATTR_GROUP_EXPANDED(item)) && + WXS_ATTR_GROUP_HAS_REFS(item)) + { + xmlSchemaAttributeGroupExpandRefs(pctxt, + WXS_ATTR_GROUP_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; /* * First compute the variety of simple types. This is needed as * a seperate step, since otherwise we won't be able to detect @@ -18806,7 +20756,7 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: - if (TYPE_IS_NOT_FIXEDUP_1((xmlSchemaTypePtr) item)) { + if (WXS_IS_TYPE_NOT_FIXED_1((xmlSchemaTypePtr) item)) { xmlSchemaFixupSimpleTypeStageOne(pctxt, (xmlSchemaTypePtr) item); FIXHFAILURE; @@ -18816,6 +20766,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) break; } } + if (pctxt->nberrors != 0) + goto exit_error; /* * Detect circular union types. Note that this needs the variety to * be already computed. @@ -18836,14 +20788,56 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - /* Now do the complete type fixup. */ + + /* + * Do the complete type fixup for simple types. + */ for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_SIMPLE: - case XML_SCHEMA_TYPE_COMPLEX: - xmlSchemaTypeFixup((xmlSchemaTypePtr) item, pctxt); + if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) { + xmlSchemaFixupSimpleTypeStageTwo(pctxt, WXS_TYPE_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + /* + * At this point we need all simple types to be builded and checked. + */ + /* + * Apply contraints for attribute declarations. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTE: + xmlSchemaCheckAttrPropsCorrect(pctxt, WXS_ATTR_CAST item); FIXHFAILURE; + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + /* + * Apply constraints for attribute uses. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_ATTRIBUTE_USE: + if (((xmlSchemaAttributeUsePtr)item)->defValue != NULL) { + xmlSchemaCheckAttrUsePropsCorrect(pctxt, + WXS_ATTR_USE_CAST item); + FIXHFAILURE; + } break; default: break; @@ -18851,24 +20845,73 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - + /* - * Now that we are sure the type definitions are finally constructed, - * we can: - * 1. check value contraint values of attribute declarations - * 2. apply various constraints to element declarations + * Apply constraints for attribute group definitions. */ for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { - case XML_SCHEMA_TYPE_ATTRIBUTE: - if (((xmlSchemaAttributePtr)item)->defValue != NULL) { - xmlSchemaCheckAttrValConstr( - (xmlSchemaAttributePtr) item, pctxt); + case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: + if (( (WXS_ATTR_GROUP_CAST item)->attrUses != NULL) && + ( (WXS_LIST_CAST (WXS_ATTR_GROUP_CAST item)->attrUses)->nbItems > 1)) + { + xmlSchemaCheckAGPropsCorrect(pctxt, WXS_ATTR_GROUP_CAST item); + FIXHFAILURE; + } + break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * Apply constraints for redefinitions. + */ + if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL) + xmlSchemaCheckSRCRedefineSecond(pctxt); + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * Fixup complex types. + */ + for (i = 0; i < nbItems; i++) { + item = con->pending->items[i]; + switch (item->type) { + case XML_SCHEMA_TYPE_COMPLEX: + if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) { + xmlSchemaFixupComplexType(pctxt, WXS_TYPE_CAST item); FIXHFAILURE; } break; + default: + break; + } + } + if (pctxt->nberrors != 0) + goto exit_error; + + /* + * The list could have changed, since xmlSchemaFixupComplexType() + * will create particles and model groups in some cases. + */ + items = (xmlSchemaTreeItemPtr *) con->pending->items; + nbItems = con->pending->nbItems; + + /* + * At this point all complex types need to be builded and checked. + */ + /* + * Apply some constraints for element declarations. + */ + for (i = 0; i < nbItems; i++) { + item = items[i]; + switch (item->type) { case XML_SCHEMA_TYPE_ELEMENT: + if ((((xmlSchemaElementPtr) item)->flags & XML_SCHEMAS_ELEM_INTERNAL_CHECKED) == 0) { xmlSchemaCheckElementDeclComponent( @@ -18886,12 +20929,13 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) * Finally we can build the automaton from the content model of * complex types. */ + for (i = 0; i < nbItems; i++) { item = items[i]; switch (item->type) { case XML_SCHEMA_TYPE_COMPLEX: xmlSchemaBuildContentModel((xmlSchemaTypePtr) item, pctxt); - FIXHFAILURE; + /* FIXHFAILURE; */ break; default: break; @@ -18899,9 +20943,8 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt) } if (pctxt->nberrors != 0) goto exit_error; - /* - * URGENT TODO: cos-element-consistent, cos-all-limited + * URGENT TODO: cos-element-consistent */ con->pending->nbItems = 0; return(0); @@ -18918,7 +20961,6 @@ exit_failure: * * parse a schema definition resource and build an internal * XML Shema struture which can be used to validate instances. - * *WARNING* this interface is highly subject to change * * Returns the internal XML Schema structure built from the resource or * NULL in case of error @@ -18959,7 +21001,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) /* Take ownership of the constructor to be able to free it. */ ctxt->ownsConstructor = 1; } - ctxt->constructor->schema = schema; + ctxt->constructor->mainSchema = schema; /* * Locate and add the schema document. */ @@ -18969,7 +21011,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt) if (res == -1) goto exit_failure; if (res != 0) - goto exit; + goto exit; if (bucket == NULL) { /* TODO: Error code, actually we failed to *locate* the schema. */ @@ -19060,7 +21102,30 @@ xmlSchemaSetParserErrors(xmlSchemaParserCtxtPtr ctxt, return; ctxt->error = err; ctxt->warning = warn; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; + if (ctxt->vctxt != NULL) + xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx); +} + +/** + * xmlSchemaSetParserStructuredErrors: + * @ctxt: a schema parser context + * @serror: the structured error function + * @ctx: the functions context + * + * Set the structured error callback + */ +void +xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, + xmlStructuredErrorFunc serror, + void *ctx) +{ + if (ctxt == NULL) + return; + ctxt->serror = serror; + ctxt->errCtxt = ctx; + if (ctxt->vctxt != NULL) + xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx); } /** @@ -19076,8 +21141,8 @@ xmlSchemaSetParserErrors(xmlSchemaParserCtxtPtr ctxt, */ int xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, - xmlSchemaValidityErrorFunc * err, - xmlSchemaValidityWarningFunc * warn, void **ctx) + xmlSchemaValidityErrorFunc * err, + xmlSchemaValidityWarningFunc * warn, void **ctx) { if (ctxt == NULL) return(-1); @@ -19086,7 +21151,7 @@ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, if (warn != NULL) *warn = ctxt->warning; if (ctx != NULL) - *ctx = ctxt->userData; + *ctx = ctxt->errCtxt; return(0); } @@ -19158,14 +21223,14 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type) */ return(XML_SCHEMA_WHITESPACE_COLLAPSE); } - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { /* * For list types the facet "whiteSpace" is fixed to "collapse". */ return (XML_SCHEMA_WHITESPACE_COLLAPSE); - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { return (XML_SCHEMA_WHITESPACE_UNKNOWN); - } else if (VARIETY_ATOMIC(type)) { + } else if (WXS_IS_ATOMIC(type)) { if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE) return (XML_SCHEMA_WHITESPACE_PRESERVE); else if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_REPLACE) @@ -19245,7 +21310,7 @@ xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, return(ret); if (bucket == NULL) { PERROR_INT("xmlSchemaAssembleByLocation", - "no schema bucket aquired"); + "no schema bucket acquired"); return(-1); } /* @@ -19283,6 +21348,13 @@ xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt, * no error yet. */ xmlSchemaFixupComponents(pctxt); + ret = pctxt->err; + /* + * Not nice, but we need somehow to channel the schema parser + * error to the validation context. + */ + if ((ret != 0) && (vctxt->err == 0)) + vctxt->err = ret; vctxt->nberrors += pctxt->nberrors; } else { /* Add to validation error sum. */ @@ -19339,11 +21411,15 @@ xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt) /* * Parse the value; we will assume an even number of values * to be given (this is how Xerces and XSV work). + * + * URGENT TODO: !! This needs to work for both + * @noNamespaceSchemaLocation AND @schemaLocation on the same + * element !! */ iattr = xmlSchemaGetMetaAttrInfo(vctxt, XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC); if (iattr == NULL) - xmlSchemaGetMetaAttrInfo(vctxt, + iattr = xmlSchemaGetMetaAttrInfo(vctxt, XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC); if (iattr == NULL) return (0); @@ -19572,7 +21648,7 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, NULL); return; } - aidc->bubbleDepth = -1; + aidc->keyrefDepth = -1; aidc->def = idcDef; aidc->next = NULL; if (vctxt->aidcs == NULL) @@ -19581,6 +21657,12 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, aidc->next = vctxt->aidcs; vctxt->aidcs = aidc; } + /* + * Save if we have keyrefs at all. + */ + if ((vctxt->hasKeyrefs == 0) && + (idcDef->type == XML_SCHEMA_TYPE_IDC_KEYREF)) + vctxt->hasKeyrefs = 1; } /** @@ -19589,7 +21671,7 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef, * * Creates a new IDC binding. * - * Returns the new binding in case of succeeded, NULL on internal errors. + * Returns the new IDC binding, NULL on internal errors. */ static xmlSchemaPSVIIDCBindingPtr xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef) @@ -19613,7 +21695,7 @@ xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef) * @vctxt: the WXS validation context * @item: the IDC node table item * - * The validation context is used to store an IDC node table items. + * The validation context is used to store IDC node table items. * They are stored to avoid copying them if IDC node-tables are merged * with corresponding parent IDC node-tables (bubbling). * @@ -19730,7 +21812,7 @@ xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind, } /** - * xmlSchemaIDCAquireBinding: + * xmlSchemaIDCAcquireBinding: * @vctxt: the WXS validation context * @matcher: the IDC matcher * @@ -19741,22 +21823,22 @@ xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind, * Returns an IDC binding or NULL on internal errors. */ static xmlSchemaPSVIIDCBindingPtr -xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt, +xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt, xmlSchemaIDCMatcherPtr matcher) { - xmlSchemaNodeInfoPtr info; + xmlSchemaNodeInfoPtr ielem; - info = vctxt->elemInfos[matcher->depth]; + ielem = vctxt->elemInfos[matcher->depth]; - if (info->idcTable == NULL) { - info->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def); - if (info->idcTable == NULL) + if (ielem->idcTable == NULL) { + ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def); + if (ielem->idcTable == NULL) return (NULL); - return(info->idcTable); + return(ielem->idcTable); } else { xmlSchemaPSVIIDCBindingPtr bind = NULL; - bind = info->idcTable; + bind = ielem->idcTable; do { if (bind->definition == matcher->aidc->def) return(bind); @@ -19772,6 +21854,15 @@ xmlSchemaIDCAquireBinding(xmlSchemaValidCtxtPtr vctxt, return (NULL); } +static xmlSchemaItemListPtr +xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, + xmlSchemaIDCMatcherPtr matcher) +{ + if (matcher->targets == NULL) + matcher->targets = xmlSchemaItemListCreate(); + return(matcher->targets); +} + /** * xmlSchemaIDCFreeKey: * @key: the IDC key @@ -19795,21 +21886,10 @@ xmlSchemaIDCFreeKey(xmlSchemaPSVIIDCKeyPtr key) static void xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind) { - if (bind->nodeTable != NULL) { - if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - int i; - /* - * Node-table items for keyrefs are not stored globally - * to the validation context, since they are not bubbled. - * We need to free them here. - */ - for (i = 0; i < bind->nbNodes; i++) { - xmlFree(bind->nodeTable[i]->keys); - xmlFree(bind->nodeTable[i]); - } - } + if (bind->nodeTable != NULL) xmlFree(bind->nodeTable); - } + if (bind->dupls != NULL) + xmlSchemaItemListFree(bind->dupls); xmlFree(bind); } @@ -19849,7 +21929,25 @@ xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher) for (i = 0; i < matcher->sizeKeySeqs; i++) if (matcher->keySeqs[i] != NULL) xmlFree(matcher->keySeqs[i]); - xmlFree(matcher->keySeqs); + xmlFree(matcher->keySeqs); + } + if (matcher->targets != NULL) { + if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) { + int i; + xmlSchemaPSVIIDCNodePtr idcNode; + /* + * Node-table items for keyrefs are not stored globally + * to the validation context, since they are not bubbled. + * We need to free them here. + */ + for (i = 0; i < matcher->targets->nbItems; i++) { + idcNode = + (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i]; + xmlFree(idcNode->keys); + xmlFree(idcNode); + } + } + xmlSchemaItemListFree(matcher->targets); } xmlFree(matcher); matcher = next; @@ -19926,7 +22024,7 @@ xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt, sto->sel = sel; sto->nbHistory = 0; -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: STO push '%s'\n", sto->sel->xpath); #endif @@ -19955,7 +22053,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, if (nodeType == XML_ATTRIBUTE_NODE) depth++; -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -19971,7 +22069,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, first = vctxt->xpathStates; sto = first; while (sto != head) { -#if DEBUG_IDC +#ifdef DEBUG_IDC if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] selector '%s'\n", sto->matcher->aidc->def->name, sto->sel->xpath); @@ -19996,7 +22094,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, /* * Full match. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: " "MATCH\n"); #endif @@ -20034,7 +22132,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, * Activate state objects for the IDC fields of * the IDC selector. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: " "activating field states\n"); #endif @@ -20049,7 +22147,7 @@ xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt, /* * An IDC key node was found by the IDC field. */ -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: key found\n"); #endif @@ -20084,15 +22182,16 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, int count) { int i, res; - const xmlChar *value = NULL; + xmlChar *value = NULL; *buf = xmlStrdup(BAD_CAST "["); for (i = 0; i < count; i++) { *buf = xmlStrcat(*buf, BAD_CAST "'"); - res = xmlSchemaGetCanonValueWhtsp(seq[i]->val, &value, - xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type)); + res = xmlSchemaGetCanonValueWhtspExt(seq[i]->val, + xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type), + &value); if (res == 0) - *buf = xmlStrcat(*buf, value); + *buf = xmlStrcat(*buf, BAD_CAST value); else { VERROR_INT("xmlSchemaFormatIDCKeySequence", "failed to compute a canonical value"); @@ -20103,7 +22202,7 @@ xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt, else *buf = xmlStrcat(*buf, BAD_CAST "'"); if (value != NULL) { - xmlFree((xmlChar *) value); + xmlFree(value); value = NULL; } } @@ -20156,13 +22255,13 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, xmlSchemaIDCStateObjPtr sto, nextsto; int res, matchDepth; xmlSchemaPSVIIDCKeyPtr key = NULL; - xmlSchemaTypePtr type = vctxt->inode->typeDef; + xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL; if (vctxt->xpathStates == NULL) return (0); sto = vctxt->xpathStates; -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -20182,7 +22281,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, "calling xmlStreamPop()"); return (-1); } -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: stream pop '%s'\n", sto->sel->xpath); #endif @@ -20199,16 +22298,39 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, continue; } if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) { - if (! IS_SIMPLE_TYPE(type)) { + /* + * NOTE: According to + * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2198 + * ... the simple-content of complex types is also allowed. + */ + + if (WXS_IS_COMPLEX(type)) { + if (WXS_HAS_SIMPLE_CONTENT(type)) { + /* + * Sanity check for complex types with simple content. + */ + simpleType = type->contentTypeDef; + if (simpleType == NULL) { + VERROR_INT("xmlSchemaXPathProcessHistory", + "field resolves to a CT with simple content " + "but the CT is missing the ST definition"); + return (-1); + } + } else + simpleType = NULL; + } else + simpleType = type; + if (simpleType == NULL) { xmlChar *str = NULL; + /* * Not qualified if the field resolves to a node of non * simple type. */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) sto->matcher->aidc->def, - "The field '%s' of %s does evaluate to a node of " + WXS_BASIC_CAST sto->matcher->aidc->def, + "The XPath '%s' of a field of %s does evaluate to a node of " "non-simple type", sto->sel->xpath, xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def)); @@ -20216,13 +22338,14 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, sto->nbHistory--; goto deregister_check; } + if ((key == NULL) && (vctxt->inode->val == NULL)) { /* * Failed to provide the normalized value; maybe * the value was invalid. */ VERROR(XML_SCHEMAV_CVC_IDC, - (xmlSchemaTypePtr) sto->matcher->aidc->def, + WXS_BASIC_CAST sto->matcher->aidc->def, "Warning: No precomputed value available, the value " "was either invalid or something strange happend"); sto->nbHistory--; @@ -20237,6 +22360,18 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, * key-sequences. The position in this list is determined * by the target node's depth relative to the matcher's * depth of creation (i.e. the depth of the scope element). + * + * Element Depth Pos List-entries + * <scope> 0 NULL + * <bar> 1 NULL + * <target/> 2 2 target + * <bar> + * </scope> + * + * The size of the list is only dependant on the depth of + * the tree. + * An entry will be NULLed in selector_leave, i.e. when + * we hit the target's */ pos = sto->depth - matcher->depth; idx = sto->sel->index; @@ -20289,33 +22424,30 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, keySeq = matcher->keySeqs[pos]; if (keySeq == NULL) { goto create_sequence; - } else { - if (keySeq[idx] != NULL) { - xmlChar *str = NULL; - /* - * cvc-identity-constraint: - * 3 For each node in the ·target node set· all - * of the {fields}, with that node as the context - * node, evaluate to either an empty node-set or - * a node-set with exactly one member, which must - * have a simple type. - * - * The key was already set; report an error. - */ - xmlSchemaCustomErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) matcher->aidc->def, - "The field '%s' of %s evaluates to a node-set " - "with more than one member", - sto->sel->xpath, - xmlSchemaGetIDCDesignation(&str, matcher->aidc->def)); - FREE_AND_NULL(str); - sto->nbHistory--; - goto deregister_check; - } else { - goto create_key; - } - } + } else if (keySeq[idx] != NULL) { + xmlChar *str = NULL; + /* + * cvc-identity-constraint: + * 3 For each node in the ·target node set· all + * of the {fields}, with that node as the context + * node, evaluate to either an empty node-set or + * a node-set with exactly one member, which must + * have a simple type. + * + * The key was already set; report an error. + */ + xmlSchemaCustomErr(ACTXT_CAST vctxt, + XML_SCHEMAV_CVC_IDC, NULL, + WXS_BASIC_CAST matcher->aidc->def, + "The XPath '%s' of a field of %s evaluates to a " + "node-set with more than one member", + sto->sel->xpath, + xmlSchemaGetIDCDesignation(&str, matcher->aidc->def)); + FREE_AND_NULL(str); + sto->nbHistory--; + goto deregister_check; + } else + goto create_key; create_sequence: /* @@ -20334,7 +22466,7 @@ create_sequence: matcher->keySeqs[pos] = keySeq; create_key: /* - * Created a key once per node only. + * Create a key once per node only. */ if (key == NULL) { key = (xmlSchemaPSVIIDCKeyPtr) xmlMalloc( @@ -20349,7 +22481,7 @@ create_key: /* * Consume the compiled value. */ - key->type = type; + key->type = simpleType; key->val = vctxt->inode->val; vctxt->inode->val = NULL; /* @@ -20365,10 +22497,11 @@ create_key: } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) { xmlSchemaPSVIIDCKeyPtr **keySeq = NULL; - xmlSchemaPSVIIDCBindingPtr bind; + /* xmlSchemaPSVIIDCBindingPtr bind; */ xmlSchemaPSVIIDCNodePtr ntItem; xmlSchemaIDCMatcherPtr matcher; xmlSchemaIDCPtr idc; + xmlSchemaItemListPtr targets; int pos, i, j, nbKeys; /* * Here we have the following scenario: @@ -20432,9 +22565,12 @@ create_key: * Get the IDC binding from the matcher and check for * duplicate key-sequences. */ - bind = xmlSchemaIDCAquireBinding(vctxt, matcher); +#if 0 + bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); +#endif + targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher); if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) && - (bind->nbNodes != 0)) { + (targets->nbItems != 0)) { xmlSchemaPSVIIDCKeyPtr ckey, bkey, *bkeySeq; i = 0; @@ -20443,32 +22579,38 @@ create_key: * Compare the key-sequences, key by key. */ do { - bkeySeq = bind->nodeTable[i]->keys; + bkeySeq = + ((xmlSchemaPSVIIDCNodePtr) targets->items[i])->keys; for (j = 0; j < nbKeys; j++) { ckey = (*keySeq)[j]; bkey = bkeySeq[j]; res = xmlSchemaAreValuesEqual(ckey->val, bkey->val); if (res == -1) { return (-1); - } else if (res == 0) + } else if (res == 0) { + /* + * One of the keys differs, so the key-sequence + * won't be equal; get out. + */ break; + } } if (res == 1) { /* - * Duplicate found. + * Duplicate key-sequence found. */ break; } i++; - } while (i < bind->nbNodes); - if (i != bind->nbNodes) { + } while (i < targets->nbItems); + if (i != targets->nbItems) { xmlChar *str = NULL, *strB = NULL; /* * TODO: Try to report the key-sequence. */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) idc, + WXS_BASIC_CAST idc, "Duplicate key-sequence %s in %s", xmlSchemaFormatIDCKeySequence(vctxt, &str, (*keySeq), nbKeys), @@ -20493,7 +22635,7 @@ create_key: memset(ntItem, 0, sizeof(xmlSchemaPSVIIDCNode)); /* - * Store the node-table item on global list. + * Store the node-table item in a global list. */ if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) { if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) { @@ -20525,7 +22667,10 @@ create_key: ntItem->nodeLine = vctxt->inode->nodeLine; ntItem->keys = *keySeq; *keySeq = NULL; - if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) { +#if 0 + if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1) { +#endif + if (xmlSchemaItemListAdd(targets, ntItem) == -1) { if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) { /* * Free the item, since keyref items won't be @@ -20549,7 +22694,7 @@ selector_key_error: */ xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_IDC, NULL, - (xmlSchemaTypePtr) idc, + WXS_BASIC_CAST idc, "Not all fields of %s evaluate to a node", xmlSchemaGetIDCDesignation(&str, idc), NULL); FREE_AND_NULL(str); @@ -20571,7 +22716,7 @@ deregister_check: * Deregister state objects if they reach the depth of creation. */ if ((sto->nbHistory == 0) && (sto->depth == depth)) { -#if DEBUG_IDC +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: STO pop '%s'\n", sto->sel->xpath); #endif @@ -20619,7 +22764,7 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, if (idc == NULL) return (0); -#if DEBUG_IDC +#ifdef DEBUG_IDC { xmlChar *str = NULL; xmlGenericError(xmlGenericErrorContext, @@ -20640,13 +22785,17 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, * Since IDCs bubbles are expensive we need to know the * depth at which the bubbles should stop; this will be * the depth of the top-most keyref IDC. If no keyref - * references a key/unique IDC, the bubbleDepth will + * references a key/unique IDC, the keyrefDepth will * be -1, indicating that no bubbles are needed. */ refIdc = (xmlSchemaIDCPtr) idc->ref->item; if (refIdc != NULL) { /* - * Lookup the augmented IDC. + * Remember that we have keyrefs on this node. + */ + vctxt->inode->hasKeyrefs = 1; + /* + * Lookup the referenced augmented IDC info. */ aidc = vctxt->aidcs; while (aidc != NULL) { @@ -20660,9 +22809,9 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, "definition"); return (-1); } - if ((aidc->bubbleDepth == -1) || - (vctxt->depth < aidc->bubbleDepth)) - aidc->bubbleDepth = vctxt->depth; + if ((aidc->keyrefDepth == -1) || + (vctxt->depth < aidc->keyrefDepth)) + aidc->keyrefDepth = vctxt->depth; } } /* @@ -20699,7 +22848,8 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, matcher->type = IDC_MATCHER; matcher->depth = vctxt->depth; matcher->aidc = aidc; -#if DEBUG_IDC + matcher->idcType = aidc->def->type; +#ifdef DEBUG_IDC xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n"); #endif /* @@ -20714,6 +22864,191 @@ xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt, return (0); } +static int +xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt, + xmlSchemaNodeInfoPtr ielem) +{ + xmlSchemaPSVIIDCBindingPtr bind; + int res, i, j, k, nbTargets, nbFields, nbDupls, nbNodeTable; + xmlSchemaPSVIIDCKeyPtr *keys, *ntkeys; + xmlSchemaPSVIIDCNodePtr *targets, *dupls; + + xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers; + /* vctxt->createIDCNodeTables */ + while (matcher != NULL) { + /* + * Skip keyref IDCs and empty IDC target-lists. + */ + if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) || + WXS_ILIST_IS_EMPTY(matcher->targets)) + { + matcher = matcher->next; + continue; + } + /* + * If we _want_ the IDC node-table to be created in any case + * then do so. Otherwise create them only if keyrefs need them. + */ + if ((! vctxt->createIDCNodeTables) && + ((matcher->aidc->keyrefDepth == -1) || + (matcher->aidc->keyrefDepth > vctxt->depth))) + { + matcher = matcher->next; + continue; + } + /* + * Get/create the IDC binding on this element for the IDC definition. + */ + bind = xmlSchemaIDCAcquireBinding(vctxt, matcher); + + if (! WXS_ILIST_IS_EMPTY(bind->dupls)) { + dupls = (xmlSchemaPSVIIDCNodePtr *) bind->dupls->items; + nbDupls = bind->dupls->nbItems; + } else { + dupls = NULL; + nbDupls = 0; + } + if (bind->nodeTable != NULL) { + nbNodeTable = bind->nbNodes; + } else { + nbNodeTable = 0; + } + + if ((nbNodeTable == 0) && (nbDupls == 0)) { + /* + * Transfer all IDC target-nodes to the IDC node-table. + */ + bind->nodeTable = + (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items; + bind->sizeNodes = matcher->targets->sizeItems; + bind->nbNodes = matcher->targets->nbItems; + + matcher->targets->items = NULL; + matcher->targets->sizeItems = 0; + matcher->targets->nbItems = 0; + } else { + /* + * Compare the key-sequences and add to the IDC node-table. + */ + nbTargets = matcher->targets->nbItems; + targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items; + nbFields = matcher->aidc->def->nbFields; + i = 0; + do { + keys = targets[i]->keys; + if (nbDupls) { + /* + * Search in already found duplicates first. + */ + j = 0; + do { + if (nbFields == 1) { + res = xmlSchemaAreValuesEqual(keys[0]->val, + dupls[j]->keys[0]->val); + if (res == -1) + goto internal_error; + if (res == 1) { + /* + * Equal key-sequence. + */ + goto next_target; + } + } else { + res = 0; + ntkeys = dupls[j]->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + ntkeys[k]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * One of the keys differs. + */ + break; + } + } + if (res == 1) { + /* + * Equal key-sequence found. + */ + goto next_target; + } + } + j++; + } while (j < nbDupls); + } + if (nbNodeTable) { + j = 0; + do { + if (nbFields == 1) { + res = xmlSchemaAreValuesEqual(keys[0]->val, + bind->nodeTable[j]->keys[0]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * The key-sequence differs. + */ + goto next_node_table_entry; + } + } else { + res = 0; + ntkeys = bind->nodeTable[j]->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + ntkeys[k]->val); + if (res == -1) + goto internal_error; + if (res == 0) { + /* + * One of the keys differs. + */ + goto next_node_table_entry; + } + } + } + /* + * Add the duplicate to the list of duplicates. + */ + if (bind->dupls == NULL) { + bind->dupls = xmlSchemaItemListCreate(); + if (bind->dupls == NULL) + goto internal_error; + } + if (xmlSchemaItemListAdd(bind->dupls, bind->nodeTable[j]) == -1) + goto internal_error; + /* + * Remove the duplicate entry from the IDC node-table. + */ + bind->nodeTable[j] = bind->nodeTable[bind->nbNodes -1]; + bind->nbNodes--; + + goto next_target; + +next_node_table_entry: + j++; + } while (j < nbNodeTable); + } + /* + * If everything is fine, then add the IDC target-node to + * the IDC node-table. + */ + if (xmlSchemaIDCAppendNodeTableItem(bind, targets[i]) == -1) + goto internal_error; + +next_target: + i++; + } while (i < nbTargets); + } + matcher = matcher->next; + } + return(0); + +internal_error: + return(-1); +} + /** * xmlSchemaBubbleIDCNodeTables: * @depth: the current tree depth @@ -20729,26 +23064,11 @@ static int xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) { xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */ - xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL, lastParBind = NULL; /* parent IDC bindings. */ - xmlSchemaPSVIIDCNodePtr node, parNode = NULL; /* node-table entries. */ - xmlSchemaPSVIIDCKeyPtr key, parKey; /* keys of in a key-sequence. */ + xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */ + xmlSchemaPSVIIDCNodePtr node, parNode = NULL, *dupls, *parNodes; /* node-table entries. */ xmlSchemaIDCAugPtr aidc; - int i, j, k, ret = 0, oldNum, newDupls; - int duplTop; + int i, j, k, ret = 0, nbFields, oldNum, oldDupls; - /* - * The node table has the following sections: - * - * O --> old node-table entries (first) - * O - * + --> new node-table entries - * + - * % --> new duplicate node-table entries - * % - * # --> old duplicate node-table entries - * # (last) - * - */ bind = vctxt->inode->idcTable; if (bind == NULL) { /* Fine, no table, no bubbles. */ @@ -20760,136 +23080,160 @@ xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt) * Walk all bindings; create new or add to existing bindings. * Remove duplicate key-sequences. */ -start_binding: while (bind != NULL) { - /* - * Skip keyref IDCs. - */ - if (bind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - bind = bind->next; - continue; - } + + if ((bind->nbNodes == 0) && WXS_ILIST_IS_EMPTY(bind->dupls)) + goto next_binding; /* * Check if the key/unique IDC table needs to be bubbled. */ - aidc = vctxt->aidcs; - do { - if (aidc->def == bind->definition) { - if ((aidc->bubbleDepth == -1) || - (aidc->bubbleDepth >= vctxt->depth)) { - bind = bind->next; - goto start_binding; + if (! vctxt->createIDCNodeTables) { + aidc = vctxt->aidcs; + do { + if (aidc->def == bind->definition) { + if ((aidc->keyrefDepth == -1) || + (aidc->keyrefDepth >= vctxt->depth)) { + goto next_binding; + } + break; } - break; - } - aidc = aidc->next; - } while (aidc != NULL); + aidc = aidc->next; + } while (aidc != NULL); + } if (parTable != NULL) parBind = *parTable; - while (parBind != NULL) { + /* + * Search a matching parent binding for the + * IDC definition. + */ + while (parBind != NULL) { + if (parBind->definition == bind->definition) + break; + parBind = parBind->next; + } + + if (parBind != NULL) { /* - * Search a matching parent binding for the - * IDC definition. + * Compare every node-table entry of the child node, + * i.e. the key-sequence within, ... */ - if (parBind->definition == bind->definition) { + oldNum = parBind->nbNodes; /* Skip newly added items. */ + if (! WXS_ILIST_IS_EMPTY(parBind->dupls)) { + oldDupls = parBind->dupls->nbItems; + dupls = (xmlSchemaPSVIIDCNodePtr *) parBind->dupls->items; + } else { + dupls = NULL; + oldDupls = 0; + } + + parNodes = parBind->nodeTable; + nbFields = bind->definition->nbFields; + + for (i = 0; i < bind->nbNodes; i++) { + node = bind->nodeTable[i]; + if (node == NULL) + continue; /* - * Compare every node-table entry of the child node, - * i.e. the key-sequence within, ... + * ...with every key-sequence of the parent node, already + * evaluated to be a duplicate key-sequence. */ - oldNum = parBind->nbNodes; /* Skip newly added items. */ - duplTop = oldNum + parBind->nbDupls; - newDupls = 0; - - for (i = 0; i < bind->nbNodes; i++) { - node = bind->nodeTable[i]; - if (node == NULL) - continue; - /* - * ...with every key-sequence of the parent node, already - * evaluated to be a duplicate key-sequence. - */ - if (parBind->nbDupls != 0) { - j = bind->nbNodes + newDupls; - while (j < duplTop) { - parNode = parBind->nodeTable[j]; - for (k = 0; k < bind->definition->nbFields; k++) { - key = node->keys[k]; - parKey = parNode->keys[k]; - ret = xmlSchemaAreValuesEqual(key->val, - parKey->val); - if (ret == -1) { - /* TODO: Internal error */ - return(-1); - } else if (ret == 0) + if (oldDupls) { + j = 0; + while (j < oldDupls) { + if (nbFields == 1) { + ret = xmlSchemaAreValuesEqual( + node->keys[0]->val, + dupls[j]->keys[0]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) { + j++; + continue; + } + } else { + parNode = dupls[j]; + for (k = 0; k < nbFields; k++) { + ret = xmlSchemaAreValuesEqual( + node->keys[k]->val, + parNode->keys[k]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) break; - } - if (ret == 1) - /* Duplicate found. */ - break; - j++; } - if (j != duplTop) { + if (ret == 1) /* Duplicate found. */ - continue; - } - } - /* - * ... and with every key-sequence of the parent node. - */ - j = 0; + break; + j++; + } + if (j != oldDupls) { + /* Duplicate found. Skip this entry. */ + continue; + } + } + /* + * ... and with every key-sequence of the parent node. + */ + if (oldNum) { + j = 0; while (j < oldNum) { - parNode = parBind->nodeTable[j]; - /* - * Compare key by key. - */ - for (k = 0; k < parBind->definition->nbFields; k++) { - key = node->keys[k]; - parKey = parNode->keys[k]; - - ret = xmlSchemaAreValuesEqual(key->val, - parKey->val); - if (ret == -1) { - /* TODO: Internal error */ - } else if (ret == 0) - break; - + parNode = parNodes[j]; + if (nbFields == 1) { + ret = xmlSchemaAreValuesEqual( + node->keys[0]->val, + parNode->keys[0]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) { + j++; + continue; + } + } else { + for (k = 0; k < nbFields; k++) { + ret = xmlSchemaAreValuesEqual( + node->keys[k]->val, + parNode->keys[k]->val); + if (ret == -1) + goto internal_error; + if (ret == 0) + break; + } } if (ret == 1) - /* - * The key-sequences are equal. - */ + /* Duplicate found. */ break; j++; } if (j != oldNum) { /* - * Handle duplicates. - */ - newDupls++; + * Handle duplicates. Move the duplicate in + * the parent's node-table to the list of + * duplicates. + */ oldNum--; parBind->nbNodes--; /* * Move last old item to pos of duplicate. */ - parBind->nodeTable[j] = - parBind->nodeTable[oldNum]; + parNodes[j] = parNodes[oldNum]; if (parBind->nbNodes != oldNum) { /* * If new items exist, move last new item to * last of old items. */ - parBind->nodeTable[oldNum] = - parBind->nodeTable[parBind->nbNodes]; + parNodes[oldNum] = + parNodes[parBind->nbNodes]; } - /* - * Move duplicate to last pos of new/old items. - */ - parBind->nodeTable[parBind->nbNodes] = parNode; - + if (parBind->dupls == NULL) { + parBind->dupls = xmlSchemaItemListCreate(); + if (parBind->dupls == NULL) + goto internal_error; + } + xmlSchemaItemListAdd(parBind->dupls, parNode); } else { /* * Add the node-table entry (node and key-sequence) of @@ -20901,10 +23245,10 @@ start_binding: if (parBind->nodeTable == NULL) { xmlSchemaVErrMemory(NULL, "allocating IDC list of node-table items", NULL); - return(-1); + goto internal_error; } parBind->sizeNodes = 1; - } else if (duplTop >= parBind->sizeNodes) { + } else if (parBind->nbNodes >= parBind->sizeNodes) { parBind->sizeNodes *= 2; parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) xmlRealloc(parBind->nodeTable, parBind->sizeNodes * @@ -20912,71 +23256,94 @@ start_binding: if (parBind->nodeTable == NULL) { xmlSchemaVErrMemory(NULL, "re-allocating IDC list of node-table items", NULL); - return(-1); - } - } - - /* - * Move first old duplicate to last position - * of old duplicates +1. - */ - if (parBind->nbDupls != 0) { - parBind->nodeTable[duplTop] = - parBind->nodeTable[parBind->nbNodes + newDupls]; - } - /* - * Move first new duplicate to last position of - * new duplicates +1. - */ - if (newDupls != 0) { - parBind->nodeTable[parBind->nbNodes + newDupls] = - parBind->nodeTable[parBind->nbNodes]; + goto internal_error; + } } + parNodes = parBind->nodeTable; /* * Append the new node-table entry to the 'new node-table * entries' section. */ - parBind->nodeTable[parBind->nbNodes] = node; - parBind->nbNodes++; - duplTop++; + parNodes[parBind->nbNodes++] = node; } - } - parBind->nbDupls += newDupls; - break; - } - if (parBind->next == NULL) - lastParBind = parBind; - parBind = parBind->next; - } - if ((parBind == NULL) && (bind->nbNodes != 0)) { + + } + + } + } else { /* * No binding for the IDC was found: create a new one and * copy all node-tables. */ parBind = xmlSchemaIDCNewBinding(bind->definition); if (parBind == NULL) - return(-1); - - parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) - xmlMalloc(bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); - if (parBind->nodeTable == NULL) { - xmlSchemaVErrMemory(NULL, - "allocating an array of IDC node-table items", NULL); - xmlSchemaIDCFreeBinding(parBind); - return(-1); + goto internal_error; + + /* + * TODO: Hmm, how to optimize the initial number of + * allocated entries? + */ + if (bind->nbNodes != 0) { + /* + * Add all IDC node-table entries. + */ + if (! vctxt->psviExposeIDCNodeTables) { + /* + * Just move the entries. + * NOTE: this is quite save here, since + * all the keyref lookups have already been + * performed. + */ + parBind->nodeTable = bind->nodeTable; + bind->nodeTable = NULL; + parBind->sizeNodes = bind->sizeNodes; + bind->sizeNodes = 0; + parBind->nbNodes = bind->nbNodes; + bind->nbNodes = 0; + } else { + /* + * Copy the entries. + */ + parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *) + xmlMalloc(bind->nbNodes * + sizeof(xmlSchemaPSVIIDCNodePtr)); + if (parBind->nodeTable == NULL) { + xmlSchemaVErrMemory(NULL, + "allocating an array of IDC node-table " + "items", NULL); + xmlSchemaIDCFreeBinding(parBind); + goto internal_error; + } + parBind->sizeNodes = bind->nbNodes; + parBind->nbNodes = bind->nbNodes; + memcpy(parBind->nodeTable, bind->nodeTable, + bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); + } + } + if (bind->dupls) { + /* + * Move the duplicates. + */ + if (parBind->dupls != NULL) + xmlSchemaItemListFree(parBind->dupls); + parBind->dupls = bind->dupls; + bind->dupls = NULL; } - parBind->sizeNodes = bind->nbNodes; - parBind->nbNodes = bind->nbNodes; - memcpy(parBind->nodeTable, bind->nodeTable, - bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr)); if (*parTable == NULL) *parTable = parBind; - else - lastParBind->next = parBind; - } + else { + parBind->next = *parTable; + *parTable = parBind; + } + } + +next_binding: bind = bind->next; - } + } return (0); + +internal_error: + return(-1); } /** @@ -20989,45 +23356,48 @@ start_binding: static int xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) { - xmlSchemaPSVIIDCBindingPtr refbind, bind; - - refbind = vctxt->inode->idcTable; + xmlSchemaIDCMatcherPtr matcher; + xmlSchemaPSVIIDCBindingPtr bind; + + matcher = vctxt->inode->idcMatchers; /* * Find a keyref. */ - while (refbind != NULL) { - if (refbind->definition->type == XML_SCHEMA_TYPE_IDC_KEYREF) { - int i, j, k, res; + while (matcher != NULL) { + if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) && + matcher->targets && + matcher->targets->nbItems) + { + int i, j, k, res, nbFields, hasDupls; xmlSchemaPSVIIDCKeyPtr *refKeys, *keys; - xmlSchemaPSVIIDCKeyPtr refKey, key; xmlSchemaPSVIIDCNodePtr refNode = NULL; + nbFields = matcher->aidc->def->nbFields; + /* - * Find the referred key/unique. + * Find the IDC node-table for the referenced IDC key/unique. */ bind = vctxt->inode->idcTable; - do { - if ((xmlSchemaIDCPtr) refbind->definition->ref->item == + while (bind != NULL) { + if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item == bind->definition) break; bind = bind->next; - } while (bind != NULL); - + } + hasDupls = (bind && bind->dupls && bind->dupls->nbItems) ? 1 : 0; /* * Search for a matching key-sequences. */ - for (i = 0; i < refbind->nbNodes; i++) { + for (i = 0; i < matcher->targets->nbItems; i++) { res = 0; - refNode = refbind->nodeTable[i]; + refNode = matcher->targets->items[i]; if (bind != NULL) { refKeys = refNode->keys; for (j = 0; j < bind->nbNodes; j++) { keys = bind->nodeTable[j]->keys; - for (k = 0; k < bind->definition->nbFields; k++) { - refKey = refKeys[k]; - key = keys[k]; - res = xmlSchemaAreValuesEqual(key->val, - refKey->val); + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + refKeys[k]->val); if (res == 0) break; else if (res == -1) { @@ -21041,27 +23411,61 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt) break; } } + if ((res == 0) && hasDupls) { + /* + * Search in duplicates + */ + for (j = 0; j < bind->dupls->nbItems; j++) { + keys = ((xmlSchemaPSVIIDCNodePtr) + bind->dupls->items[j])->keys; + for (k = 0; k < nbFields; k++) { + res = xmlSchemaAreValuesEqual(keys[k]->val, + refKeys[k]->val); + if (res == 0) + break; + else if (res == -1) { + return (-1); + } + } + if (res == 1) { + /* + * Match in duplicates found. + */ + xmlChar *str = NULL, *strB = NULL; + xmlSchemaKeyrefErr(vctxt, + XML_SCHEMAV_CVC_IDC, refNode, + (xmlSchemaTypePtr) matcher->aidc->def, + "More than one match found for " + "key-sequence %s of keyref '%s'", + xmlSchemaFormatIDCKeySequence(vctxt, &str, + refNode->keys, nbFields), + xmlSchemaGetComponentQName(&strB, + matcher->aidc->def)); + FREE_AND_NULL(str); + FREE_AND_NULL(strB); + break; + } + } + } } + if (res == 0) { xmlChar *str = NULL, *strB = NULL; xmlSchemaKeyrefErr(vctxt, XML_SCHEMAV_CVC_IDC, refNode, - (xmlSchemaTypePtr) refbind->definition, - "No match found for key-sequence %s of key " - "reference '%s'", + (xmlSchemaTypePtr) matcher->aidc->def, + "No match found for key-sequence %s of keyref '%s'", xmlSchemaFormatIDCKeySequence(vctxt, &str, - refbind->nodeTable[i]->keys, - refbind->definition->nbFields), - xmlSchemaFormatQName(&strB, - refbind->definition->targetNamespace, - refbind->definition->name)); + refNode->keys, nbFields), + xmlSchemaGetComponentQName(&strB, matcher->aidc->def)); FREE_AND_NULL(str); FREE_AND_NULL(strB); } } } - refbind = refbind->next; + matcher = matcher->next; } + /* TODO: Return an error if any error encountered. */ return (0); } @@ -21183,6 +23587,8 @@ xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt, static void xmlSchemaClearElemInfo(xmlSchemaNodeInfoPtr ielem) { + ielem->hasKeyrefs = 0; + ielem->appliedXPath = 0; if (ielem->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) { FREE_AND_NULL(ielem->localName); FREE_AND_NULL(ielem->nsName); @@ -21196,14 +23602,24 @@ xmlSchemaClearElemInfo(xmlSchemaNodeInfoPtr ielem) ielem->value = NULL; } if (ielem->val != NULL) { + /* + * PSVI TODO: Be careful not to free it when the value is + * exposed via PSVI. + */ xmlSchemaFreeValue(ielem->val); ielem->val = NULL; } if (ielem->idcMatchers != NULL) { + /* + * URGENT OPTIMIZE TODO: Use a pool of IDC matchers. + */ xmlSchemaIDCFreeMatcherList(ielem->idcMatchers); ielem->idcMatchers = NULL; } if (ielem->idcTable != NULL) { + /* + * OPTIMIZE TODO: Use a pool of IDC tables??. + */ xmlSchemaIDCFreeIDCTable(ielem->idcTable); ielem->idcTable = NULL; } @@ -21328,9 +23744,9 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, if (type->facetSet == NULL) goto pattern_and_enum; - if (! VARIETY_ATOMIC(type)) { - if (VARIETY_LIST(type)) - goto variety_list; + if (! WXS_IS_ATOMIC(type)) { + if (WXS_IS_LIST(type)) + goto WXS_IS_LIST; else goto pattern_and_enum; } @@ -21340,7 +23756,7 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, */ tmpType = xmlSchemaGetPrimitiveType(type); if ((tmpType->builtInType == XML_SCHEMAS_STRING) || - IS_ANY_SIMPLE_TYPE(tmpType)) { + WXS_IS_ANY_SIMPLE_TYPE(tmpType)) { ws = xmlSchemaGetWhiteSpaceFacetValue(type); } else ws = XML_SCHEMA_WHITESPACE_COLLAPSE; @@ -21393,8 +23809,8 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt, ret = 0; } -variety_list: - if (! VARIETY_LIST(type)) +WXS_IS_LIST: + if (! WXS_IS_LIST(type)) goto pattern_and_enum; /* * "length", "minLength" and "maxLength" of list types. @@ -21579,7 +23995,7 @@ xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt, if (nsName == NULL) { ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' has no " "corresponding namespace declaration in " "scope", value, NULL); @@ -21615,7 +24031,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, { int ret = 0, valNeeded = (retVal) ? 1 : 0; xmlSchemaValPtr val = NULL; - xmlSchemaWhitespaceValueType ws; + /* xmlSchemaWhitespaceValueType ws; */ xmlChar *normValue = NULL; #define NORMALIZE(atype) \ @@ -21657,7 +24073,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, valNeeded = 1; if (value == NULL) value = BAD_CAST ""; - if (IS_ANY_SIMPLE_TYPE(type) || VARIETY_ATOMIC(type)) { + if (WXS_IS_ANY_SIMPLE_TYPE(type) || WXS_IS_ATOMIC(type)) { xmlSchemaTypePtr biType; /* The built-in type. */ /* * SPEC (1.2.1) "if {variety} is ·atomic· then the string must ·match· @@ -21700,7 +24116,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, value, &val, valNeeded); break; default: - ws = xmlSchemaGetWhiteSpaceFacetValue(type); + /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */ if (valNeeded) ret = xmlSchemaValPredefTypeNodeNoNorm(biType, value, &val, NULL); @@ -21717,7 +24133,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, value, &val, valNeeded); break; default: - ws = xmlSchemaGetWhiteSpaceFacetValue(type); + /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */ if (valNeeded) ret = xmlSchemaValPredefTypeNodeNoNorm(biType, value, &val, node); @@ -21739,7 +24155,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, "validating against a built-in type"); goto internal_error; } - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -21757,7 +24173,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, "validating facets of atomic simple type"); goto internal_error; } - if (VARIETY_LIST(type)) + if (WXS_IS_LIST(type)) ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2; else ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1; @@ -21765,7 +24181,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, } if (fireErrors && (ret > 0)) xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1); - } else if (VARIETY_LIST(type)) { + } else if (WXS_IS_LIST(type)) { xmlSchemaTypePtr itemType; const xmlChar *cur, *end; @@ -21785,7 +24201,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, * VAL TODO: Optimize validation of empty values. * VAL TODO: We do not have computed values for lists. */ - itemType = GET_LIST_ITEM_TYPE(type); + itemType = WXS_LIST_ITEMTYPE(type); cur = value; do { while (IS_BLANK_CH(*cur)) @@ -21852,7 +24268,7 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt, NORMALIZE(type); xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1); } - } else if (VARIETY_UNION(type)) { + } else if (WXS_IS_UNION(type)) { xmlSchemaTypeLinkPtr memberLink; /* * TODO: For all datatypes ·derived· by ·union· whiteSpace does @@ -21993,7 +24409,7 @@ xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt, if (*nsName == NULL) { xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' has no " "corresponding namespace declaration in scope", value, NULL); @@ -22055,7 +24471,7 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, xmlSchemaCustomErr(ACTXT_CAST vctxt, XML_SCHEMAV_CVC_ELT_4_2, NULL, - xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), + WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), "The QName value '%s' of the xsi:type attribute does not " "resolve to a type definition", xmlSchemaFormatQName(&str, nsName, local), NULL); @@ -22081,6 +24497,11 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, * {disallowed substitutions}: the "block" on the element decl. * {prohibited substitutions}: the "block" on the type def. */ + /* + * OPTIMIZE TODO: We could map types already evaluated + * to be validly derived from other types to avoid checking + * this over and over for the same types. + */ if ((elemDecl->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) || (elemDecl->subtypes->flags & XML_SCHEMAS_TYPE_BLOCK_EXTENSION)) @@ -22091,7 +24512,18 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt, XML_SCHEMAS_TYPE_BLOCK_RESTRICTION)) set |= SUBSET_RESTRICTION; - if (xmlSchemaCheckCOSDerivedOK(*localType, + /* + * REMOVED and CHANGED since this produced a parser context + * which adds to the string dict of the schema. So this would + * change the schema and we don't want this. We don't need + * the parser context anymore. + * + * if ((vctxt->pctxt == NULL) && + * (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1)) + * return (-1); + */ + + if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType, elemDecl->subtypes, set) != 0) { xmlChar *str = NULL; @@ -22122,7 +24554,7 @@ static int xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt) { xmlSchemaElementPtr elemDecl = vctxt->inode->decl; - xmlSchemaTypePtr actualType = ELEM_TYPE(elemDecl); + xmlSchemaTypePtr actualType = WXS_ELEM_TYPEDEF(elemDecl); /* * cvc-elt (3.3.4) : 1 @@ -22318,11 +24750,12 @@ xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt) static int xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) { - xmlSchemaTypePtr type = vctxt->inode->typeDef; - xmlSchemaAttributeLinkPtr attrUseLink; - xmlSchemaAttributePtr attrUse = NULL, attrDecl = NULL; - xmlSchemaAttrInfoPtr attr, tmpAttr; - int i, found, nbAttrs; + xmlSchemaTypePtr type = vctxt->inode->typeDef; + xmlSchemaItemListPtr attrUseList; + xmlSchemaAttributeUsePtr attrUse = NULL; + xmlSchemaAttributePtr attrDecl = NULL; + xmlSchemaAttrInfoPtr iattr, tmpiattr; + int i, j, found, nbAttrs, nbUses; int xpathRes = 0, res, wildIDs = 0, fixed; /* @@ -22343,33 +24776,33 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * noNamespaceSchemaLocation, the appropriate case among the following * must be true: * - */ + */ + attrUseList = (xmlSchemaItemListPtr) type->attrUses; + /* + * @nbAttrs is the number of attributes present in the instance. + */ nbAttrs = vctxt->nbAttrInfos; - for (attrUseLink = type->attributeUses; attrUseLink != NULL; - attrUseLink = attrUseLink->next) { - + if (attrUseList != NULL) + nbUses = attrUseList->nbItems; + else + nbUses = 0; + for (i = 0; i < nbUses; i++) { found = 0; - attrUse = attrUseLink->attr; - /* - * VAL TODO: Implement a real "attribute use" component. - */ - if (attrUse->refDecl != NULL) - attrDecl = attrUse->refDecl; - else - attrDecl = attrUse; - for (i = 0; i < nbAttrs; i++) { - attr = vctxt->attrInfos[i]; + attrUse = attrUseList->items[i]; + attrDecl = WXS_ATTRUSE_DECL(attrUse); + for (j = 0; j < nbAttrs; j++) { + iattr = vctxt->attrInfos[j]; /* * SPEC (cvc-complex-type) (3) * Skip meta attributes. */ - if (attr->metaType) + if (iattr->metaType) continue; - if (attr->localName[0] != attrDecl->name[0]) + if (iattr->localName[0] != attrDecl->name[0]) continue; - if (!xmlStrEqual(attr->localName, attrDecl->name)) + if (!xmlStrEqual(iattr->localName, attrDecl->name)) continue; - if (!xmlStrEqual(attr->nsName, attrDecl->targetNamespace)) + if (!xmlStrEqual(iattr->nsName, attrDecl->targetNamespace)) continue; found = 1; /* @@ -22388,13 +24821,13 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Assessment (Attribute) (§3.2.4) and * Assessment Outcome (Attribute) (§3.2.5). */ - attr->state = XML_SCHEMAS_ATTR_ASSESSED; - attr->use = attrUse; + iattr->state = XML_SCHEMAS_ATTR_ASSESSED; + iattr->use = attrUse; /* * Context-determined declaration. */ - attr->decl = attrDecl; - attr->typeDef = attrDecl->subtypes; + iattr->decl = attrDecl; + iattr->typeDef = attrDecl->subtypes; break; } @@ -22411,39 +24844,41 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * of the attribute information items in the element information * item's [attributes] as per clause 3.1 above." */ - tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt); - if (tmpAttr == NULL) { + tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); + if (tmpiattr == NULL) { VERROR_INT( "xmlSchemaVAttributesComplex", "calling xmlSchemaGetFreshAttrInfo()"); return (-1); } - tmpAttr->state = XML_SCHEMAS_ATTR_ERR_MISSING; - tmpAttr->use = attrUse; - tmpAttr->decl = attrDecl; + tmpiattr->state = XML_SCHEMAS_ATTR_ERR_MISSING; + tmpiattr->use = attrUse; + tmpiattr->decl = attrDecl; } else if ((attrUse->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) && ((attrUse->defValue != NULL) || (attrDecl->defValue != NULL))) { /* * Handle non-existent, optional, default/fixed attributes. */ - tmpAttr = xmlSchemaGetFreshAttrInfo(vctxt); - if (tmpAttr == NULL) { + tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt); + if (tmpiattr == NULL) { VERROR_INT( "xmlSchemaVAttributesComplex", "calling xmlSchemaGetFreshAttrInfo()"); return (-1); } - tmpAttr->state = XML_SCHEMAS_ATTR_DEFAULT; - tmpAttr->use = attrUse; - tmpAttr->decl = attrDecl; - tmpAttr->typeDef = attrDecl->subtypes; - tmpAttr->localName = attrDecl->name; - tmpAttr->nsName = attrDecl->targetNamespace; + tmpiattr->state = XML_SCHEMAS_ATTR_DEFAULT; + tmpiattr->use = attrUse; + tmpiattr->decl = attrDecl; + tmpiattr->typeDef = attrDecl->subtypes; + tmpiattr->localName = attrDecl->name; + tmpiattr->nsName = attrDecl->targetNamespace; } } + if (vctxt->nbAttrInfos == 0) return (0); + nbUses = vctxt->nbAttrInfos; /* * Validate against the wildcard. */ @@ -22453,12 +24888,12 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * (3.2.1) "There must be an {attribute wildcard}." */ for (i = 0; i < nbAttrs; i++) { - attr = vctxt->attrInfos[i]; + iattr = vctxt->attrInfos[i]; /* * SPEC (cvc-complex-type) (3) * Skip meta attributes. */ - if (attr->state != XML_SCHEMAS_ATTR_UNKNOWN) + if (iattr->state != XML_SCHEMAS_ATTR_UNKNOWN) continue; /* * SPEC (cvc-complex-type) @@ -22471,7 +24906,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Namespace Name (§3.10.4)." */ if (xmlSchemaCheckCVCWildcardNamespace(type->attributeWildcard, - attr->nsName)) { + iattr->nsName) == 0) { /* * Handle processContents. * @@ -22490,16 +24925,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * [validity] = "notKnown" * [validation attempted] = "none" */ - attr->state = XML_SCHEMAS_ATTR_WILD_SKIP; + iattr->state = XML_SCHEMAS_ATTR_WILD_SKIP; continue; } /* * Find an attribute declaration. */ - attr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, - attr->localName, attr->nsName); - if (attr->decl != NULL) { - attr->state = XML_SCHEMAS_ATTR_ASSESSED; + iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema, + iattr->localName, iattr->nsName); + if (iattr->decl != NULL) { + iattr->state = XML_SCHEMAS_ATTR_ASSESSED; /* * SPEC (cvc-complex-type) * (5) "Let [Definition:] the wild IDs be the set of @@ -22513,16 +24948,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * or is derived from ID. Then all of the following * must be true:" */ - attr->typeDef = attr->decl->subtypes; + iattr->typeDef = WXS_ATTR_TYPEDEF(iattr->decl); if (xmlSchemaIsDerivedFromBuiltInType( - attr->typeDef, XML_SCHEMAS_ID)) { + iattr->typeDef, XML_SCHEMAS_ID)) { /* * SPEC (5.1) "There must be no more than one * item in ·wild IDs·." */ if (wildIDs != 0) { /* VAL TODO */ - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID; + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID; TODO continue; } @@ -22534,34 +24969,32 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * whose {attribute declaration}'s {type definition} * is or is derived from ID." */ - for (attrUseLink = type->attributeUses; - attrUseLink != NULL; - attrUseLink = attrUseLink->next) { + for (j = 0; j < attrUseList->nbItems; j++) { if (xmlSchemaIsDerivedFromBuiltInType( - attrUseLink->attr->subtypes, + WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]), XML_SCHEMAS_ID)) { - /* VAL TODO */ - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; + /* URGENT VAL TODO: implement */ + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID; TODO + break; } } } } else if (type->attributeWildcard->processContents == XML_SCHEMAS_ANY_LAX) { - attr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL; + iattr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL; /* * SPEC PSVI Assessment Outcome (Attribute) * [validity] = "notKnown" * [validation attempted] = "none" */ } else { - attr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL; + iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL; } } } } - if (vctxt->nbAttrInfos == 0) return (0); @@ -22569,24 +25002,24 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Validate values, create default attributes, evaluate IDCs. */ for (i = 0; i < vctxt->nbAttrInfos; i++) { - attr = vctxt->attrInfos[i]; + iattr = vctxt->attrInfos[i]; /* * VAL TODO: Note that we won't try to resolve IDCs to * "lax" and "skip" validated attributes. Check what to * do in this case. */ - if ((attr->state != XML_SCHEMAS_ATTR_ASSESSED) && - (attr->state != XML_SCHEMAS_ATTR_DEFAULT)) + if ((iattr->state != XML_SCHEMAS_ATTR_ASSESSED) && + (iattr->state != XML_SCHEMAS_ATTR_DEFAULT)) continue; /* * VAL TODO: What to do if the type definition is missing? */ - if (attr->typeDef == NULL) { - attr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE; + if (iattr->typeDef == NULL) { + iattr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE; continue; } - ACTIVATE_ATTRIBUTE(attr); + ACTIVATE_ATTRIBUTE(iattr); fixed = 0; xpathRes = 0; @@ -22603,30 +25036,30 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } } - if (attr->state == XML_SCHEMAS_ATTR_DEFAULT) { + if (iattr->state == XML_SCHEMAS_ATTR_DEFAULT) { /* * Default/fixed attributes. */ if (xpathRes) { - if (attr->use->defValue == NULL) { - attr->value = (xmlChar *) attr->use->defValue; - attr->val = attr->use->defVal; + if (iattr->use->defValue != NULL) { + iattr->value = (xmlChar *) iattr->use->defValue; + iattr->val = iattr->use->defVal; } else { - attr->value = (xmlChar *) attr->decl->defValue; - attr->val = attr->decl->defVal; + iattr->value = (xmlChar *) iattr->decl->defValue; + iattr->val = iattr->decl->defVal; } /* * IDCs will consume the precomputed default value, * so we need to clone it. */ - if (attr->val == NULL) { + if (iattr->val == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "default/fixed value on an attribute use was " "not precomputed"); goto internal_error; } - attr->val = xmlSchemaCopyValue(attr->val); - if (attr->val == NULL) { + iattr->val = xmlSchemaCopyValue(iattr->val); + if (iattr->val == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "calling xmlSchemaCopyValue()"); goto internal_error; @@ -22638,22 +25071,22 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * uses the *initial* value. */ if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) && - (attr->node != NULL) && (attr->node->doc != NULL)) { + (iattr->node != NULL) && (iattr->node->doc != NULL)) { xmlChar *normValue; const xmlChar *value; - value = attr->value; + value = iattr->value; /* * Normalize the value. */ - normValue = xmlSchemaNormalizeValue(attr->typeDef, - attr->value); + normValue = xmlSchemaNormalizeValue(iattr->typeDef, + iattr->value); if (normValue != NULL) value = BAD_CAST normValue; - if (attr->nsName == NULL) { - if (xmlNewProp(attr->node->parent, - attr->localName, value) == NULL) { + if (iattr->nsName == NULL) { + if (xmlNewProp(iattr->node->parent, + iattr->localName, value) == NULL) { VERROR_INT("xmlSchemaVAttributesComplex", "callling xmlNewProp()"); if (normValue != NULL) @@ -22663,8 +25096,8 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } else { xmlNsPtr ns; - ns = xmlSearchNsByHref(attr->node->doc, - attr->node->parent, attr->nsName); + ns = xmlSearchNsByHref(iattr->node->doc, + iattr->node->parent, iattr->nsName); if (ns == NULL) { xmlChar prefix[12]; int counter = 0; @@ -22675,8 +25108,8 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) */ do { snprintf((char *) prefix, 12, "p%d", counter++); - ns = xmlSearchNs(attr->node->doc, - attr->node->parent, BAD_CAST prefix); + ns = xmlSearchNs(iattr->node->doc, + iattr->node->parent, BAD_CAST prefix); if (counter > 1000) { VERROR_INT( "xmlSchemaVAttributesComplex", @@ -22688,10 +25121,16 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) } } while (ns != NULL); ns = xmlNewNs(vctxt->validationRoot, - attr->nsName, BAD_CAST prefix); + iattr->nsName, BAD_CAST prefix); } - xmlNewNsProp(attr->node->parent, ns, - attr->localName, value); + /* + * TODO: + * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0406.html + * If we have QNames: do we need to ensure there's a + * prefix defined for the QName? + */ + xmlNewNsProp(iattr->node->parent, ns, + iattr->localName, value); } if (normValue != NULL) xmlFree(normValue); @@ -22715,9 +25154,9 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * Note that the attribute *use* can be unavailable, if * the attribute was a wild attribute. */ - if ((attr->decl->flags & XML_SCHEMAS_ATTR_FIXED) || - ((attr->use != NULL) && - (attr->use->flags & XML_SCHEMAS_ATTR_FIXED))) + if ((iattr->decl->flags & XML_SCHEMAS_ATTR_FIXED) || + ((iattr->use != NULL) && + (iattr->use->flags & XML_SCHEMAS_ATTR_FIXED))) fixed = 1; else fixed = 0; @@ -22731,18 +25170,18 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * "normalized attribute value" here? */ if (xpathRes || fixed) { - attr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; + iattr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED; /* * Request a computed value. */ res = xmlSchemaVCheckCVCSimpleType( ACTXT_CAST vctxt, - attr->node, attr->typeDef, attr->value, &(attr->val), + iattr->node, iattr->typeDef, iattr->value, &(iattr->val), 1, 1, 0); } else { res = xmlSchemaVCheckCVCSimpleType( ACTXT_CAST vctxt, - attr->node, attr->typeDef, attr->value, NULL, + iattr->node, iattr->typeDef, iattr->value, NULL, 1, 0, 0); } @@ -22752,7 +25191,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) "calling xmlSchemaStreamValidateSimpleTypeValue()"); goto internal_error; } - attr->state = XML_SCHEMAS_ATTR_INVALID_VALUE; + iattr->state = XML_SCHEMAS_ATTR_INVALID_VALUE; /* * SPEC PSVI Assessment Outcome (Attribute) * [validity] = "invalid" @@ -22760,8 +25199,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) goto eval_idcs; } - if (fixed) { - int ws; + if (fixed) { /* * SPEC Attribute Locally Valid (Use) (cvc-au) * "For an attribute information item to be·valid· @@ -22778,43 +25216,42 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt) * (4) "The item's *actual* value· must match the *value* of * the {value constraint}, if it is present and fixed." */ - ws = xmlSchemaGetWhiteSpaceFacetValue(attr->typeDef); - if (attr->val == NULL) { + if (iattr->val == NULL) { /* VAL TODO: A value was not precomputed. */ TODO goto eval_idcs; } - if ((attr->use != NULL) && - (attr->use->defValue != NULL)) { - if (attr->use->defVal == NULL) { + if ((iattr->use != NULL) && + (iattr->use->defValue != NULL)) { + if (iattr->use->defVal == NULL) { /* VAL TODO: A default value was not precomputed. */ TODO goto eval_idcs; } - attr->vcValue = attr->use->defValue; + iattr->vcValue = iattr->use->defValue; /* if (xmlSchemaCompareValuesWhtsp(attr->val, (xmlSchemaWhitespaceValueType) ws, attr->use->defVal, (xmlSchemaWhitespaceValueType) ws) != 0) { */ - if (! xmlSchemaAreValuesEqual(attr->val, attr->use->defVal)) - attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; + if (! xmlSchemaAreValuesEqual(iattr->val, iattr->use->defVal)) + iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; } else { - if (attr->decl->defVal == NULL) { + if (iattr->decl->defVal == NULL) { /* VAL TODO: A default value was not precomputed. */ TODO goto eval_idcs; } - attr->vcValue = attr->decl->defValue; + iattr->vcValue = iattr->decl->defValue; /* if (xmlSchemaCompareValuesWhtsp(attr->val, (xmlSchemaWhitespaceValueType) ws, attrDecl->defVal, (xmlSchemaWhitespaceValueType) ws) != 0) { */ - if (! xmlSchemaAreValuesEqual(attr->val, attr->decl->defVal)) - attr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; + if (! xmlSchemaAreValuesEqual(iattr->val, iattr->decl->defVal)) + iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE; } /* * [validity] = "valid" @@ -22839,14 +25276,14 @@ eval_idcs: * Report errors. */ for (i = 0; i < vctxt->nbAttrInfos; i++) { - attr = vctxt->attrInfos[i]; - if ((attr->state == XML_SCHEMAS_ATTR_META) || - (attr->state == XML_SCHEMAS_ATTR_ASSESSED) || - (attr->state == XML_SCHEMAS_ATTR_WILD_SKIP) || - (attr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL)) + iattr = vctxt->attrInfos[i]; + if ((iattr->state == XML_SCHEMAS_ATTR_META) || + (iattr->state == XML_SCHEMAS_ATTR_ASSESSED) || + (iattr->state == XML_SCHEMAS_ATTR_WILD_SKIP) || + (iattr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL)) continue; - ACTIVATE_ATTRIBUTE(attr); - switch (attr->state) { + ACTIVATE_ATTRIBUTE(iattr); + switch (iattr->state) { case XML_SCHEMAS_ATTR_ERR_MISSING: { xmlChar *str = NULL; ACTIVATE_ELEM; @@ -22854,8 +25291,8 @@ eval_idcs: XML_SCHEMAV_CVC_COMPLEX_TYPE_4, NULL, NULL, "The attribute '%s' is required but missing", xmlSchemaFormatQName(&str, - attr->decl->targetNamespace, - attr->decl->name), + iattr->decl->targetNamespace, + iattr->decl->name), NULL); FREE_AND_NULL(str) break; @@ -22869,7 +25306,7 @@ eval_idcs: XML_SCHEMAV_CVC_AU, NULL, NULL, "The value '%s' does not match the fixed " "value constraint '%s'", - attr->value, attr->vcValue); + iattr->value, iattr->vcValue); break; case XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL: VERROR(XML_SCHEMAV_CVC_WILDCARD, NULL, @@ -22877,7 +25314,7 @@ eval_idcs: "demanded by the strict wildcard"); break; case XML_SCHEMAS_ATTR_UNKNOWN: - if (attr->metaType) + if (iattr->metaType) break; /* * MAYBE VAL TODO: One might report different error messages @@ -22885,10 +25322,10 @@ eval_idcs: */ if (type->attributeWildcard == NULL) { xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, attr, NULL); + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, iattr, NULL); } else { xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, attr, NULL); + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, iattr, NULL); } break; default: @@ -22939,7 +25376,7 @@ xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt, } if (wild->processContents == XML_SCHEMAS_ANY_STRICT) { /* VAL TODO: Change to proper error code. */ - VERROR(XML_SCHEMAV_CVC_ELT_1, (xmlSchemaTypePtr) wild, + VERROR(XML_SCHEMAV_CVC_ELT_1, NULL, /* WXS_BASIC_CAST wild */ "No matching global element declaration available, but " "demanded by the strict wildcard"); return (vctxt->err); @@ -22999,7 +25436,7 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * For a string to be a valid default with respect to a type * definition the appropriate case among the following must be true: */ - if IS_COMPLEX_TYPE(inode->typeDef) { + if WXS_IS_COMPLEX(inode->typeDef) { /* * Complex type. * @@ -23009,9 +25446,9 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * type}'s particle must be ·emptiable· as defined by * Particle Emptiable (§3.9.6)." */ - if ((! HAS_SIMPLE_CONTENT(inode->typeDef)) && - ((! HAS_MIXED_CONTENT(inode->typeDef)) || - (! IS_PARTICLE_EMPTIABLE(inode->typeDef)))) { + if ((! WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) && + ((! WXS_HAS_MIXED_CONTENT(inode->typeDef)) || + (! WXS_EMPTIABLE(inode->typeDef)))) { ret = XML_SCHEMAP_COS_VALID_DEFAULT_2_1; /* NOTE that this covers (2.2.2) as well. */ VERROR(ret, NULL, @@ -23032,12 +25469,12 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt, * string must be ·valid· with respect to that simple type definition * as defined by String Valid (§3.14.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, NULL, inode->typeDef, value, val, 1, 1, 0); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt, NULL, inode->typeDef->contentTypeDef, value, val, 1, 1, 0); @@ -23224,10 +25661,10 @@ character_content: /* * Speedup if no declaration exists. */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef->contentTypeDef, inode->value); @@ -23260,7 +25697,7 @@ character_content: * defined in Element Default Valid (Immediate) (§3.3.6). */ /* - * NOTE: 'local' above means types aquired by xsi:type. + * NOTE: 'local' above means types acquired by xsi:type. * NOTE: Although the *canonical* value is stated, it is not * relevant if canonical or not. Additionally XML Schema 1.1 * will removed this requirement as well. @@ -23291,10 +25728,10 @@ character_content: * ·actual type definition· as defined by Element Locally Valid (Type) * (§3.3.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->decl->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef->contentTypeDef, inode->decl->value); @@ -23340,7 +25777,7 @@ default_psvi: * to the ·actual type definition· as defined by Element Locally * Valid (Type) (§3.3.4). */ - if (IS_SIMPLE_TYPE(inode->typeDef)) { + if (WXS_IS_SIMPLE(inode->typeDef)) { /* * SPEC (cvc-type) (3.1) * "If the type definition is a simple type definition, ..." @@ -23351,7 +25788,7 @@ default_psvi: */ ret = xmlSchemaVCheckINodeDataType(vctxt, inode, inode->typeDef, inode->value); - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { /* * SPEC (cvc-type) (3.2) "If the type definition is a complex type * definition, then the element information item must be @@ -23402,7 +25839,7 @@ default_psvi: * 5.2.2.2 The appropriate case among the following must * be true: */ - if (HAS_MIXED_CONTENT(inode->typeDef)) { + if (WXS_HAS_MIXED_CONTENT(inode->typeDef)) { /* * 5.2.2.2.1 If the {content type} of the ·actual type * definition· is mixed, then the *initial value* of the @@ -23427,7 +25864,7 @@ default_psvi: inode->value, inode->decl->value); goto end_elem; } - } else if (HAS_SIMPLE_CONTENT(inode->typeDef)) { + } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) { /* * 5.2.2.2.2 If the {content type} of the ·actual type * definition· is a simple type definition, then the @@ -23466,29 +25903,50 @@ end_elem: /* * Evaluate the history of XPath state objects. */ - if (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1) + if (inode->appliedXPath && + (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1)) goto internal_error; /* - * TODO: 6 The element information item must be ·valid· with respect to each of - * the {identity-constraint definitions} as per Identity-constraint - * Satisfied (§3.11.4). + * MAYBE TODO: + * SPEC (6) "The element information item must be ·valid· with + * respect to each of the {identity-constraint definitions} as per + * Identity-constraint Satisfied (§3.11.4)." + */ + /* + * PSVI TODO: If we expose IDC node-tables via PSVI then the tables + * need to be built in any case. + * We will currently build IDC node-tables and bubble them only if + * keyrefs do exist. + */ + + /* + * Add the current IDC target-nodes to the IDC node-tables. */ + if ((inode->idcMatchers != NULL) && + (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) + { + if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1) + goto internal_error; + } /* * Validate IDC keyrefs. */ - if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) - goto internal_error; + if (vctxt->inode->hasKeyrefs) + if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1) + goto internal_error; /* * Merge/free the IDC table. */ if (inode->idcTable != NULL) { -#ifdef DEBUG_IDC +#ifdef DEBUG_IDC_NODE_TABLE xmlSchemaDebugDumpIDCTable(stdout, inode->nsName, inode->localName, inode->idcTable); #endif - if (vctxt->depth > 0) { + if ((vctxt->depth > 0) && + (vctxt->hasKeyrefs || vctxt->createIDCNodeTables)) + { /* * Merge the IDC node table with the table of the parent node. */ @@ -23511,18 +25969,18 @@ end_elem: return (0); } /* - * Reset the bubbleDepth if needed. + * Reset the keyrefDepth if needed. */ if (vctxt->aidcs != NULL) { xmlSchemaIDCAugPtr aidc = vctxt->aidcs; do { - if (aidc->bubbleDepth == vctxt->depth) { + if (aidc->keyrefDepth == vctxt->depth) { /* - * A bubbleDepth of a key/unique IDC matches the current + * A 'keyrefDepth' of a key/unique IDC matches the current * depth, this means that we are leaving the scope of the - * top-most keyref IDC. + * top-most keyref IDC which refers to this IDC. */ - aidc->bubbleDepth = -1; + aidc->keyrefDepth = -1; } aidc = aidc->next; } while (aidc != NULL); @@ -23727,7 +26185,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt) case XML_SCHEMA_CONTENT_SIMPLE: case XML_SCHEMA_CONTENT_BASIC: ACTIVATE_PARENT_ELEM - if (IS_COMPLEX_TYPE(ptype)) { + if (WXS_IS_COMPLEX(ptype)) { /* * SPEC (cvc-complex-type) (2.2) * "If the {content type} is a simple type definition, then @@ -23879,7 +26337,9 @@ xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, default: break; } - } else { + } else { + if (len < 0) + len = xmlStrlen(value); /* * Concat the value. */ @@ -23909,11 +26369,22 @@ xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt) } if (vctxt->xsiAssemble) { /* - * URGENT TODO: Better to fully stop validation - * if there was an error during dynamic schema construction. + * We will stop validation if there was an error during + * dynamic schema construction. + * Note that we simply set @skipDepth to 0, this could + * mean that a streaming document via SAX would be + * still read to the end but it won't be validated any more. + * TODO: If we are sure how to stop the validation at once + * for all input scenarios, then this should be changed to + * instantly stop the validation. */ - if (xmlSchemaAssembleByXSI(vctxt) == -1) - goto internal_error; + ret = xmlSchemaAssembleByXSI(vctxt); + if (ret != 0) { + if (ret == -1) + goto internal_error; + vctxt->skipDepth = 0; + return(ret); + } } if (vctxt->depth > 0) { /* @@ -24025,6 +26496,7 @@ type_validation: */ if (vctxt->xpathStates != NULL) { ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE); + vctxt->inode->appliedXPath = 1; if (ret == -1) { VERROR_INT("xmlSchemaValidateElem", "calling xmlSchemaXPathEvaluate()"); @@ -24034,9 +26506,9 @@ type_validation: /* * Validate attributes. */ - if (IS_COMPLEX_TYPE(vctxt->inode->typeDef)) { + if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) { if ((vctxt->nbAttrInfos != 0) || - (vctxt->inode->typeDef->attributeUses != NULL)) { + (vctxt->inode->typeDef->attrUses != NULL)) { ret = xmlSchemaVAttributesComplex(vctxt); } @@ -24558,12 +27030,19 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) if (vctxt == NULL) return; + /* + * TODO: Should we clear the flags? + * Might be problematic if one reuses the context + * and assumes that the options remain the same. + */ vctxt->flags = 0; vctxt->validationRoot = NULL; vctxt->doc = NULL; #ifdef LIBXML_READER_ENABLED vctxt->reader = NULL; #endif + vctxt->hasKeyrefs = 0; + if (vctxt->value != NULL) { xmlSchemaFreeValue(vctxt->value); vctxt->value = NULL; @@ -24622,6 +27101,10 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt) xmlSchemaItemListClear(vctxt->nodeQNames); /* Recreate the dict. */ xmlDictFree(vctxt->dict); + /* + * TODO: Is is save to recreate it? Do we have a scenario + * where the user provides the dict? + */ vctxt->dict = xmlDictCreate(); } @@ -24742,7 +27225,7 @@ xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, return; ctxt->error = err; ctxt->warning = warn; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; if (ctxt->pctxt != NULL) xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx); } @@ -24757,14 +27240,16 @@ xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, */ void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, void *ctx) + xmlStructuredErrorFunc serror, void *ctx) { if (ctxt == NULL) return; ctxt->serror = serror; ctxt->error = NULL; ctxt->warning = NULL; - ctxt->userData = ctx; + ctxt->errCtxt = ctx; + if (ctxt->pctxt != NULL) + xmlSchemaSetParserStructuredErrors(ctxt->pctxt, serror, ctx); } /** @@ -24780,8 +27265,8 @@ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, */ int xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt, - xmlSchemaValidityErrorFunc * err, - xmlSchemaValidityWarningFunc * warn, void **ctx) + xmlSchemaValidityErrorFunc * err, + xmlSchemaValidityWarningFunc * warn, void **ctx) { if (ctxt == NULL) return (-1); @@ -24790,7 +27275,7 @@ xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt, if (warn != NULL) *warn = ctxt->warning; if (ctx != NULL) - *ctx = ctxt->userData; + *ctx = ctxt->errCtxt; return (0); } @@ -25009,12 +27494,18 @@ static int xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { /* * Some initialization. - */ + */ vctxt->err = 0; vctxt->nberrors = 0; vctxt->depth = -1; vctxt->skipDepth = -1; vctxt->xsiAssemble = 0; + vctxt->hasKeyrefs = 0; +#ifdef ENABLE_IDC_NODE_TABLES_TEST + vctxt->createIDCNodeTables = 1; +#else + vctxt->createIDCNodeTables = 0; +#endif /* * Create a schema + parser if necessary. */ @@ -25045,7 +27536,7 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { pctxt->constructor = xmlSchemaConstructionCtxtCreate(pctxt->dict); if (pctxt->constructor == NULL) return(-1); - pctxt->constructor->schema = vctxt->schema; + pctxt->constructor->mainSchema = vctxt->schema; /* * Take ownership of the constructor to be able to free it. */ diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 9d99bbb..ffb2505 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -434,9 +434,7 @@ xmlSchemaInitTypes(void) } memset(wild, 0, sizeof(xmlSchemaWildcard)); wild->type = XML_SCHEMA_TYPE_ANY; - wild->any = 1; - wild->minOccurs = 1; - wild->maxOccurs = 1; + wild->any = 1; wild->processContents = XML_SCHEMAS_ANY_LAX; particle->children = (xmlSchemaTreeItemPtr) wild; /* @@ -450,9 +448,7 @@ xmlSchemaInitTypes(void) } memset(wild, 0, sizeof(xmlSchemaWildcard)); wild->any = 1; - wild->processContents = XML_SCHEMAS_ANY_LAX; - wild->minOccurs = 1; - wild->maxOccurs = 1; + wild->processContents = XML_SCHEMAS_ANY_LAX; xmlSchemaTypeAnyTypeDef->attributeWildcard = wild; } xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType", @@ -1700,7 +1696,7 @@ xmlSchemaValidateDates (xmlSchemaValType type, ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur); if (collapse) while IS_WSP_BLANK_CH(*cur) cur++; - if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date)))) + if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date)))))) goto error; @@ -2248,100 +2244,122 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, } case XML_SCHEMAS_DECIMAL:{ const xmlChar *cur = value; - unsigned int len, neg = 0; + unsigned int len, neg, integ, hasLeadingZeroes; xmlChar cval[25]; - xmlChar *cptr = cval; - unsigned int dec = ~0u; + xmlChar *cptr = cval; - if (cur == NULL) + if ((cur == NULL) || (*cur == 0)) goto return1; + /* + * xs:decimal has a whitespace-facet value of 'collapse'. + */ if (normOnTheFly) while IS_WSP_BLANK_CH(*cur) cur++; - /* First we handle an optional sign */ - if (*cur == '+') + /* + * First we handle an optional sign. + */ + neg = 0; + if (*cur == '-') { + neg = 1; cur++; - else if (*cur == '-') { - neg = 1; + } else if (*cur == '+') cur++; - } + /* + * Disallow: "", "-", "- " + */ + if (*cur == 0) + goto return1; /* * Next we "pre-parse" the number, in preparation for calling * the common routine xmlSchemaParseUInt. We get rid of any * leading zeroes (because we have reserved only 25 chars), - * and note the position of any decimal point. + * and note the position of a decimal point. */ len = 0; + integ = ~0u; + hasLeadingZeroes = 0; /* * Skip leading zeroes. */ - while (*cur == '0') + while (*cur == '0') { cur++; + hasLeadingZeroes = 1; + } if (*cur != 0) { - while (len < 24) { + do { if ((*cur >= '0') && (*cur <= '9')) { *cptr++ = *cur++; len++; } else if (*cur == '.') { - if (len == 0) - len++; - if (dec != ~0u) - goto return1; /* multiple decimal points */ cur++; - if ((*cur == 0) && (cur -1 == value)) + integ = len; + do { + if ((*cur >= '0') && (*cur <= '9')) { + *cptr++ = *cur++; + len++; + } else + break; + } while (len < 24); + /* + * Disallow "." but allow "00." + */ + if ((len == 0) && (!hasLeadingZeroes)) goto return1; - - dec = len; - while ((len < 24) && (*cur >= '0') && - (*cur <= '9')) { - *cptr++ = *cur++; - len++; - } break; } else break; - } + } while (len < 24); } if (normOnTheFly) while IS_WSP_BLANK_CH(*cur) cur++; if (*cur != 0) - goto return1; /* error if any extraneous chars */ + goto return1; /* error if any extraneous chars */ if (val != NULL) { v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL); if (v != NULL) { /* - * If a mixed decimal, get rid of trailing zeroes + * Now evaluate the significant digits of the number */ - if (dec != ~0u) { - while ((len > dec) && (cptr > cval) && - (*(cptr-1) == '0')) { - cptr--; - len--; + if (len != 0) { + + if (integ != ~0u) { + /* + * Get rid of trailing zeroes in the + * fractional part. + */ + while ((len != integ) && (*(cptr-1) == '0')) { + cptr--; + len--; + } + } + /* + * Terminate the (preparsed) string. + */ + if (len != 0) { + *cptr = 0; + cptr = cval; + + xmlSchemaParseUInt((const xmlChar **)&cptr, + &v->value.decimal.lo, + &v->value.decimal.mi, + &v->value.decimal.hi); } } - *cptr = 0; /* Terminate our (preparsed) string */ - cptr = cval; - /* - * Now evaluate the significant digits of the number - */ - if (*cptr != 0) - xmlSchemaParseUInt((const xmlChar **)&cptr, - &v->value.decimal.lo, - &v->value.decimal.mi, - &v->value.decimal.hi); /* * Set the total digits to 1 if a zero value. */ - if (len == 0) - len++; v->value.decimal.sign = neg; - if (dec == ~0u) { - v->value.decimal.frac = 0; - v->value.decimal.total = len; + if (len == 0) { + /* Speedup for zero values. */ + v->value.decimal.total = 1; } else { - v->value.decimal.frac = len - dec; v->value.decimal.total = len; + if (integ == ~0u) + v->value.decimal.frac = 0; + else + v->value.decimal.frac = len - integ; } *val = v; } @@ -3406,10 +3424,42 @@ xmlSchemaCompareDecimals(xmlSchemaValPtr x, xmlSchemaValPtr y) */ integx = x->value.decimal.total - x->value.decimal.frac; integy = y->value.decimal.total - y->value.decimal.frac; + /* + * NOTE: We changed the "total" for values like "0.1" + * (or "-0.1" or ".1") to be 1, which was 2 previously. + * Therefore the special case, when such values are + * compared with 0, needs to be handled separately; + * otherwise a zero would be recognized incorrectly as + * greater than those values. This has the nice side effect + * that we gain an overall optimized comparison with zeroes. + * Note that a "0" has a "total" of 1 already. + */ + if (integx == 1) { + if (x->value.decimal.lo == 0) { + if (integy != 1) + return -order; + else if (y->value.decimal.lo != 0) + return -order; + else + return(0); + } + } + if (integy == 1) { + if (y->value.decimal.lo == 0) { + if (integx != 1) + return order; + else if (x->value.decimal.lo != 0) + return order; + else + return(0); + } + } + if (integx > integy) return order; else if (integy > integx) return -order; + /* * If the number of integral digits is the same for both numbers, * then things get a little more complicated. We need to "normalize" @@ -3763,8 +3813,8 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur) while (1) { if (tempdays < 1) { - long tmon = (long) MODULO_RANGE(r->mon-1, 1, 13); - long tyr = r->year + (long)FQUOTIENT_RANGE(r->mon-1, 1, 13); + long tmon = (long) MODULO_RANGE((int)r->mon-1, 1, 13); + long tyr = r->year + (long)FQUOTIENT_RANGE((int)r->mon-1, 1, 13); if (tyr == 0) tyr--; tempdays += MAX_DAYINMONTH(tyr, tmon); @@ -5377,7 +5427,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet, case XML_SCHEMA_FACET_FRACTIONDIGITS: if ((facet->val == NULL) || - ((facet->val->type != XML_SCHEMAS_DECIMAL) && + ((facet->val->type != XML_SCHEMAS_PINTEGER) && (facet->val->type != XML_SCHEMAS_NNINTEGER)) || (facet->val->value.decimal.frac != 0)) { return(-1); diff --git a/xmlstring.c b/xmlstring.c index 67a20b9..4f3b373 100644 --- a/xmlstring.c +++ b/xmlstring.c @@ -147,8 +147,8 @@ xmlStrcmp(const xmlChar *str1, const xmlChar *str2) { * @str1: the first xmlChar * * @str2: the second xmlChar * * - * Check if both string are equal of have same content - * Should be a bit more readable and faster than xmlStrEqual() + * Check if both strings are equal of have same content. + * Should be a bit more readable and faster than xmlStrcmp() * * Returns 1 if they are equal, 0 if they are different */ @@ -437,7 +437,8 @@ xmlStrlen(const xmlChar *str) { * @len: the length of @add * * a strncat for array of xmlChar's, it will extend @cur with the len - * first bytes of @add. + * first bytes of @add. Note that if @len < 0 then this is an API error + * and NULL will be returned. * * Returns a new xmlChar *, the original @cur is reallocated if needed * and should not be freed @@ -450,6 +451,8 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { if ((add == NULL) || (len == 0)) return(cur); + if (len < 0) + return(NULL); if (cur == NULL) return(xmlStrndup(add, len)); @@ -468,10 +471,11 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { * xmlStrncatNew: * @str1: first xmlChar string * @str2: second xmlChar string - * @len: the len of @str2 + * @len: the len of @str2 or < 0 * * same as xmlStrncat, but creates a new string. The original - * two strings are not freed. + * two strings are not freed. If @len is < 0 then the length + * will be calculated automatically. * * Returns a new xmlChar * or NULL */ diff --git a/xmlwriter.c b/xmlwriter.c index 6227398..37b7945 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -25,6 +25,25 @@ #define B64CRLF "\r\n" /* + * The following VA_COPY was coded following an example in + * the Samba project. It may not be sufficient for some + * esoteric implementations of va_list (i.e. it may need + * something involving a memcpy) but (hopefully) will be + * sufficient for libxml2. + */ +#ifndef VA_COPY + #ifdef HAVE_VA_COPY + #define VA_COPY(dest, src) va_copy(dest, src) + #else + #ifdef HAVE___VA_COPY + #define VA_COPY(dest,src) __va_copy(dest, src) + #else + #define VA_COPY(dest,src) (dest) = (src) + #endif + #endif +#endif + +/* * Types are kept private */ typedef enum { @@ -80,9 +99,6 @@ static int xmlCmpTextWriterStackEntry(const void *data0, static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk); static int xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1); -static int xmlTextWriterWriteMemCallback(void *context, - const xmlChar * str, int len); -static int xmlTextWriterCloseMemCallback(void *context); static int xmlTextWriterWriteDocCallback(void *context, const xmlChar * str, int len); static int xmlTextWriterCloseDocCallback(void *context); @@ -256,11 +272,8 @@ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression ATTRIBUTE_UNUSED) xmlOutputBufferPtr out; /*::todo handle compression */ - out = xmlOutputBufferCreateIO((xmlOutputWriteCallback) - xmlTextWriterWriteMemCallback, - (xmlOutputCloseCallback) - xmlTextWriterCloseMemCallback, - (void *) buf, NULL); + out = xmlOutputBufferCreateBuffer(buf, NULL); + if (out == NULL) { xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY, "xmlNewTextWriterMemory : out of memory!\n"); @@ -2842,8 +2855,11 @@ xmlTextWriterStartDTD(xmlTextWriterPtr writer, if (count < 0) return -1; sum += count; - } else if (writer->indent) { + } else { + if (writer->indent) count = xmlOutputBufferWriteString(writer->out, "\n "); + else + count = xmlOutputBufferWrite(writer->out, 1, " "); if (count < 0) return -1; sum += count; @@ -4275,40 +4291,6 @@ xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1) } /** - * xmlTextWriterWriteMemCallback: - * @context: the xmlBufferPtr - * @str: the data to write - * @len: the length of the data - * - * Write callback for the xmlOutputBuffer with target xmlBuffer - * - * Returns -1, 0, 1 - */ -static int -xmlTextWriterWriteMemCallback(void *context, const xmlChar * str, int len) -{ - xmlBufferPtr buf = (xmlBufferPtr) context; - - xmlBufferAdd(buf, str, len); - - return len; -} - -/** - * xmlTextWriterCloseMemCallback: - * @context: the xmlBufferPtr - * - * Close callback for the xmlOutputBuffer with target xmlBuffer - * - * Returns -1, 0, 1 - */ -static int -xmlTextWriterCloseMemCallback(void *context ATTRIBUTE_UNUSED) -{ - return 0; -} - -/** * xmlTextWriterWriteDocCallback: * @context: the xmlBufferPtr * @str: the data to write @@ -4373,6 +4355,7 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) int size; int count; xmlChar *buf; + va_list locarg; size = BUFSIZ; buf = (xmlChar *) xmlMalloc(size); @@ -4382,8 +4365,10 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) return NULL; } - while (((count = vsnprintf((char *) buf, size, format, argptr)) < 0) + VA_COPY(locarg, argptr); + while (((count = vsnprintf((char *) buf, size, format, locarg)) < 0) || (count == size - 1) || (count == size) || (count > size)) { + va_end(locarg); xmlFree(buf); size += BUFSIZ; buf = (xmlChar *) xmlMalloc(size); @@ -4392,7 +4377,9 @@ xmlTextWriterVSprintf(const char *format, va_list argptr) "xmlTextWriterVSprintf : out of memory!\n"); return NULL; } + VA_COPY(locarg, argptr); } + va_end(locarg); return buf; } @@ -65,12 +65,23 @@ __FILE__, __LINE__); /* +* XP_PATTERN_TO_ANY_NODE_ENABLED: when an XPath expression can be +* evaluated using the streaming mode (pattern.c) then this is used to +* enable resolution to nodes of type text-node, cdata-section-node, +* comment-node and pi-node. The only known scenario where this is +* needed is an expression like "foo//.", "//.", etc.; i.e. an expression +* where the final node to be selected can be of any type. +* Disabling this #define will result in an incorrect evaluation to +* only element-nodes and the document node. +*/ +#define XP_PATTERN_TO_ANY_NODE_ENABLED +/* * TODO: * There are a few spots where some tests are done which depend upon ascii * data. These should be enhanced for full UTF8 support (see particularly * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT) */ - + #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) /************************************************************************ * * @@ -808,7 +819,8 @@ xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) { shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); + + fprintf(output, shift); if (cur == NULL) { fprintf(output, "Object is empty (NULL)\n"); @@ -10998,13 +11010,16 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) static xmlXPathObjectPtr xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { int max_depth, min_depth; - int from_root; + int from_root; int ret, depth; +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + int eval_all_nodes; +#endif xmlNodePtr cur = NULL, limit = NULL; xmlXPathObjectPtr retval; xmlStreamCtxtPtr patstream; - - int nb_nodes = 0; + + int nb_nodes = 0; if ((ctxt == NULL) || (comp == NULL)) return(NULL); @@ -11082,6 +11097,10 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { return(retval); } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + eval_all_nodes = xmlStreamWantsAnyNode(patstream); +#endif + if (from_root) { ret = xmlStreamPush(patstream, NULL, NULL); if (ret < 0) { @@ -11089,34 +11108,53 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) { xmlXPathNodeSetAddUnique(retval->nodesetval, cur); } } - depth = 0; goto scan_children; do { next_node: nb_nodes++; - if (cur->type == XML_ELEMENT_NODE) { - ret = xmlStreamPush(patstream, cur->name, + + switch (cur->type) { + case XML_ELEMENT_NODE: +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: + case XML_COMMENT_NODE: + case XML_PI_NODE: +#endif + if (cur->type == XML_ELEMENT_NODE) { + ret = xmlStreamPush(patstream, cur->name, (cur->ns ? cur->ns->href : NULL)); - if (ret < 0) { - } else if (ret == 1) { - xmlXPathNodeSetAddUnique(retval->nodesetval, cur); - } - if ((cur->children == NULL) || (depth >= max_depth)) { - ret = xmlStreamPop(patstream); - while (cur->next != NULL) { - cur = cur->next; - if ((cur->type != XML_ENTITY_DECL) && - (cur->type != XML_DTD_NODE)) - goto next_node; } - } - } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + else if (eval_all_nodes) + ret = xmlStreamPushNode(patstream, NULL, NULL, cur->type); + else + break; +#endif + + if (ret < 0) { + /* NOP. */ + } else if (ret == 1) { + xmlXPathNodeSetAddUnique(retval->nodesetval, cur); + } + if ((cur->children == NULL) || (depth >= max_depth)) { + ret = xmlStreamPop(patstream); + while (cur->next != NULL) { + cur = cur->next; + if ((cur->type != XML_ENTITY_DECL) && + (cur->type != XML_DTD_NODE)) + goto next_node; + } + } + default: + break; + } scan_children: if ((cur->children != NULL) && (depth < max_depth)) { /* - * Do not descend on entities declarations + * Do not descend on entities declarations */ if (cur->children->type != XML_ENTITY_DECL) { cur = cur->children; @@ -11144,8 +11182,19 @@ scan_children: depth--; if ((cur == NULL) || (cur == limit)) goto done; - if (cur->type == XML_ELEMENT_NODE) - ret = xmlStreamPop(patstream); + if (cur->type == XML_ELEMENT_NODE) { + ret = xmlStreamPop(patstream); + } +#ifdef XP_PATTERN_TO_ANY_NODE_ENABLED + else if ((eval_all_nodes) && + ((cur->type == XML_TEXT_NODE) || + (cur->type == XML_CDATA_SECTION_NODE) || + (cur->type == XML_COMMENT_NODE) || + (cur->type == XML_PI_NODE))) + { + ret = xmlStreamPop(patstream); + } +#endif if (cur->next != NULL) { cur = cur->next; break; |