diff --git a/ChangeLog b/ChangeLog
index 63b59b4b..1d1416a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 31 10:25:37 CEST 2008 Daniel Veillard
startDocumentSAXFunc
startElementSAXFunc
-
-xmlRegisterHTTPPostCallbacks
+
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -200,7 +199,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlParseChunk
xmlParseInNodeContext
-xmlCleanupParser
xmlCleanupPredefinedEntities
xmlCtxtResetLastError
xmlNanoFTPCleanup
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html
index 49042c0a..fe1eab74 100644
--- a/doc/APIchunk10.html
+++ b/doc/APIchunk10.html
@@ -374,6 +374,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPtrLocationSetAdd
xmlCheckHTTPInput
+xmlCleanupParser
xmlHasProp
xmlKeepBlanksDefault
xmlNanoFTPProxy
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html
index d65e7016..769619b4 100644
--- a/doc/APIchunk12.html
+++ b/doc/APIchunk12.html
@@ -259,10 +259,13 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAS_ELEM_CIRCULAR
XML_SCHEMAS_TYPE_MARKED
+
-
+
+xmlNanoFTPScanProxy
xmlNanoHTTPScanProxy
+xmlCleanupParser
xmlCleanupThreads
xmlNanoFTPCleanup
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
index 00da28bb..c86ff168 100644
--- a/doc/APIchunk13.html
+++ b/doc/APIchunk13.html
@@ -495,7 +495,8 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlParseDocument
-
+
+xmlIsID
xmlParseEntityRef
xmlParserHandleReference
xmlSAXParseDoc
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html
index 2d04f0d9..03616a54 100644
--- a/doc/APIchunk15.html
+++ b/doc/APIchunk15.html
@@ -394,6 +394,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlRelaxNGSetValidStructuredErrors
xmlSchemaSetParserErrors
xmlSchemaSetParserStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlShellCmd
xmlSwitchEncoding
xmlSwitchInputEncoding
diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html
index f09d9bf1..548d945d 100644
--- a/doc/APIchunk17.html
+++ b/doc/APIchunk17.html
@@ -516,6 +516,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xlinkIsLink
xmlCharEncFirstLine
+xmlCleanupParser
xmlParsePEReference
xmlParserHandlePEReference
xmlXPathNextSelf
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html
index 7264dffb..a5db8097 100644
--- a/doc/APIchunk19.html
+++ b/doc/APIchunk19.html
@@ -242,7 +242,8 @@ A:link, A:visited, A:active { text-decoration: underline }
-
+
+xmlParsePEReference
xmlParserHandlePEReference
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html
index 16d268c5..05eab1d7 100644
--- a/doc/APIchunk21.html
+++ b/doc/APIchunk21.html
@@ -214,6 +214,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPathSubValues
xmlXPathValueFlipSign
+xmlCleanupParser
xmlModuleClose
xmlModuleFree
xmlReconciliateNs
@@ -226,6 +227,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXPathMultValues
xmlXPathSubValues
xmlXPathValueFlipSign
+
xmlDOMWrapCloneNode
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html
index 4d1c2961..1fcc6c91 100644
--- a/doc/APIchunk22.html
+++ b/doc/APIchunk22.html
@@ -320,6 +320,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
xmlDOMWrapReconcileNamespaces
+
xmlReaderWalker
xmlRelaxNGNewDocParserCtxt
@@ -352,7 +353,6 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlNodeSetSpacePreserve
-xmlCleanupParser
_xmlAttribute
_xmlDoc
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html
index bbf11658..4d76cc65 100644
--- a/doc/APIchunk23.html
+++ b/doc/APIchunk23.html
@@ -573,8 +573,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlReaderNewIO
xmlReaderNewMemory
xmlReaderNewWalker
-
-xmlXIncludeProcessNode
+
xmlListReverseWalk
xmlXPathNextAncestor
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html
index 5f563c61..9601ab4a 100644
--- a/doc/APIchunk24.html
+++ b/doc/APIchunk24.html
@@ -424,6 +424,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlXIncludeProcessTreeFlags
+xmlCleanupParser
xmlParserFindNodeInfoIndex
xmlXPathDistinct
@@ -718,6 +719,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchemaNewStringValue
xmlSchemaSetParserStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlSetStructuredErrorFunc
xmlFreeNs
diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html
index 5ab3207c..bc198ee0 100644
--- a/doc/APIchunk28.html
+++ b/doc/APIchunk28.html
@@ -222,6 +222,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSaveFormatFile
xmlSaveFormatFileEnc
+xmlCleanupParser
diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html
index f315b91b..72067ed7 100644
--- a/doc/APIchunk5.html
+++ b/doc/APIchunk5.html
@@ -61,6 +61,7 @@ A:link, A:visited, A:active { text-decoration: underline }
+xmlCleanupParser
xmlParseAttributeType
xmlSetGenericErrorFunc
xmlValidateElementDecl
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html
index ae29cb48..df878bfb 100644
--- a/doc/APIchunk7.html
+++ b/doc/APIchunk7.html
@@ -122,6 +122,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronFree
xmlSchematronParse
+xmlSchematronSetValidStructuredErrors
xmlSchematronNewMemParserCtxt
xmlSchematronNewParserCtxt
@@ -158,7 +159,8 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlNormalizeURIPath
-
+
+xmlLinkGetData
xmlParseNotationDecl
xmlTextReaderByteConsumed
diff --git a/doc/APIfiles.html b/doc/APIfiles.html
index b1773ebf..30d650a4 100644
--- a/doc/APIfiles.html
+++ b/doc/APIfiles.html
@@ -1218,6 +1218,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchemaWildcardNsPtr
xmlSchemaWildcardPtr
XML_SCHEMATRON_OUT_BUFFER
+XML_SCHEMATRON_OUT_ERROR
XML_SCHEMATRON_OUT_FILE
XML_SCHEMATRON_OUT_IO
XML_SCHEMATRON_OUT_QUIET
@@ -1235,6 +1236,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronParserCtxt
xmlSchematronParserCtxtPtr
xmlSchematronPtr
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidCtxt
xmlSchematronValidCtxtPtr
xmlSchematronValidOptions
@@ -1991,6 +1993,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_FROM_RELAXNGV
XML_FROM_SCHEMASP
XML_FROM_SCHEMASV
+XML_FROM_SCHEMATRONV
XML_FROM_TREE
XML_FROM_VALID
XML_FROM_WRITER
@@ -2397,6 +2400,8 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAP_WARN_SKIP_SCHEMA
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER
+XML_SCHEMATRONV_ASSERT
+XML_SCHEMATRONV_REPORT
XML_SCHEMAV_ATTRINVALID
XML_SCHEMAV_ATTRUNKNOWN
XML_SCHEMAV_CONSTRUCT
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html
index 80b0a887..9e83889f 100644
--- a/doc/APIfunctions.html
+++ b/doc/APIfunctions.html
@@ -852,6 +852,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
xmlSchemaValidityWarningFunc
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidityErrorFunc
xmlSchematronValidityWarningFunc
xmlSetFeature
@@ -1956,6 +1957,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronFree
xmlSchematronNewValidCtxt
xmlSchematronFreeValidCtxt
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidateDoc
xmlShellBase
xmlShellCat
@@ -1983,6 +1985,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlRelaxNGSetValidStructuredErrors
xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidStructuredErrors
+xmlSchematronSetValidStructuredErrors
xmlSetStructuredErrorFunc
xmlTextReaderSetStructuredErrorHandler
xmlThrDefSetStructuredErrorFunc
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
index e2ce107f..af09644c 100644
--- a/doc/APIsymbols.html
+++ b/doc/APIsymbols.html
@@ -435,6 +435,7 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_FROM_RELAXNGV
XML_FROM_SCHEMASP
XML_FROM_SCHEMASV
+XML_FROM_SCHEMATRONV
XML_FROM_TREE
XML_FROM_VALID
XML_FROM_WRITER
@@ -1128,7 +1129,10 @@ A:link, A:visited, A:active { text-decoration: underline }
XML_SCHEMAS_UNKNOWN
XML_SCHEMAS_USHORT
XML_SCHEMAS_WILDCARD_COMPLETE
+XML_SCHEMATRONV_ASSERT
+XML_SCHEMATRONV_REPORT
XML_SCHEMATRON_OUT_BUFFER
+XML_SCHEMATRON_OUT_ERROR
XML_SCHEMATRON_OUT_FILE
XML_SCHEMATRON_OUT_IO
XML_SCHEMATRON_OUT_QUIET
@@ -2780,6 +2784,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlSchematronParserCtxt
xmlSchematronParserCtxtPtr
xmlSchematronPtr
+xmlSchematronSetValidStructuredErrors
xmlSchematronValidCtxt
xmlSchematronValidCtxtPtr
xmlSchematronValidOptions
diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html
index c12cd026..83ca82e8 100644
--- a/doc/devhelp/libxml2-parser.html
+++ b/doc/devhelp/libxml2-parser.html
@@ -477,7 +477,7 @@ void xmlSetExternalEntityLoader (
| ctxt: | an XML parser context |
| Returns: | the index in bytes from the beginning of the entity or -1 in case the index could not be computed. |
void xmlCleanupParser (void)
-
Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.
+This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations.
void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq)
diff --git a/doc/devhelp/libxml2-schematron.html b/doc/devhelp/libxml2-schematron.html index 995d96ad..bdcb9445 100644 --- a/doc/devhelp/libxml2-schematron.html +++ b/doc/devhelp/libxml2-schematron.html @@ -57,6 +57,7 @@ typedef void xmlSchematronValidityErro xmlSchematronParserCtxtPtr xmlSchematronNewParserCtxt (const char * URL); typedef void xmlSchematronValidityWarningFunc (void * ctx,
const char * msg,
... ...); void xmlSchematronFree (xmlSchematronPtr schema); +void xmlSchematronSetValidStructuredErrors (xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx); void xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt); xmlSchematronPtr xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt); xmlSchematronParserCtxtPtr xmlSchematronNewDocParserCtxt (xmlDocPtr doc); @@ -103,6 +104,7 @@ The content of this structure is not made public by the API. XML_SCHEMATRON_OUT_QUIET = 1 /* quiet no report */ XML_SCHEMATRON_OUT_TEXT = 2 /* build a textual report */ XML_SCHEMATRON_OUT_XML = 4 /* output SVRL */ + XML_SCHEMATRON_OUT_ERROR = 8 /* output via xmlStructuredErrorFunc */ XML_SCHEMATRON_OUT_FILE = 256 /* output to a file descriptor */ XML_SCHEMATRON_OUT_BUFFER = 512 /* output to a buffer */ XML_SCHEMATRON_OUT_IO = 1024 /* output to I/O mechanism */ @@ -149,6 +151,10 @@ The content of this structure is not made public by the API.+xmlSchematronParse ()
xmlSchematronPtr xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt)
parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.
ctxt: a schema validation context Returns: the internal XML Schematron structure built from the resource or NULL in case of error
+xmlSchematronSetValidStructuredErrors ()
void xmlSchematronSetValidStructuredErrors (xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void * ctx)
+Set the structured error callback
+
ctxt: a Schematron validation context serror: the structured error function ctx: the functions context
@@ -818,6 +819,8 @@ void xmlResetError (XML_SCHEMAP_AU_PROPS_CORRECT = 3089 /* 3088 */ XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 /* 3089 */ XML_SCHEMAP_COS_ALL_LIMITED = 3091 /* 3090 */ + XML_SCHEMATRONV_ASSERT = 4000 /* 4000 */ + XML_SCHEMATRONV_REPORT = 4001 XML_MODULE_OPEN = 4900 /* 4900 */ XML_MODULE_CLOSE = 4901 /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000 diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index 3bc7ce5f..499bcb9a 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -620,6 +620,7 @@xmlSchematronValidateDoc ()
int xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr instance)
Validate a tree instance against the schematron
diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html index f67f734f..eaacd0bf 100644 --- a/doc/devhelp/libxml2-xmlerror.html +++ b/doc/devhelp/libxml2-xmlerror.html @@ -119,7 +119,8 @@ void xmlResetError (XML_FROM_CHECK = 24 /* The error checking module */ XML_FROM_WRITER = 25 /* The xmlwriter module */ XML_FROM_MODULE = 26 /* The dynamically loaded module modul */ - XML_FROM_I18N = 27 /* The module handling character conversion */ + XML_FROM_I18N = 27 /* The module handling character conversion */ + XML_FROM_SCHEMATRONV = 28 /* The Schematron validator module */ };+ @@ -1226,7 +1227,10 @@ + + + @@ -2854,6 +2858,7 @@ + diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 41a13b76..4297ac39 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -1328,6 +1328,7 @@ interface to the XML Schematron validity checking. Daniel Veillard + @@ -1347,6 +1348,7 @@ + @@ -2011,6 +2013,7 @@ + @@ -2512,6 +2515,7 @@ + @@ -2619,6 +2623,7 @@ + @@ -4845,7 +4850,7 @@ - + @@ -4858,6 +4863,7 @@ + @@ -5466,7 +5472,10 @@ crash if you try to modify the tree)'/> + + + @@ -8789,7 +8798,7 @@ Could we use @subtypes for this?'/> - Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it. +This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. @@ -13817,6 +13826,14 @@ Could we use @subtypes for this?'/> ++ defined(LIBXML_SCHEMATRON_ENABLED) +Set the structured error callback ++ + + + defined(LIBXML_SCHEMATRON_ENABLED) Validate a tree instance against the schematron diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml index 3941733f..6901f380 100644 --- a/doc/libxml2-refs.xml +++ b/doc/libxml2-refs.xml @@ -429,6 +429,7 @@+ @@ -1122,7 +1123,10 @@ + + + @@ -2774,6 +2778,7 @@ + @@ -3941,6 +3946,7 @@ + @@ -4634,7 +4640,10 @@ + + + @@ -6322,6 +6331,7 @@ + @@ -8728,6 +8738,7 @@ + @@ -10100,6 +10111,7 @@ + @@ -10139,6 +10151,7 @@ + @@ -11743,6 +11756,7 @@ + @@ -11760,6 +11774,7 @@ + @@ -12534,6 +12549,7 @@ + @@ -12940,6 +12956,8 @@ + + @@ -14593,7 +14611,6 @@ - @@ -14710,7 +14727,6 @@ - @@ -16568,6 +16584,7 @@ + @@ -17342,6 +17359,7 @@ + @@ -17392,6 +17410,7 @@ + @@ -18821,6 +18840,7 @@ + @@ -19860,15 +19880,20 @@ ++ + + + @@ -21397,6 +21422,7 @@+ @@ -22675,6 +22701,7 @@ + @@ -23829,6 +23856,7 @@ + @@ -24679,6 +24707,7 @@ + @@ -25503,6 +25532,7 @@+ @@ -25520,6 +25550,9 @@ ++ + @@ -26119,6 +26152,9 @@ + + + @@ -26166,7 +26202,6 @@ - @@ -27298,7 +27333,6 @@ - @@ -27957,6 +27991,7 @@ + @@ -28395,6 +28430,7 @@ + @@ -30342,6 +30378,7 @@ + diff --git a/doc/xml.html b/doc/xml.html index bd46fadf..877e7c20 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -3356,7 +3356,7 @@ should be both simple and complete enough to allow you to build your own.
- General overview
- Setting libxml2 set of memory routines
-- Cleaning up after parsing
+- Cleaning up after using the library
- Debugging routines
- General memory requirements
- Returning memory to the kernel
@@ -3392,27 +3392,29 @@ debugging, analysis or to implement a specific behaviour on memory management any other libxml2 routines (unless you are sure your allocations routines are compatibles). -Cleaning up after parsing
+Cleaning up after using the library
Libxml2 is not stateless, there is a few set of memory structures needing allocation before the parser is fully functional (some encoding structures for example). This also mean that once parsing is finished there is a tiny amount of memory (a few hundred bytes) which can be recollected if you don't -reuse the parser immediately:
+reuse the library or any document built with it:-
- xmlCleanupParser - () is a centralized routine to free the parsing states. Note that it - won't deallocate any produced tree if any (use the xmlFreeDoc() and - related routines for this).
+ () is a centralized routine to free the library state and data. Note + that it won't deallocate any produced tree if any (use the xmlFreeDoc() + and related routines for this). This should be called only when the library + is not used anymore.- xmlInitParser () is the dual routine allowing to preallocate the parsing state which can be useful for example to avoid initialization reentrancy problems when using libxml2 in multithreaded applications
Generally xmlCleanupParser() is safe, if needed the state will be rebuild -at the next invocation of parser routines, but be careful of the consequences -in multithreaded applications.
+Generally xmlCleanupParser() is safe assuming no parsing is ongoing and +no document is still being used, if needed the state will be rebuild at the +next invocation of parser routines (or by xmlInitParser()), but be careful +of the consequences in multithreaded applications.
Debugging routines
diff --git a/doc/xmlmem.html b/doc/xmlmem.html index 5437e735..55994445 100644 --- a/doc/xmlmem.html +++ b/doc/xmlmem.html @@ -9,7 +9,7 @@ H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline }Memory Management
The XML C parser and toolkit of Gnome
Memory Management
Table of Content:
- General overview
- Setting libxml2 set of memory routines
-- Cleaning up after parsing
+- Cleaning up after using the library
- Debugging routines
- General memory requirements
- Returning memory to the kernel
@@ -27,21 +27,23 @@ debugging, analysis or to implement a specific behaviour on memory management which allow to set up a new set of memory allocation functionsOf course a call to xmlMemSetup() should probably be done before calling any other libxml2 routines (unless you are sure your allocations routines are -compatibles).
Cleaning up after parsing
Libxml2 is not stateless, there is a few set of memory structures needing +compatibles).
Cleaning up after using the library
Libxml2 is not stateless, there is a few set of memory structures needing allocation before the parser is fully functional (some encoding structures for example). This also mean that once parsing is finished there is a tiny amount of memory (a few hundred bytes) which can be recollected if you don't -reuse the parser immediately:
- xmlCleanupParser - () is a centralized routine to free the parsing states. Note that it - won't deallocate any produced tree if any (use the xmlFreeDoc() and - related routines for this).
+reuse the library or any document built with it:
- xmlCleanupParser + () is a centralized routine to free the library state and data. Note + that it won't deallocate any produced tree if any (use the xmlFreeDoc() + and related routines for this). This should be called only when the library + is not used anymore.
- xmlInitParser () is the dual routine allowing to preallocate the parsing state which can be useful for example to avoid initialization reentrancy problems when using libxml2 in multithreaded applications
-Generally xmlCleanupParser() is safe, if needed the state will be rebuild -at the next invocation of parser routines, but be careful of the consequences -in multithreaded applications.
Debugging routines
When configured using --with-mem-debug flag (off by default), libxml2 uses +
Generally xmlCleanupParser() is safe assuming no parsing is ongoing and +no document is still being used, if needed the state will be rebuild at the +next invocation of parser routines (or by xmlInitParser()), but be careful +of the consequences in multithreaded applications.
Debugging routines
When configured using --with-mem-debug flag (off by default), libxml2 uses a set of memory allocation debugging routines keeping track of all allocated blocks and the location in the code where the routine was called. A couple of other debugging routines allow to dump the memory allocated infos to a file diff --git a/elfgcchack.h b/elfgcchack.h index cd9605c0..a17fa97f 100644 --- a/elfgcchack.h +++ b/elfgcchack.h @@ -2877,6 +2877,16 @@ extern __typeof (xmlDictSize) xmlDictSize__internal_alias __attribute((visibilit #endif #endif +#ifdef bottom_threads +#undef xmlDllMain +extern __typeof (xmlDllMain) xmlDllMain __attribute((alias("xmlDllMain__internal_alias"))); +#else +#ifndef xmlDllMain +extern __typeof (xmlDllMain) xmlDllMain__internal_alias __attribute((visibility("hidden"))); +#define xmlDllMain xmlDllMain__internal_alias +#endif +#endif + #ifdef bottom_tree #undef xmlDocCopyNode extern __typeof (xmlDocCopyNode) xmlDocCopyNode __attribute((alias("xmlDocCopyNode__internal_alias"))); @@ -10117,6 +10127,18 @@ extern __typeof (xmlSchematronParse) xmlSchematronParse__internal_alias __attrib #endif #endif +#if defined(LIBXML_SCHEMATRON_ENABLED) +#ifdef bottom_schematron +#undef xmlSchematronSetValidStructuredErrors +extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors __attribute((alias("xmlSchematronSetValidStructuredErrors__internal_alias"))); +#else +#ifndef xmlSchematronSetValidStructuredErrors +extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors__internal_alias __attribute((visibility("hidden"))); +#define xmlSchematronSetValidStructuredErrors xmlSchematronSetValidStructuredErrors__internal_alias +#endif +#endif +#endif + #if defined(LIBXML_SCHEMATRON_ENABLED) #ifdef bottom_schematron #undef xmlSchematronValidateDoc diff --git a/parser.c b/parser.c index e0f30e76..2530e60a 100644 --- a/parser.c +++ b/parser.c @@ -13176,12 +13176,15 @@ xmlInitParser(void) { /** * xmlCleanupParser: * - * Cleanup function for the XML library. It tries to reclaim all - * parsing related global memory allocated for the library processing. - * It doesn't deallocate any document related memory. Calling this - * function should not prevent reusing the library but one should - * call xmlCleanupParser() only when the process has - * finished using the library and all XML document built with it. + * This function name is somewhat misleading. It does not clean up + * parser state, it cleans up memory allocated by the library itself. + * It is a cleanup function for the XML library. It tries to reclaim all + * related global memory allocated for the library processing. + * It doesn't deallocate any document related memory. One should + * call xmlCleanupParser() only when the process has finished using + * the library and all XML/HTML documents built with it. + * See also xmlInitParser() which has the opposite function of preparing + * the library for operations. */ void diff --git a/testapi.c b/testapi.c index af71ac22..8a50e888 100644 --- a/testapi.c +++ b/testapi.c @@ -18023,6 +18023,16 @@ static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematron #endif +static int +test_xmlSchematronSetValidStructuredErrors(void) { + int test_ret = 0; + + + /* missing type support */ + return(test_ret); +} + + static int test_xmlSchematronValidateDoc(void) { int test_ret = 0; @@ -18067,12 +18077,13 @@ static int test_schematron(void) { int test_ret = 0; - if (quiet == 0) printf("Testing schematron : 1 of 9 functions ...\n"); + if (quiet == 0) printf("Testing schematron : 1 of 10 functions ...\n"); test_ret += test_xmlSchematronNewDocParserCtxt(); test_ret += test_xmlSchematronNewMemParserCtxt(); test_ret += test_xmlSchematronNewParserCtxt(); test_ret += test_xmlSchematronNewValidCtxt(); test_ret += test_xmlSchematronParse(); + test_ret += test_xmlSchematronSetValidStructuredErrors(); test_ret += test_xmlSchematronValidateDoc(); if (test_ret != 0) diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src index e37cfe06..db05ad46 100644 --- a/win32/libxml2.def.src +++ b/win32/libxml2.def.src @@ -768,6 +768,7 @@ xmlDictOwns xmlDictQLookup xmlDictReference xmlDictSize +xmlDllMain xmlDocCopyNode xmlDocCopyNodeList xmlDocDump @@ -1783,6 +1784,7 @@ xmlSchematronNewMemParserCtxt xmlSchematronNewParserCtxt xmlSchematronNewValidCtxt xmlSchematronParse +xmlSchematronSetValidStructuredErrors xmlSchematronValidateDoc xmlSearchNs xmlSearchNsByHref