diff --git a/ChangeLog b/ChangeLog index 69b574a6..d21f85b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Oct 11 18:40:00 CEST 2006 Daniel Veillard + + * valid.c: fixed a weird error where validity context whould not + show up if warnings were disabled pointed out by Bob Stayton + * xmlIO.c doc/generator.py: cleanup and fix to regenerate the docs + * doc//* testapi.c: rebuilt the docs + Wed Oct 11 14:32:00 CEST 2006 Daniel Veillard * libxml-2.0.pc.in: applied patch from Mikhail Zabaluev to separate diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html index 1388ad78..f67a9029 100644 --- a/doc/APIchunk0.html +++ b/doc/APIchunk0.html @@ -104,7 +104,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoFTPList
xmlParseAttValue
xmlTextWriterEndDocument
-
Allocate
xmlNanoFTPNewCtxt
+
Allocate
htmlNewParserCtxt
+xmlNanoFTPNewCtxt
xmlNewDocElementContent
xmlNewElementContent
xmlNewParserCtxt
diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html index 5b1ea9a3..a222fe0c 100644 --- a/doc/APIchunk1.html +++ b/doc/APIchunk1.html @@ -267,6 +267,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Computes
xmlBuildURI
Concat
xmlTextConcat
Constructs
xmlCanonicPath
+xmlPathToURI
Content
xmlNodeGetBase
xmlParseElementContentDecl
Content-Type
xmlNanoHTTPFetch
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index b6a2186e..32185325 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -282,7 +282,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewRMutex
xmlReallocLoc
xmlXPathObjectCopy
-
allocation
xmlBufferSetAllocationScheme
+
allocation
htmlNewParserCtxt
+xmlBufferSetAllocationScheme
xmlGetBufferAllocationScheme
xmlMallocAtomicLoc
xmlMallocLoc
@@ -478,6 +479,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseAttValue
xmlSAX2ResolveEntity
xmlSetExternalEntityLoader
+xmlXIncludeProcessFlagsData
applications
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
applied
xmlHashCopy
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index 2b4a64e0..b036fc8f 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -193,6 +193,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserInputBufferCreateMem
xmlParserInputBufferCreateStatic
checked
XML_SCHEMAS_ELEM_INTERNAL_CHECKED
+_xmlEntity
xmlNodeGetBase
xmlNodeGetLang
xmlNodeGetSpacePreserve
@@ -578,6 +579,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidGetValidElements
construct
xmlParseElementChildrenContentDecl
construction
xmlCanonicPath
+xmlPathToURI
constructs
xmlExpParse
xmlParseNamespace
consumed
UTF8ToHtml
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index af82134f..1c9e8655 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -589,6 +589,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlShellCat
xmlShellDir
duplicate
xmlCanonicPath
+xmlPathToURI
duplicated
xmlRelaxNGNewDocParserCtxt
xmlXPathNodeSetFreeNs
duplicates
xmlSchemaCopyValue
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index 5484f6f0..dfe748d3 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -386,6 +386,7 @@ A:link, A:visited, A:active { text-decoration: underline }
explicitly
xmlSAXDefaultVersion
explored
xmlXPathAxisFunc
exposing
xmlTextReaderRead
+
expressing
xmlPathToURI
expressions
LIBXML_EXPR_ENABLED
LIBXML_REGEXP_ENABLED
xmlExpExpDerive
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index 09bad2da..5bd7b26d 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -74,6 +74,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlShellLoad
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
@@ -89,6 +90,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCharEncOutFunc
xmlCheckFilename
xmlFileOpen
+xmlPathToURI
fallback
XINCLUDE_FALLBACK
docbSAXParseDoc
docbSAXParseFile
@@ -134,6 +136,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SKIP_IDS
_xmlError
xmlParseMisc
+xmlXIncludeProcessFlagsData
xmlXPathOrderDocElems
fields
XML_SAX2_MAGIC
_htmlElemDesc
@@ -145,6 +148,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlReadFile
xmlCanonicPath
xmlCtxtReadFile
+xmlPathToURI
xmlReadFile
xmlReaderForFile
xmlReaderNewFile
@@ -320,6 +324,7 @@ A:link, A:visited, A:active { text-decoration: underline }
fragments
xmlParseURIRaw
freeing
xmlCanonicPath
xmlParserInputDeallocate
+xmlPathToURI
frees
xmlBufferFree
xmlXPathContextSetCache
front
xmlValidateNCName
diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html index 5585cd58..0f91dc87 100644 --- a/doc/APIchunk16.html +++ b/doc/APIchunk16.html @@ -287,6 +287,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlEntityValueLookup
htmlParseEntityRef
htmlNodePtr
htmlNodeStatus
+
htmlParserCtxtPtr
htmlNewParserCtxt
htmlParserOption
htmlCtxtReadDoc
htmlCtxtReadFd
htmlCtxtReadFile
diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html index 9aa76a79..e54d9d83 100644 --- a/doc/APIchunk17.html +++ b/doc/APIchunk17.html @@ -153,6 +153,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlCleanupOutputCallbacks
xmlPopInputCallbacks
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessTreeFlags
xmlXIncludeSetFlags
including
XML_SCHEMAS_INCLUDING_CONVERT_NS
@@ -357,6 +358,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_DETECT_IDS
XML_SKIP_IDS
htmlNewDocNoDtD
+htmlNewParserCtxt
xmlCharEncodingOutputFunc
xmlCreateEntitiesTable
xmlCreateEnumeration
@@ -425,6 +427,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewPI
xmlSAX2ProcessingInstruction
insufficient
xmlCanonicPath
+xmlPathToURI
intact
xmlParseURIRaw
integer
xmlStrcasecmp
xmlStrcmp
@@ -484,7 +487,6 @@ A:link, A:visited, A:active { text-decoration: underline }
invoking
xmlGetLineNo
isinf
xmlXPathIsInf
isn
xmlRegisterCharEncodingHandler
-xmlXPathCastToString
isnan
xmlXPathIsNaN
issue
xmlEncodeEntities
issued
xlinkIsLink
diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index c2eb2af0..f965440c 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -346,6 +346,7 @@ A:link, A:visited, A:active { text-decoration: underline } xlinkExtendedLinkFunk
xlinkExtendedLinkSetFunk
xmlCanonicPath
+xmlPathToURI
xmlSAX2SetDocumentLocator
xmlTextReaderLocatorBaseURI
xmlTextReaderLocatorLineNumber
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index d654a0e9..2a9174df 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -128,7 +128,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderCurrentDoc
xmlValidCtxtNormalizeAttributeValue
xmlValidNormalizeAttributeValue
-xmlXPathCastToString
xmlXPathPopBoolean
xmlXPathPopExternal
xmlXPathPopNodeSet
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 7b77dd64..f7cf4103 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline }
obsolete
xmlNormalizeWindowsPath
obsolete:
XML_SCHEMAS_ELEM_TOPLEVEL
occupied
xmlCanonicPath
+xmlPathToURI
occur
XML_SCHEMAS_TYPE_VARIETY_ABSENT
xmlParseComment
xmlParseMarkupDecl
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index f4c83216..bd256cbf 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -101,6 +101,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseAttValue
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
+xmlXIncludeProcessFlagsData
xmlXPathEvalFunc
xmlXPathIntersection
passive
xmlNanoFTPGetConnection
@@ -122,6 +123,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNormalizeURIPath
xmlNormalizeWindowsPath
xmlParserGetDirectory
+xmlPathToURI
xmlShellPwd
xmlShellValidate
xmlTextReaderRelaxNGValidate
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index 4bfe14f8..c6359686 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -518,6 +518,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNanoHTTPContentLength
responsible
xmlC14NDocDumpMemory
xmlCanonicPath
+xmlPathToURI
restored
xmlTextReaderSetErrorHandler
xmlTextReaderSetStructuredErrorHandler
restrict
xmlParseExternalID
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html index 778f69a5..b737b67b 100644 --- a/doc/APIchunk24.html +++ b/doc/APIchunk24.html @@ -67,6 +67,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGcMemGet
xmlMemGet
xmlNanoHTTPFetch
+xmlSaveTree
xmlShell
xmlShellSave
saved
_htmlElemDesc
@@ -415,6 +416,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlValidatePushCData
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
@@ -756,6 +758,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringLenDecodeEntities
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index 59ed59ab..39aeb8fb 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -261,6 +261,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlPopInputCallbacks
xmlPushInput
xmlReconciliateNs
+xmlSaveTree
xmlSetTreeDoc
total
_xmlOutputBuffer
xmlGetFeaturesList
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 4d2a6071..882ab748 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -139,6 +139,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeNewContext
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 2def8ded..c4d348cd 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -79,6 +79,7 @@ A:link, A:visited, A:active { text-decoration: underline }

Type htmlParserCtxtPtr:

htmlCreateFileParserCtxt
htmlCreateMemoryParserCtxt
htmlCreatePushParserCtxt
+htmlNewParserCtxt

Type htmlStatus:

htmlAttrAllowed
htmlElementStatusHere
htmlNodeStatus
@@ -207,6 +208,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseSystemLiteral
xmlParseVersionInfo
xmlParseVersionNum
+xmlPathToURI
xmlSaveUri
xmlScanName
xmlSchemaCollapseString
diff --git a/doc/APIfiles.html b/doc/APIfiles.html index 79f127cd..e10fe007 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -66,6 +66,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlHandleOmittedElem
htmlIsAutoClosed
htmlIsScriptAttribute
+htmlNewParserCtxt
htmlNodePtr
htmlNodeStatus
htmlParseCharRef
@@ -1545,6 +1546,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseURI
xmlParseURIRaw
xmlParseURIReference
+xmlPathToURI
xmlPrintURI
xmlSaveUri
xmlURI
@@ -1657,6 +1659,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeNewContext
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index 46642d1e..fea4fd37 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -305,6 +305,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseElementContentDecl
xmlParseExternalEntity
xmlParseExternalSubset
+xmlPathToURI
xmlPatterncompile
xmlReadDoc
xmlReaderForDoc
@@ -862,6 +863,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlThrDefSetStructuredErrorFunc
xmlValidityErrorFunc
xmlValidityWarningFunc
+xmlXIncludeProcessFlagsData
xmlXPathFuncLookupFunc
xmlXPathRegisterFuncLookup
xmlXPathRegisterVariableLookup
@@ -1216,6 +1218,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeNewContext
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXPathNewContext
xmlXPathOrderDocElems
xmlXPtrNewContext
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index 25e61140..c6c52656 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -1568,6 +1568,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlIsScriptAttribute
htmlNewDoc
htmlNewDocNoDtD
+htmlNewParserCtxt
htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
@@ -2475,6 +2476,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserValidityWarning
xmlParserVersion
xmlParserWarning
+xmlPathToURI
xmlPattern
xmlPatternFlags
xmlPatternFromRoot
@@ -3261,6 +3263,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXIncludeNewContext
xmlXIncludeProcess
xmlXIncludeProcessFlags
+xmlXIncludeProcessFlagsData
xmlXIncludeProcessNode
xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
diff --git a/doc/apibuild.py b/doc/apibuild.py index f1a795fd..1e737250 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -49,6 +49,7 @@ ignored_files = { "runtest.c": "regression tests program", "runsuite.c": "regression tests program", "tst.c": "not part of the library", + "test.c": "not part of the library", "testdso.c": "test for dynamid shared libraries", } diff --git a/doc/devhelp/libxml2-HTMLparser.html b/doc/devhelp/libxml2-HTMLparser.html index 3a4a67d9..827da396 100644 --- a/doc/devhelp/libxml2-HTMLparser.html +++ b/doc/devhelp/libxml2-HTMLparser.html @@ -95,6 +95,7 @@ void htmlFreeParserCtxt (htmlDocPtr htmlReadFile (const char * filename,
const char * encoding,
int options); htmlDocPtr htmlCtxtReadFile (htmlParserCtxtPtr ctxt,
const char * filename,
const char * encoding,
int options); int htmlParseDocument (htmlParserCtxtPtr ctxt); +htmlParserCtxtPtr htmlNewParserCtxt (void); htmlDocPtr htmlSAXParseDoc (xmlChar * cur,
const char * encoding,
htmlSAXHandlerPtr sax,
void * userData); int htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options); htmlDocPtr htmlParseDoc (xmlChar * cur,
const char * encoding); @@ -294,6 +295,10 @@ int htmlCtxtUseOptions (

htmlIsScriptAttribute ()

int	htmlIsScriptAttribute		(const xmlChar * name)

Check if an attribute is of content type Script

name:an attribute name
Returns:1 is the attribute is a script 0 otherwise
+
+

htmlNewParserCtxt ()

htmlParserCtxtPtr	htmlNewParserCtxt	(void)
+

Allocate and initialize a new parser context.

+
Returns:the htmlParserCtxtPtr or NULL in case of allocation error

htmlNodeStatus ()

htmlStatus	htmlNodeStatus		(const htmlNodePtr node, 
int legacy)

Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)

diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html index 7cb98725..aba84d3e 100644 --- a/doc/devhelp/libxml2-tree.html +++ b/doc/devhelp/libxml2-tree.html @@ -567,6 +567,7 @@ void xmlFreeNsList (xmlChar * URI : the full URI as computed int owner : does the entity own the childrens + int checked : was the entity content checked } xmlEntity;

diff --git a/doc/devhelp/libxml2-uri.html b/doc/devhelp/libxml2-uri.html index 22f724ed..33f32fa4 100644 --- a/doc/devhelp/libxml2-uri.html +++ b/doc/devhelp/libxml2-uri.html @@ -52,6 +52,7 @@ char * xmlURIUnescapeString (const char * s xmlURIPtr xmlParseURI (const char * str); xmlURIPtr xmlCreateURI (void); xmlChar * xmlURIEscapeStr (const xmlChar * str,
const xmlChar * list); +xmlChar * xmlPathToURI (const xmlChar * path); xmlChar * xmlCanonicPath (const xmlChar * path); void xmlFreeURI (xmlURIPtr uri); int xmlParseURIReference (xmlURIPtr uri,
const char * str); @@ -121,6 +122,10 @@ int xmlParseURIReference (

xmlParseURIReference ()

int	xmlParseURIReference		(xmlURIPtr uri, 
const char * str)

Parse an URI reference string and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

uri:pointer to an URI structure
str:the string to analyze
Returns:0 or the error code
+
+

xmlPathToURI ()

xmlChar *	xmlPathToURI		(const xmlChar * path)
+

Constructs an URI expressing the existing path

+
path:the resource locator in a filesystem notation
Returns:a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.

xmlPrintURI ()

void	xmlPrintURI			(FILE * stream, 
xmlURIPtr uri)

Prints the URI in the stream @stream.

diff --git a/doc/devhelp/libxml2-xinclude.html b/doc/devhelp/libxml2-xinclude.html index 6ffcd5a6..31df9279 100644 --- a/doc/devhelp/libxml2-xinclude.html +++ b/doc/devhelp/libxml2-xinclude.html @@ -55,6 +55,7 @@ #define XINCLUDE_OLD_NS; typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; typedef xmlXIncludeCtxt * xmlXIncludeCtxtPtr; +int xmlXIncludeProcessFlagsData (xmlDocPtr doc,
int flags,
void * data); int xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags); int xmlXIncludeProcessTree (xmlNodePtr tree); int xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr node); @@ -136,6 +137,10 @@ The content of this structure is not made public by the API.

xmlXIncludeProcessFlags ()

int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
int flags)

Implement the XInclude substitution on the XML document @doc

doc:an XML document
flags:a set of xmlParserOption used for parsing XML includes
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.
+
+

xmlXIncludeProcessFlagsData ()

int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
int flags,
void * data)
+

Implement the XInclude substitution on the XML document @doc

+
doc:an XML document
flags:a set of xmlParserOption used for parsing XML includes
data:application data that will be passed to the parser context in the _private field of the parser context(s)
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

xmlXIncludeProcessNode ()

int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
xmlNodePtr node)

Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.

diff --git a/doc/devhelp/libxml2-xmlsave.html b/doc/devhelp/libxml2-xmlsave.html index 910a1dff..cbe12bbf 100644 --- a/doc/devhelp/libxml2-xmlsave.html +++ b/doc/devhelp/libxml2-xmlsave.html @@ -121,7 +121,7 @@ The content of this structure is not made public by the API.

xmlSaveTree ()

long	xmlSaveTree			(xmlSaveCtxtPtr ctxt, 
xmlNodePtr node)

Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead

-
ctxt:a document saving context
node:a document
Returns:the number of byte written or -1 in case of error
+
ctxt:a document saving context
node:the top node of the subtree to save
Returns:the number of byte written or -1 in case of error

diff --git a/doc/devhelp/libxml2-xpath.html b/doc/devhelp/libxml2-xpath.html index a11090ff..86b0cc29 100644 --- a/doc/devhelp/libxml2-xpath.html +++ b/doc/devhelp/libxml2-xpath.html @@ -425,7 +425,7 @@ The content of this structure is not made public by the API.

xmlXPathCastToString ()

xmlChar *	xmlXPathCastToString	(xmlXPathObjectPtr val)

Converts an existing object to its string() equivalent

-
val:an XPath object
Returns:the string value of the object, NULL in case of error. A new string is allocated only if needed (@val isn't a string object).
+
val:an XPath object
Returns:the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().

xmlXPathCmpNodes ()

int	xmlXPathCmpNodes		(xmlNodePtr node1, 
xmlNodePtr node2)

Compare two nodes w.r.t document order

diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index a7277bf4..d7899349 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -1951,6 +1951,7 @@ + @@ -2636,6 +2637,7 @@ + @@ -3297,6 +3299,7 @@ + diff --git a/doc/html/libxml-HTMLparser.html b/doc/html/libxml-HTMLparser.html index adc6875a..694a08f5 100644 --- a/doc/html/libxml-HTMLparser.html +++ b/doc/html/libxml-HTMLparser.html @@ -46,6 +46,7 @@ A:link, A:visited, A:active { text-decoration: underline }
int	htmlHandleOmittedElem		(int val)
int	htmlIsAutoClosed		(htmlDocPtr doc, 
htmlNodePtr elem)
int	htmlIsScriptAttribute		(const xmlChar * name)
+
htmlParserCtxtPtr	htmlNewParserCtxt	(void)
htmlStatus	htmlNodeStatus		(const htmlNodePtr node, 
int legacy)
int	htmlParseCharRef		(htmlParserCtxtPtr ctxt)
int	htmlParseChunk			(htmlParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
@@ -143,7 +144,9 @@ A:link, A:visited, A:active { text-decoration: underline }

The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child

doc:the HTML document
elem:the HTML element
Returns:1 if autoclosed, 0 otherwise

Function: htmlIsScriptAttribute

int	htmlIsScriptAttribute		(const xmlChar * name)

Check if an attribute is of content type Script

-
name:an attribute name
Returns:1 is the attribute is a script 0 otherwise

Function: htmlNodeStatus

htmlStatus	htmlNodeStatus		(const htmlNodePtr node, 
int legacy)
+
name:an attribute name
Returns:1 is the attribute is a script 0 otherwise

Function: htmlNewParserCtxt

htmlParserCtxtPtr	htmlNewParserCtxt	(void)
+

Allocate and initialize a new parser context.

+
Returns:the htmlParserCtxtPtr or NULL in case of allocation error

Function: htmlNodeStatus

htmlStatus	htmlNodeStatus		(const htmlNodePtr node, 
int legacy)

Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)

node:an htmlNodePtr in a tree
legacy:whether to allow deprecated elements (YES is faster here for Element nodes)
Returns:for Element nodes, a return from htmlElementAllowedHere (if legacy allowed) or htmlElementStatusHere (otherwise). for Attribute nodes, a return from htmlAttrAllowed for other nodes, HTML_NA (no checks performed)

Function: htmlParseCharRef

int	htmlParseCharRef		(htmlParserCtxtPtr ctxt)

parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index 3a175833..78486910 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -412,6 +412,7 @@ A:link, A:visited, A:active { text-decoration: underline } struct _xmlEntity * nexte : unused const xmlChar * URI : the full URI as computed int owner : does the entity own the childrens + int checked : was the entity content checked }

Structure xmlEnumeration

Structure xmlEnumeration
struct _xmlEnumeration { struct _xmlEnumeration * next : next one const xmlChar * name : Enumeration name diff --git a/doc/html/libxml-uri.html b/doc/html/libxml-uri.html index cb2a4196..fa7ee19d 100644 --- a/doc/html/libxml-uri.html +++ b/doc/html/libxml-uri.html @@ -21,6 +21,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlURIPtr	xmlParseURI		(const char * str)
xmlURIPtr	xmlParseURIRaw		(const char * str, 
int raw)
int	xmlParseURIReference		(xmlURIPtr uri, 
const char * str)
+
xmlChar *	xmlPathToURI		(const xmlChar * path)
void	xmlPrintURI			(FILE * stream, 
xmlURIPtr uri)
xmlChar *	xmlSaveUri		(xmlURIPtr uri)
xmlChar *	xmlURIEscape		(const xmlChar * str)
@@ -56,7 +57,9 @@ A:link, A:visited, A:active { text-decoration: underline }

Parse an URI but allows to keep intact the original fragments. URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

str:the URI string to analyze
raw:if 1 unescaping of URI pieces are disabled
Returns:a newly built xmlURIPtr or NULL in case of error

Function: xmlParseURIReference

int	xmlParseURIReference		(xmlURIPtr uri, 
const char * str)

Parse an URI reference string and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

-
uri:pointer to an URI structure
str:the string to analyze
Returns:0 or the error code

Function: xmlPrintURI

void	xmlPrintURI			(FILE * stream, 
xmlURIPtr uri)
+
uri:pointer to an URI structure
str:the string to analyze
Returns:0 or the error code

Function: xmlPathToURI

xmlChar *	xmlPathToURI		(const xmlChar * path)
+

Constructs an URI expressing the existing path

+
path:the resource locator in a filesystem notation
Returns:a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.

Function: xmlPrintURI

void	xmlPrintURI			(FILE * stream, 
xmlURIPtr uri)

Prints the URI in the stream @stream.

stream:a FILE* for the output
uri:pointer to an xmlURI

Function: xmlSaveUri

xmlChar *	xmlSaveUri		(xmlURIPtr uri)

Save the URI as an escaped string

diff --git a/doc/html/libxml-xinclude.html b/doc/html/libxml-xinclude.html index 44771b99..58c1c19e 100644 --- a/doc/html/libxml-xinclude.html +++ b/doc/html/libxml-xinclude.html @@ -17,6 +17,7 @@ The content of this structure is not made public by the API.
xmlXIncludeCtxtPtr	xmlXIncludeNewContext	(xmlDocPtr doc)
int	xmlXIncludeProcess		(xmlDocPtr doc)
int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
int flags)
+
int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
int flags,
void * data)
int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
xmlNodePtr node)
int	xmlXIncludeProcessTree		(xmlNodePtr tree)
int	xmlXIncludeProcessTreeFlags	(xmlNodePtr tree, 
int flags)
@@ -42,7 +43,9 @@ The content of this structure is not made public by the API.

Implement the XInclude substitution on the XML document @doc

doc:an XML document
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Function: xmlXIncludeProcessFlags

int	xmlXIncludeProcessFlags		(xmlDocPtr doc, 
int flags)

Implement the XInclude substitution on the XML document @doc

-
doc:an XML document
flags:a set of xmlParserOption used for parsing XML includes
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Function: xmlXIncludeProcessNode

int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
xmlNodePtr node)
+
doc:an XML document
flags:a set of xmlParserOption used for parsing XML includes
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Function: xmlXIncludeProcessFlagsData

int	xmlXIncludeProcessFlagsData	(xmlDocPtr doc, 
int flags,
void * data)
+

Implement the XInclude substitution on the XML document @doc

+
doc:an XML document
flags:a set of xmlParserOption used for parsing XML includes
data:application data that will be passed to the parser context in the _private field of the parser context(s)
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Function: xmlXIncludeProcessNode

int	xmlXIncludeProcessNode		(xmlXIncludeCtxtPtr ctxt, 
xmlNodePtr node)

Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.

ctxt:an existing XInclude context
node:a node in an XML document
Returns:0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Function: xmlXIncludeProcessTree

int	xmlXIncludeProcessTree		(xmlNodePtr tree)

Implement the XInclude substitution for the given subtree

diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html index 664c6efe..d649ef73 100644 --- a/doc/html/libxml-xmlsave.html +++ b/doc/html/libxml-xmlsave.html @@ -53,4 +53,4 @@ The content of this structure is not made public by the API.

Create a document saving context serializing to a file descriptor with the encoding and the options given

iowrite:an I/O write function
ioclose:an I/O close function
ioctx:an I/O handler
encoding:the encoding name to use or NULL
options:a set of xmlSaveOptions
Returns:a new serialization context or NULL in case of error.

Function: xmlSaveTree

long	xmlSaveTree			(xmlSaveCtxtPtr ctxt, 
xmlNodePtr node)

Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead

-
ctxt:a document saving context
node:a document
Returns:the number of byte written or -1 in case of error

Daniel Veillard

+
ctxt:a document saving context
node:the top node of the subtree to save
Returns:the number of byte written or -1 in case of error

Daniel Veillard

diff --git a/doc/html/libxml-xpath.html b/doc/html/libxml-xpath.html index 5a797bc0..6aca3c31 100644 --- a/doc/html/libxml-xpath.html +++ b/doc/html/libxml-xpath.html @@ -241,7 +241,7 @@ The content of this structure is not made public by the API.

Converts an XPath object to its number value

val:an XPath object
Returns:the number value

Function: xmlXPathCastToString

xmlChar *	xmlXPathCastToString	(xmlXPathObjectPtr val)

Converts an existing object to its string() equivalent

-
val:an XPath object
Returns:the string value of the object, NULL in case of error. A new string is allocated only if needed (@val isn't a string object).

Function: xmlXPathCmpNodes

int	xmlXPathCmpNodes		(xmlNodePtr node1, 
xmlNodePtr node2)
+
val:an XPath object
Returns:the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().

Function: xmlXPathCmpNodes

int	xmlXPathCmpNodes		(xmlNodePtr node1, 
xmlNodePtr node2)

Compare two nodes w.r.t document order

node1:the first node
node2:the second node
Returns:-2 in case of error 1 if first point < second point, 0 if it's the same node, -1 otherwise

Function: xmlXPathCompile

xmlXPathCompExprPtr	xmlXPathCompile	(const xmlChar * str)

Compile an XPath expression

diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 2ef1c394..41a84c34 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -94,6 +94,7 @@ + @@ -1670,6 +1671,7 @@ + @@ -1788,6 +1790,7 @@ + @@ -5995,6 +5998,7 @@ actually an xmlCharEncoding'/> + @@ -7451,6 +7455,11 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_HTML_ENABLED) + Allocate and initialize a new parser context. + + defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added. @@ -12207,6 +12216,11 @@ Could we use @subtypes for this?'/> + + Constructs an URI expressing the existing path + + + defined(LIBXML_PATTERN_ENABLED) Check if the pattern must be looked at from the root. @@ -13277,7 +13291,7 @@ Could we use @subtypes for this?'/> Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead - + Save the URI as an escaped string @@ -16831,6 +16845,14 @@ Could we use @subtypes for this?'/> + + defined(LIBXML_XINCLUDE_ENABLED) + Implement the XInclude substitution on the XML document @doc + + + + + defined(LIBXML_XINCLUDE_ENABLED) Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context. @@ -16959,7 +16981,7 @@ Could we use @subtypes for this?'/> defined(LIBXML_XPATH_ENABLED) Converts an existing object to its string() equivalent - + diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml index f89a436e..69d7166b 100644 --- a/doc/libxml2-refs.xml +++ b/doc/libxml2-refs.xml @@ -1562,6 +1562,7 @@ + @@ -2469,6 +2470,7 @@ + @@ -3255,6 +3257,7 @@ + @@ -5084,6 +5087,7 @@ + @@ -6011,6 +6015,7 @@ + @@ -6797,6 +6802,7 @@ + @@ -7116,6 +7122,7 @@ + @@ -7282,6 +7289,7 @@ + @@ -8121,6 +8129,7 @@ + @@ -8724,6 +8733,7 @@ + @@ -9140,6 +9150,7 @@ + @@ -10528,6 +10539,7 @@ + @@ -12055,6 +12067,7 @@ + @@ -12171,6 +12184,7 @@ + @@ -14157,6 +14171,7 @@ + @@ -14781,6 +14796,7 @@ + @@ -18098,6 +18114,7 @@ + @@ -18671,6 +18688,7 @@ + @@ -18949,6 +18967,7 @@ + @@ -19723,6 +19742,7 @@ + @@ -20304,6 +20324,7 @@ + @@ -21464,6 +21485,7 @@ + @@ -22028,6 +22050,9 @@ + + + @@ -22139,6 +22164,7 @@ + @@ -22156,6 +22182,7 @@ + @@ -22229,6 +22256,7 @@ + @@ -22246,6 +22274,7 @@ + @@ -22505,6 +22534,7 @@ + @@ -23013,6 +23043,9 @@ + + + @@ -23230,6 +23263,7 @@ + @@ -23504,6 +23538,7 @@ + @@ -23608,6 +23643,7 @@ + @@ -23707,7 +23743,6 @@ - @@ -24191,6 +24226,7 @@ + @@ -24869,7 +24905,6 @@ - @@ -25204,6 +25239,7 @@ + @@ -25695,6 +25731,7 @@ + @@ -25726,6 +25763,7 @@ + @@ -27119,6 +27157,7 @@ + @@ -27326,6 +27365,7 @@ + @@ -27836,6 +27876,7 @@ + @@ -28369,6 +28410,7 @@ + @@ -28866,6 +28908,7 @@ + @@ -29591,6 +29634,7 @@ + @@ -30158,6 +30202,7 @@ + diff --git a/python/libxml2class.txt b/python/libxml2class.txt index 20eb5c48..211081ca 100644 --- a/python/libxml2class.txt +++ b/python/libxml2class.txt @@ -9,6 +9,7 @@ htmlCreateMemoryParserCtxt() htmlHandleOmittedElem() htmlIsScriptAttribute() +htmlNewParserCtxt() htmlParseDoc() htmlParseFile() htmlReadDoc() @@ -189,6 +190,7 @@ createURI() normalizeURIPath() parseURI() parseURIRaw() +pathToURI() # functions from module valid newValidCtxt() diff --git a/testapi.c b/testapi.c index 096a396b..ec094219 100644 --- a/testapi.c +++ b/testapi.c @@ -2124,6 +2124,33 @@ test_htmlIsScriptAttribute(void) { } +static int +test_htmlNewParserCtxt(void) { + int test_ret = 0; + +#if defined(LIBXML_HTML_ENABLED) + int mem_base; + htmlParserCtxtPtr ret_val; + + mem_base = xmlMemBlocks(); + + ret_val = htmlNewParserCtxt(); + desret_htmlParserCtxtPtr(ret_val); + call_tests++; + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in htmlNewParserCtxt", + xmlMemBlocks() - mem_base); + test_ret++; + printf("\n"); + } + function_tests++; +#endif + + return(test_ret); +} + + static int test_htmlNodeStatus(void) { int test_ret = 0; @@ -2723,7 +2750,7 @@ static int test_HTMLparser(void) { int test_ret = 0; - if (quiet == 0) printf("Testing HTMLparser : 31 of 37 functions ...\n"); + if (quiet == 0) printf("Testing HTMLparser : 32 of 38 functions ...\n"); test_ret += test_UTF8ToHtml(); test_ret += test_htmlAttrAllowed(); test_ret += test_htmlAutoCloseTag(); @@ -2742,6 +2769,7 @@ test_HTMLparser(void) { test_ret += test_htmlHandleOmittedElem(); test_ret += test_htmlIsAutoClosed(); test_ret += test_htmlIsScriptAttribute(); + test_ret += test_htmlNewParserCtxt(); test_ret += test_htmlNodeStatus(); test_ret += test_htmlParseCharRef(); test_ret += test_htmlParseChunk(); @@ -24094,6 +24122,38 @@ test_xmlParseURIReference(void) { } +static int +test_xmlPathToURI(void) { + int test_ret = 0; + + int mem_base; + xmlChar * ret_val; + xmlChar * path; /* the resource locator in a filesystem notation */ + int n_path; + + for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) { + mem_base = xmlMemBlocks(); + path = gen_const_xmlChar_ptr(n_path, 0); + + ret_val = xmlPathToURI((const xmlChar *)path); + desret_xmlChar_ptr(ret_val); + call_tests++; + des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlPathToURI", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_path); + printf("\n"); + } + } + function_tests++; + + return(test_ret); +} + + static int test_xmlPrintURI(void) { int test_ret = 0; @@ -24247,7 +24307,7 @@ static int test_uri(void) { int test_ret = 0; - if (quiet == 0) printf("Testing uri : 9 of 14 functions ...\n"); + if (quiet == 0) printf("Testing uri : 10 of 15 functions ...\n"); test_ret += test_xmlBuildRelativeURI(); test_ret += test_xmlBuildURI(); test_ret += test_xmlCanonicPath(); @@ -24256,6 +24316,7 @@ test_uri(void) { test_ret += test_xmlParseURI(); test_ret += test_xmlParseURIRaw(); test_ret += test_xmlParseURIReference(); + test_ret += test_xmlPathToURI(); test_ret += test_xmlPrintURI(); test_ret += test_xmlSaveUri(); test_ret += test_xmlURIEscape(); @@ -26889,6 +26950,54 @@ test_xmlXIncludeProcessFlags(void) { return(test_ret); } + +static int +test_xmlXIncludeProcessFlagsData(void) { + int test_ret = 0; + +#if defined(LIBXML_XINCLUDE_ENABLED) + int mem_base; + int ret_val; + xmlDocPtr doc; /* an XML document */ + int n_doc; + int flags; /* a set of xmlParserOption used for parsing XML includes */ + int n_flags; + void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */ + int n_data; + + for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_flags = 0;n_flags < gen_nb_int;n_flags++) { + for (n_data = 0;n_data < gen_nb_userdata;n_data++) { + mem_base = xmlMemBlocks(); + doc = gen_xmlDocPtr(n_doc, 0); + flags = gen_int(n_flags, 1); + data = gen_userdata(n_data, 2); + + ret_val = xmlXIncludeProcessFlagsData(doc, flags, data); + desret_int(ret_val); + call_tests++; + des_xmlDocPtr(n_doc, doc, 0); + des_int(n_flags, flags, 1); + des_userdata(n_data, data, 2); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlXIncludeProcessFlagsData", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_doc); + printf(" %d", n_flags); + printf(" %d", n_data); + printf("\n"); + } + } + } + } + function_tests++; +#endif + + return(test_ret); +} + #ifdef LIBXML_XINCLUDE_ENABLED #define gen_nb_xmlXIncludeCtxtPtr 1 @@ -27060,10 +27169,11 @@ static int test_xinclude(void) { int test_ret = 0; - if (quiet == 0) printf("Testing xinclude : 6 of 8 functions ...\n"); + if (quiet == 0) printf("Testing xinclude : 7 of 9 functions ...\n"); test_ret += test_xmlXIncludeNewContext(); test_ret += test_xmlXIncludeProcess(); test_ret += test_xmlXIncludeProcessFlags(); + test_ret += test_xmlXIncludeProcessFlagsData(); test_ret += test_xmlXIncludeProcessNode(); test_ret += test_xmlXIncludeProcessTree(); test_ret += test_xmlXIncludeProcessTreeFlags(); @@ -33356,7 +33466,7 @@ test_xmlSaveTree(void) { long ret_val; xmlSaveCtxtPtr ctxt; /* a document saving context */ int n_ctxt; - xmlNodePtr node; /* a document */ + xmlNodePtr node; /* the top node of the subtree to save */ int n_node; for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) { diff --git a/valid.c b/valid.c index f6a018c0..a239e684 100644 --- a/valid.c +++ b/valid.c @@ -5350,7 +5350,7 @@ fail: } #endif /* LIBXML_REGEXP_ENABLED */ if ((warn) && ((ret != 1) && (ret != -3))) { - if ((ctxt != NULL) && (ctxt->warning != NULL)) { + if (ctxt != NULL) { char expr[5000]; char list[5000]; diff --git a/xmlIO.c b/xmlIO.c index fe50a4ea..848911ca 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -209,26 +209,25 @@ static const char *IOerr[] = { static wchar_t * __xmlIOWin32UTF8ToWChar(const char *u8String) { - wchar_t *wString = NULL; + wchar_t *wString = NULL; - if (u8String) - { - int wLen = MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS,u8String,-1,NULL,0); - if (wLen) - { - wString = xmlMalloc(wLen * sizeof(wchar_t)); - if (wString) - { - if (MultiByteToWideChar(CP_UTF8,0,u8String,-1,wString,wLen) == 0) - { - xmlFree(wString); - wString = NULL; - } - } - } - } - - return wString; + if (u8String) { + int wLen = + MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, u8String, + -1, NULL, 0); + if (wLen) { + wString = xmlMalloc(wLen * sizeof(wchar_t)); + if (wString) { + if (MultiByteToWideChar + (CP_UTF8, 0, u8String, -1, wString, wLen) == 0) { + xmlFree(wString); + wString = NULL; + } + } + } + } + + return wString; } #endif @@ -669,8 +668,10 @@ xmlWrapStatNative(const char *path,struct stat *info) #endif } -static int (* xmlWrapStat)(const char *,struct stat *) = xmlWrapStatNative; -static FILE* (* xmlWrapOpen)(const char *,int mode) = xmlWrapOpenNative; +typedef int (* xmlWrapStatFunc) (const char *f, struct stat *s); +static xmlWrapStatFunc xmlWrapStat = xmlWrapStatNative; +typedef FILE* (* xmlWrapOpenFunc)(const char *f,int mode); +static xmlWrapOpenFunc = xmlWrapOpenNative; /** * xmlInitPlatformSpecificIo: @@ -678,8 +679,8 @@ static FILE* (* xmlWrapOpen)(const char *,int mode) = xmlWrapOpenNative; * Initialize platform specific features. */ static void -xmlInitPlatformSpecificIo -(void) { +xmlInitPlatformSpecificIo(void) +{ static int xmlPlatformIoInitialized = 0; OSVERSIONINFO osvi; @@ -2105,8 +2106,7 @@ xmlRegisterOutputCallbacks(xmlOutputMatchCallback matchFunc, * Registers the default compiled-in I/O handlers. */ void -xmlRegisterDefaultInputCallbacks -(void) { +xmlRegisterDefaultInputCallbacks(void) { if (xmlInputCallbackInitialized) return; @@ -2140,8 +2140,7 @@ xmlRegisterDefaultInputCallbacks * Registers the default compiled-in I/O handlers. */ void -xmlRegisterDefaultOutputCallbacks -(void) { +xmlRegisterDefaultOutputCallbacks (void) { if (xmlOutputCallbackInitialized) return;