diff --git a/ChangeLog b/ChangeLog index ecfd98ef..4b2a830f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard + + * libxml.spec.in: keep the ChangeLog compressed + * xmlreader.c: fix a segfault when using Close() + * python/tests/Makefile.am python/tests/reader8.py: test for + the Close() reader API. + Sat Apr 17 22:42:13 HKT 2004 William Brack * xmlschemas.c, xmlwriter.c, doc/examples/parse4.c, diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index d818c917..11d12862 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -729,6 +729,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderRelaxNGValidate
count
ftpListCallback
xmlLsCountNode
+xmlSaveDoc
+xmlSaveTree
xmlTextReaderAttributeCount
xmlXPathCountFunction
counter
xmlAutomataNewCountedTrans
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index d8c29511..619082c1 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -453,6 +453,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeGetBase
xmlParseMarkupDecl
xmlResetLastError
+xmlSaveDoc
+xmlSaveTree
xmlURIEscape
xmlURIUnescapeString
xmlValidateAttributeDecl
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index a1ce7103..10788fdc 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -319,6 +319,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlURIUnescapeString
xmlUTF8Strlen
fully
_htmlElemDesc
+xmlSaveDoc
+xmlSaveTree
func
_xmlXPathContext
funcs
_xmlXPathContext
function:
xmlXPathDifference
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index b82ce9af..61f3b073 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -72,6 +72,8 @@ A:link, A:visited, A:active { text-decoration: underline } HTML_PI_NODE
HTML_PRESERVE_NODE
HTML_TEXT_NODE
+xmlSaveDoc
+xmlSaveTree
xmlTextReaderNextSibling
implicitly
htmlAutoCloseTag
htmlIsAutoClosed
@@ -372,6 +374,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlIsPubidChar
xmlKeepBlanksDefault
xmlRegisterHTTPPostCallbacks
+xmlSaveDoc
+xmlSaveTree
xmlSubstituteEntitiesDefault
xmlXPtrEvalRangePredicate
instruction
HTML_PI_NODE
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index cbce12b2..e92e2957 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -196,7 +196,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathValueFlipSign
optimized
xmlXPathNodeSetAddUnique
option
xmlGetLineNo
-
optional
docbCreatePushParserCtxt
+
optional
XML_SCHEMAS_ATTR_USE_OPTIONAL
+docbCreatePushParserCtxt
htmlCreatePushParserCtxt
xmlCreatePushParserCtxt
xmlCtxtResetPush
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index b335510b..2150d199 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -397,6 +397,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserInputBufferCreateStatic
xmlParserInputBufferPush
xmlRegNewExecCtxt
+
prohibited
XML_SCHEMAS_ATTR_USE_PROHIBITED
projects
xmlXPathIsInf
xmlXPathIsNaN
prolog
xmlParseDocument
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html index 84fe917b..a0400e45 100644 --- a/doc/APIchunk21.html +++ b/doc/APIchunk21.html @@ -422,7 +422,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMallocFunc
xmlReallocFunc
requests
xmlRegisterHTTPPostCallbacks
-
required
htmlRequiredAttrs
+
required
XML_SCHEMAS_ATTR_USE_REQUIRED
+htmlRequiredAttrs
xmlCatalogSetDebug
xmlXPathStringFunction
requires
XML_SCHEMAS_QUALIF_ATTR
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index bac06733..ffde5f4f 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -442,6 +442,7 @@ A:link, A:visited, A:active { text-decoration: underline } IS_LETTER
IS_PUBIDCHAR
special
XML_SKIP_IDS
+XML_XML_ID
XML_XML_NAMESPACE
xmlNewChild
xmlNewDocNode
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index 8dc92c9a..a5c8bdf8 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -82,6 +82,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xml-name
xmlParseNamespace
xml:
XML_XML_NAMESPACE
xml:base
xmlNodeSetBase
+
xml:id
XML_XML_ID
xml:lang
xlinkExtendedLinkFunk
xlinkExtendedLinkSetFunk
xmlNodeGetLang
diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index 6c22f43d..808b2d81 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -47,6 +47,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlRegexpIsDeterminist
xmlTextWriterStartDocument
yet
xmlPatterncompile
+xmlSaveDoc
+xmlSaveTree
you
xmlNewDocNode
xmlNewDocNodeEatName
xmlNewTextChild
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index a3a33f0a..3375d641 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -64,6 +64,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseQuotedString
xmlParserHandleReference
xmlParserInputBufferGrow
+xmlSaveDoc
+xmlSaveTree
xmlScanName
xmlTextWriterWriteRawLen
xmlXPathNextAttribute
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index a3fc71e7..3db6e3e8 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -245,7 +245,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParsePEReference
xmlParserHandlePEReference
xmlParserInputBufferCreateStatic
+xmlSaveDoc
xmlSaveToFilename
+xmlSaveTree
xmlScanName
xmlSetupParserForBuffer
xmlStrncatNew
diff --git a/doc/APIfiles.html b/doc/APIfiles.html index de3c2705..094332b1 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -920,6 +920,9 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ANYATTR_SKIP
XML_SCHEMAS_ANYATTR_STRICT
XML_SCHEMAS_ATTR_NSDEFAULT
+XML_SCHEMAS_ATTR_USE_OPTIONAL
+XML_SCHEMAS_ATTR_USE_PROHIBITED
+XML_SCHEMAS_ATTR_USE_REQUIRED
XML_SCHEMAS_ELEM_ABSTRACT
XML_SCHEMAS_ELEM_DEFAULT
XML_SCHEMAS_ELEM_FIXED
@@ -1076,6 +1079,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_TEXT_NODE
XML_XINCLUDE_END
XML_XINCLUDE_START
+XML_XML_ID
XML_XML_NAMESPACE
_xmlAttr
_xmlAttribute
@@ -1895,6 +1899,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI
+XML_SCHEMAP_INVALID_ATTR_USE
XML_SCHEMAP_INVALID_BOOLEAN
XML_SCHEMAP_INVALID_ENUM
XML_SCHEMAP_INVALID_FACET
@@ -1938,6 +1943,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAP_UNKNOWN_IMPORT_CHILD
XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD
XML_SCHEMAP_UNKNOWN_LIST_CHILD
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE
XML_SCHEMAP_UNKNOWN_NOTATION_CHILD
XML_SCHEMAP_UNKNOWN_PREFIX
XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index b3d570f9..a989c978 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -700,6 +700,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI
+XML_SCHEMAP_INVALID_ATTR_USE
XML_SCHEMAP_INVALID_BOOLEAN
XML_SCHEMAP_INVALID_ENUM
XML_SCHEMAP_INVALID_FACET
@@ -743,6 +744,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAP_UNKNOWN_IMPORT_CHILD
XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD
XML_SCHEMAP_UNKNOWN_LIST_CHILD
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE
XML_SCHEMAP_UNKNOWN_NOTATION_CHILD
XML_SCHEMAP_UNKNOWN_PREFIX
XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD
@@ -758,6 +760,9 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ANYATTR_SKIP
XML_SCHEMAS_ANYATTR_STRICT
XML_SCHEMAS_ATTR_NSDEFAULT
+XML_SCHEMAS_ATTR_USE_OPTIONAL
+XML_SCHEMAS_ATTR_USE_PROHIBITED
+XML_SCHEMAS_ATTR_USE_REQUIRED
XML_SCHEMAS_ELEM_ABSTRACT
XML_SCHEMAS_ELEM_DEFAULT
XML_SCHEMAS_ELEM_FIXED
@@ -898,6 +903,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_XINCLUDE_UNKNOWN_ENCODING
XML_XINCLUDE_XPTR_FAILED
XML_XINCLUDE_XPTR_RESULT
+XML_XML_ID
XML_XML_NAMESPACE
XML_XPATH_ENCODING_ERROR
XML_XPATH_EXPRESSION_OK
diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html index 096373e3..23f26fa0 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 } Module schemasInternals from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module schemasInternals from libxml2

API Menu
API Indexes
Related links

internal interfaces for the XML Schemas handling and schema validity checking

Table of Contents

#define XML_SCHEMAS_ANYATTR_LAX
#define XML_SCHEMAS_ANYATTR_SKIP
#define XML_SCHEMAS_ANYATTR_STRICT
#define XML_SCHEMAS_ATTR_NSDEFAULT
#define XML_SCHEMAS_ELEM_ABSTRACT
#define XML_SCHEMAS_ELEM_DEFAULT
#define XML_SCHEMAS_ELEM_FIXED
#define XML_SCHEMAS_ELEM_GLOBAL
#define XML_SCHEMAS_ELEM_NILLABLE
#define XML_SCHEMAS_ELEM_NSDEFAULT
#define XML_SCHEMAS_ELEM_REF
#define XML_SCHEMAS_ELEM_TOPLEVEL
#define XML_SCHEMAS_FACET_COLLAPSE
#define XML_SCHEMAS_FACET_PRESERVE
#define XML_SCHEMAS_FACET_REPLACE
#define XML_SCHEMAS_FACET_UNKNOWN
#define XML_SCHEMAS_QUALIF_ATTR
#define XML_SCHEMAS_QUALIF_ELEM
#define XML_SCHEMAS_TYPE_MIXED
Structure xmlSchemaAnnot
struct _xmlSchemaAnnot + Module schemasInternals from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module schemasInternals from libxml2

API Menu
API Indexes
Related links

internal interfaces for the XML Schemas handling and schema validity checking

Table of Contents

#define XML_SCHEMAS_ANYATTR_LAX
#define XML_SCHEMAS_ANYATTR_SKIP
#define XML_SCHEMAS_ANYATTR_STRICT
#define XML_SCHEMAS_ATTR_NSDEFAULT
#define XML_SCHEMAS_ATTR_USE_OPTIONAL
#define XML_SCHEMAS_ATTR_USE_PROHIBITED
#define XML_SCHEMAS_ATTR_USE_REQUIRED
#define XML_SCHEMAS_ELEM_ABSTRACT
#define XML_SCHEMAS_ELEM_DEFAULT
#define XML_SCHEMAS_ELEM_FIXED
#define XML_SCHEMAS_ELEM_GLOBAL
#define XML_SCHEMAS_ELEM_NILLABLE
#define XML_SCHEMAS_ELEM_NSDEFAULT
#define XML_SCHEMAS_ELEM_REF
#define XML_SCHEMAS_ELEM_TOPLEVEL
#define XML_SCHEMAS_FACET_COLLAPSE
#define XML_SCHEMAS_FACET_PRESERVE
#define XML_SCHEMAS_FACET_REPLACE
#define XML_SCHEMAS_FACET_UNKNOWN
#define XML_SCHEMAS_QUALIF_ATTR
#define XML_SCHEMAS_QUALIF_ELEM
#define XML_SCHEMAS_TYPE_MIXED
Structure xmlSchemaAnnot
struct _xmlSchemaAnnot
Typedef xmlSchemaAnnot * xmlSchemaAnnotPtr
 
Structure xmlSchemaAttribute
struct _xmlSchemaAttribute
Structure xmlSchemaAttributeGroup
struct _xmlSchemaAttributeGroup @@ -35,6 +35,9 @@ The content of this structure is not made public by the API.

Macro: XML_SCHEMAS_ANYATTR_SKIP

#define XML_SCHEMAS_ANYATTR_SKIP

Skip unknown attribute from validation

Macro: XML_SCHEMAS_ANYATTR_STRICT

#define XML_SCHEMAS_ANYATTR_STRICT

Apply strict validation rules on attributes

Macro: XML_SCHEMAS_ATTR_NSDEFAULT

#define XML_SCHEMAS_ATTR_NSDEFAULT

allow elements in no namespace

+

Macro: XML_SCHEMAS_ATTR_USE_OPTIONAL

#define XML_SCHEMAS_ATTR_USE_OPTIONAL

The attribute is optional.

+

Macro: XML_SCHEMAS_ATTR_USE_PROHIBITED

#define XML_SCHEMAS_ATTR_USE_PROHIBITED

The attribute is prohibited.

+

Macro: XML_SCHEMAS_ATTR_USE_REQUIRED

#define XML_SCHEMAS_ATTR_USE_REQUIRED

The attribute is required.

Macro: XML_SCHEMAS_ELEM_ABSTRACT

#define XML_SCHEMAS_ELEM_ABSTRACT

the element is abstract

Macro: XML_SCHEMAS_ELEM_DEFAULT

#define XML_SCHEMAS_ELEM_DEFAULT

the element has a default value

Macro: XML_SCHEMAS_ELEM_FIXED

#define XML_SCHEMAS_ELEM_FIXED

the element has a fixed value

diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index b9529198..0ab5af71 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } Module tree from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module tree from libxml2

API Menu
API Indexes
Related links

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Table of Contents

#define BASE_BUFFER_SIZE
#define XML_GET_CONTENT
#define XML_GET_LINE
#define XML_LOCAL_NAMESPACE
#define XML_XML_NAMESPACE
#define xmlChildrenNode
#define xmlRootNode
Structure xmlAttr
struct _xmlAttr + Module tree from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module tree from libxml2

API Menu
API Indexes
Related links

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Table of Contents

#define BASE_BUFFER_SIZE
#define XML_GET_CONTENT
#define XML_GET_LINE
#define XML_LOCAL_NAMESPACE
#define XML_XML_ID
#define XML_XML_NAMESPACE
#define xmlChildrenNode
#define xmlRootNode
Structure xmlAttr
struct _xmlAttr
Typedef xmlAttr * xmlAttrPtr
 
Structure xmlAttribute
struct _xmlAttribute
Enum xmlAttributeDefault
@@ -207,6 +207,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 

Macro: XML_GET_CONTENT

#define XML_GET_CONTENT

Macro to extract the content pointer of a node.

Macro: XML_GET_LINE

#define XML_GET_LINE

Macro to extract the line number of an element node.

Macro: XML_LOCAL_NAMESPACE

#define XML_LOCAL_NAMESPACE

A namespace declaration node.

+

Macro: XML_XML_ID

#define XML_XML_ID

This is the name for the special xml:id attribute

Macro: XML_XML_NAMESPACE

#define XML_XML_NAMESPACE

This is the namespace for the special xml: prefix predefined in the XML Namespace specification.

Macro: xmlChildrenNode

#define xmlChildrenNode

Macro for compatibility naming layer with libxml1. Maps to "children."

Macro: xmlRootNode

#define xmlRootNode

Macro for compatibility naming layer with libxml1. Maps to "children".

diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index f0546205..4e95b91f 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -538,6 +538,8 @@ void xmlStructuredErrorFunc (void * userD XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770 : 1769 XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771 : 1770 XML_SCHEMAP_NOT_SCHEMA = 1772 : 1771 + XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773 : 1772 + XML_SCHEMAP_INVALID_ATTR_USE = 1774 : 1723 XML_SCHEMAV_NOROOT = 1800 XML_SCHEMAV_UNDECLAREDELEM = 1801 : 1801 XML_SCHEMAV_NOTTOPLEVEL = 1802 : 1802 diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html index 9af9c195..0e64857b 100644 --- a/doc/html/libxml-xmlsave.html +++ b/doc/html/libxml-xmlsave.html @@ -27,7 +27,7 @@ The content of this structure is not made public by the API. }

Function: xmlSaveClose

int	xmlSaveClose			(xmlSaveCtxtPtr ctxt)

Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.

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

Function: xmlSaveDoc

long	xmlSaveDoc			(xmlSaveCtxtPtr ctxt, 
xmlDocPtr doc)
-

Save a full document to a saving context

+

Save a full document 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
doc:a document
Returns:the number of byte written or -1 in case of error

Function: xmlSaveFlush

int	xmlSaveFlush			(xmlSaveCtxtPtr ctxt)

Flush a document saving context, i.e. make sure that all bytes have been output.

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

Function: xmlSaveToBuffer

xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
const char * encoding,
int options)
@@ -39,5 +39,5 @@ The content of this structure is not made public by the API.
filename:a file name or an URL
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: xmlSaveToIO

xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
const char * encoding,
int options)

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

+

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

diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 82298a1a..15f7cc09 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -1020,25 +1020,28 @@ internal interfaces for XML Schemas internal interfaces for the XML Schemas handling and schema validity checking Daniel Veillard - - - - + - - - - - - - - + + + + + + + + + + + + + + @@ -1138,9 +1141,10 @@ - - + + + @@ -1657,6 +1661,7 @@ the API used to report errors Daniel Veillard + @@ -1700,7 +1705,7 @@ - + @@ -1741,7 +1746,7 @@ - + @@ -2052,6 +2057,7 @@ + @@ -3403,6 +3409,15 @@ allow elements in no namespace + + The attribute is optional. + + + The attribute is prohibited. + + + The attribute is required. + the element is abstract @@ -3463,6 +3478,9 @@ Whether general entities need to be substituted. + + This is the name for the special xml:id attribute + This is the namespace for the special xml: prefix predefined in the XML Namespace specification. @@ -4248,6 +4266,7 @@ + @@ -4291,6 +4310,7 @@ + @@ -10935,7 +10955,7 @@ actually an xmlCharEncoding'/> - Save a full document to a saving context + Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead @@ -11019,7 +11039,7 @@ actually an xmlCharEncoding'/> - Save a subtree starting at the node parameter to a saving context + 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 diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml index d8804329..abc87262 100644 --- a/doc/libxml2-refs.xml +++ b/doc/libxml2-refs.xml @@ -694,6 +694,7 @@ + @@ -737,6 +738,7 @@ + @@ -752,6 +754,9 @@ + + + @@ -892,6 +897,7 @@ + @@ -3573,6 +3579,7 @@ + @@ -3616,6 +3623,7 @@ + @@ -3631,6 +3639,9 @@ + + + @@ -3771,6 +3782,7 @@ + @@ -9830,6 +9842,9 @@ + + + @@ -9990,6 +10005,7 @@ + @@ -10823,6 +10839,7 @@ + @@ -10866,6 +10883,7 @@ + @@ -15220,6 +15238,8 @@ + + @@ -16830,7 +16850,9 @@ + + @@ -17849,6 +17871,8 @@ + + @@ -18518,6 +18542,8 @@ + + @@ -19580,6 +19606,8 @@ + + @@ -20142,6 +20170,8 @@ + + @@ -20560,6 +20590,8 @@ + + @@ -22183,6 +22215,7 @@ + @@ -22902,6 +22935,9 @@ + + + @@ -23626,6 +23662,7 @@ + @@ -24433,6 +24470,7 @@ + @@ -26229,6 +26267,9 @@ + + + @@ -27035,6 +27076,8 @@ + + diff --git a/libxml.spec.in b/libxml.spec.in index c2a251e1..f96575cc 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -63,6 +63,7 @@ at parse time or later once the document has been modified. %configure make (cd doc/examples ; make clean) +gzip -9 ChangeLog %install rm -fr %{buildroot} @@ -81,7 +82,7 @@ rm -fr %{buildroot} %files %defattr(-, root, root) -%doc AUTHORS ChangeLog NEWS README Copyright TODO +%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO %doc %{_mandir}/man1/xmllint.1* %doc %{_mandir}/man1/xmlcatalog.1* %doc %{_mandir}/man3/libxml.3* @@ -94,7 +95,7 @@ rm -fr %{buildroot} %defattr(-, root, root) %doc %{_mandir}/man1/xml2-config.1* -%doc AUTHORS ChangeLog NEWS README Copyright TODO +%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO %doc doc/*.html doc/html doc/*.gif doc/*.png %doc doc/tutorial doc/libxml2-api.xml %doc doc/examples @@ -109,7 +110,7 @@ rm -fr %{buildroot} %files python %defattr(-, root, root) -%doc AUTHORS ChangeLog NEWS README Copyright +%doc AUTHORS ChangeLog.gz NEWS README Copyright %{_libdir}/python*/site-packages/libxml2.py %{_libdir}/python*/site-packages/drv_libxml2.py %{_libdir}/python*/site-packages/libxml2mod* diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index a07497e1..584ddbcd 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -27,6 +27,7 @@ PYTESTS= \ reader5.py \ reader6.py \ reader7.py \ + reader8.py \ walker.py \ ctxterror.py\ readererr.py\ diff --git a/python/tests/reader8.py b/python/tests/reader8.py new file mode 100755 index 00000000..53b7f275 --- /dev/null +++ b/python/tests/reader8.py @@ -0,0 +1,37 @@ +#!/usr/bin/python -u +# +# this tests the entities substitutions with the XmlTextReader interface +# +import sys +import StringIO +import libxml2 + +# Memory debug specific +libxml2.debugMemory(1) + +# +# Parse a document testing the Close() API +# +docstr=""" + +100 +""" + +reader = libxml2.readerForDoc(docstr, "test1", None, 0) +ret = reader.Read() +ret = reader.Read() +ret = reader.Close() + +if ret != 0: + print "Error closing the document test1" + sys.exit(1) + +del reader + +# Memory debug specific +libxml2.cleanupParser() +if libxml2.debugMemory(1) == 0: + print "OK" +else: + print "Memory leak %d bytes" % (libxml2.debugMemory(1)) + libxml2.dumpMemory() diff --git a/xmlreader.c b/xmlreader.c index e1c2ef8a..41083adb 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -2053,19 +2053,12 @@ xmlTextReaderClose(xmlTextReaderPtr reader) { reader->curnode = NULL; reader->mode = XML_TEXTREADER_MODE_CLOSED; if (reader->ctxt != NULL) { + xmlStopParser(reader->ctxt); if (reader->ctxt->myDoc != NULL) { if (reader->preserve == 0) xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc); reader->ctxt->myDoc = NULL; } - if (reader->allocs & XML_TEXTREADER_CTXT) { - xmlFreeParserCtxt(reader->ctxt); - reader->allocs -= XML_TEXTREADER_CTXT; - } - } - if (reader->sax != NULL) { - xmlFree(reader->sax); - reader->sax = NULL; } if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT)) { xmlFreeParserInputBuffer(reader->input); @@ -2204,6 +2197,10 @@ xmlTextReaderGetAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName, * parser, set its state to End Of File and return the input stream with * what is left that the parser did not use. * + * The implementation is not good, the parser certainly procgressed past + * what's left in reader->input, and there is an allocation problem. Best + * would be to rewrite it differently. + * * Returns the xmlParserInputBufferPtr attached to the XML or NULL * in case of error. */ @@ -2220,22 +2217,16 @@ xmlTextReaderGetRemainder(xmlTextReaderPtr reader) { reader->curnode = NULL; reader->mode = XML_TEXTREADER_MODE_EOF; if (reader->ctxt != NULL) { + xmlStopParser(reader->ctxt); if (reader->ctxt->myDoc != NULL) { if (reader->preserve == 0) xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc); reader->ctxt->myDoc = NULL; } - if (reader->allocs & XML_TEXTREADER_CTXT) { - xmlFreeParserCtxt(reader->ctxt); - reader->allocs -= XML_TEXTREADER_CTXT; - } - } - if (reader->sax != NULL) { - xmlFree(reader->sax); - reader->sax = NULL; } if (reader->allocs & XML_TEXTREADER_INPUT) { ret = reader->input; + reader->input = NULL; reader->allocs -= XML_TEXTREADER_INPUT; } else { /*