diff --git a/ChangeLog b/ChangeLog index d6f52e7d..ad8b7095 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Aug 27 13:41:26 CEST 2008 Daniel Veillard + + * threads.c: fix a small initialization problem raised by Ashwin + * testapi.c gentest.py: increase testing especially for document + with an internal subset, and entities + * tree.c: fix a deallocation issue when unlinking entities from + a document. + * valid.c: fix a missing entry point test not found previously. + * doc/*: regenerated the APIs, docs etc. + Tue Aug 26 15:02:58 CEST 2008 Daniel Veillard * include/libxml/parser.h parser.c xmllint.c: strengthen some diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html index 460e822f..94fd2fa5 100644 --- a/doc/APIchunk10.html +++ b/doc/APIchunk10.html @@ -41,7 +41,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlURIEscapeStr
a-zA-Z
IS_ASCII_LETTER
a-zA-Z0-9
IS_PUBIDCHAR
-
a-zA-Z0-9_
xmlParseVersionNum
a@b
xmlNanoFTPProxy
abc
xmlXPathTranslateFunction
abc-
xmlXPathTranslateFunction
@@ -62,8 +61,6 @@ A:link, A:visited, A:active { text-decoration: underline } XML_SCHEMAS_ELEM_FINAL_ABSENT
XML_SCHEMAS_TYPE_VARIETY_ABSENT
absoluteURI
xmlParseURI
-xmlParseURIRaw
-xmlParseURIReference
abstract
XML_SCHEMAS_ELEM_ABSTRACT
XML_SCHEMAS_TYPE_ABSTRACT
accept
xmlExpMaxToken
@@ -316,6 +313,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlKeepBlanksDefault
xmlNewDocNode
xmlNewDocNodeEatName
+xmlParseVersionNum
xmlSchemaValidCtxtGetParserCtxt
xmlSearchNs
xmlShell
@@ -374,7 +372,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReplaceNode
xmlXPathNodeSetAddUnique
xmlXPtrLocationSetAdd
-
also
xmlCharEncodingOutputFunc
+
also
_xmlEntity
+xmlCharEncodingOutputFunc
xmlCheckHTTPInput
xmlCleanupParser
xmlHasProp
@@ -400,6 +399,7 @@ A:link, A:visited, A:active { text-decoration: underline }
amd
xmlCatalogIsEmpty
amount
INPUT_CHUNK
_xmlParserInputBuffer
+xmlMemDisplayLast
xmlMemUsed
xmlParserInputBufferGrow
xmlParserInputBufferRead
@@ -439,6 +439,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNamespaceParseNCName
xmlNamespaceParseNSDef
xmlNamespaceParseQName
+xmlNewEntity
anyway
xmlRecoverDoc
xmlRecoverFile
xmlRecoverMemory
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html index 1c61e5b2..7062e5e8 100644 --- a/doc/APIchunk11.html +++ b/doc/APIchunk11.html @@ -56,6 +56,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewEntityInputStream
xmlNewInputFromFile
xmlNewStringInputStream
+xmlParseURI
+xmlParseURIReference
xmlRelaxNGNewValidCtxt
xmlSchemaNewStringValue
xmlSchemaNewValidCtxt
@@ -146,6 +148,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAutomataNewOnceTrans
xmlAutomataNewOnceTrans2
xmlCatalogSetDefaultPrefer
+xmlMemDisplayLast
xmlParseQuotedString
xmlXPathDifference
beyond
xmlXPathStringFunction
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html index ddcfe386..ff1be472 100644 --- a/doc/APIchunk12.html +++ b/doc/APIchunk12.html @@ -791,7 +791,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
xmlValidateDtd
-
count
ftpListCallback
+
count
_xmlEntity
+ftpListCallback
xmlExpRef
xmlLsCountNode
xmlSaveDoc
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html index 6adf2063..b71e8f1a 100644 --- a/doc/APIchunk13.html +++ b/doc/APIchunk13.html @@ -178,6 +178,7 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlXPathContext
xmlGetNsList
xmlHandleEntity
+xmlNewEntity
xmlNewNs
xmlNodeGetBase
xmlParseBalancedChunkMemory
@@ -302,6 +303,7 @@ A:link, A:visited, A:active { text-decoration: underline } htmlReadFd
xmlCtxtReadFd
xmlMemDisplay
+xmlMemDisplayLast
xmlMemShow
xmlOutputBufferCreateFd
xmlParserInputBufferCreateFd
@@ -410,6 +412,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStrQEqual
differentiate
xmlXPathOrderDocElems
differently
xmlTextReaderGetRemainder
+
differs
xmlNewEntity
digit
xmlXPathStringFunction
digits
xmlXPathStringFunction
dir
xmlShellDir
@@ -590,9 +593,11 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDumpNotationDecl
xmlDumpNotationTable
xmlLsOneNode
+xmlMemDisplayLast
xmlMemShow
xmlSnprintfElementContent
xmlXPathDebugDumpObject
+
dumping
xmlMemDisplayLast
dumps
xmlShellBase
xmlShellCat
xmlShellDir
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html index f02b8e79..0973657b 100644 --- a/doc/APIchunk14.html +++ b/doc/APIchunk14.html @@ -186,6 +186,7 @@ A:link, A:visited, A:active { text-decoration: underline }
ensuring
xmlDOMWrapRemoveNode
entire
xmlCleanupInputCallbacks
xmlCleanupOutputCallbacks
+
entites
_xmlEntity
entities:
xmlParseEntityRef
xmlParserHandleReference
entproc
xmlParserHandlePEReference
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html index a3b138a3..d8ac4164 100644 --- a/doc/APIchunk15.html +++ b/doc/APIchunk15.html @@ -325,8 +325,6 @@ A:link, A:visited, A:active { text-decoration: underline }
fragment
_xmlURI
xmlNewDocFragment
xmlParseURI
-xmlParseURIRaw
-xmlParseURIReference
xmlPushInput
fragments
xmlParseURIRaw
freeing
xmlCanonicPath
diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html index fff07ece..78b44803 100644 --- a/doc/APIchunk18.html +++ b/doc/APIchunk18.html @@ -125,6 +125,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHashUpdateEntry2
xmlHashUpdateEntry3
xmlKeepBlanksDefault
+xmlNewEntity
xmlParseAttValue
latest
xmlNanoHTTPReturnCode
layer
xmlChildrenNode
@@ -154,6 +155,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathStringFunction
left
xmlExpNewOr
xmlExpNewSeq
+xmlMemDisplayLast
xmlTextReaderGetRemainder
legacy
htmlNodeStatus
len
xmlBufferAdd
@@ -196,6 +198,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDebugDumpOneNode
xmlNodeDump
xmlNodeDumpOutput
+xmlParseVersionNum
xmlShellPwd
xmlStreamPop
xmlXPathDebugDumpCompExpr
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html index 53ea1297..30e12a56 100644 --- a/doc/APIchunk19.html +++ b/doc/APIchunk19.html @@ -73,7 +73,6 @@ A:link, A:visited, A:active { text-decoration: underline }
manage
xmlBufferWriteChar
xmlBufferWriteQuotedString
manages
xmlBufferWriteCHAR
-
mandatory
xmlParseTextDecl
manipulated
xmlNewRMutex
manipulating
xmlExpNewCtxt
xmlLoadSGMLSuperCatalog
@@ -186,6 +185,7 @@ A:link, A:visited, A:active { text-decoration: underline }
memo
getSystemId
xmlSAX2GetSystemId
memorylist
xmlMemDisplay
+xmlMemDisplayLast
xmlMemoryDump
merged
xmlTextMerge
merging
xmlAddChild
diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html index 214bf629..19238899 100644 --- a/doc/APIchunk2.html +++ b/doc/APIchunk2.html @@ -227,13 +227,11 @@ A:link, A:visited, A:active { text-decoration: underline }

Letter E:

ELEMENT
_xmlElementContent
EMPTY
xmlParseElementContentDecl
ENTITIES
xmlParseAttributeType
-xmlValidateAttributeValue
xmlValidateDtdFinal
ENTITY
htmlParseEntityRef
xmlParseAttributeType
xmlParseEntityRef
xmlParseEntityValue
-xmlValidateAttributeValue
xmlValidateDtdFinal
ENTITY_REF
xmlNodeBufGetContent
xmlNodeGetContent
@@ -322,7 +320,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParsePEReference
xmlParserHandlePEReference
xmlParserHandleReference
-xmlValidateAttributeValue
xmlValidateOneAttribute
xmlValidateOneNamespace
EntityDecl
xmlParseEntityDecl
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html index 08e43ca3..3bd18948 100644 --- a/doc/APIchunk20.html +++ b/doc/APIchunk20.html @@ -73,6 +73,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlReconciliateNs
naming
xmlChildrenNode
xmlRootNode
+
nbBytes
xmlMemDisplayLast
nbval
xmlRegExecErrInfo
xmlRegExecNextValues
ncname
xmlBuildQName
@@ -120,6 +121,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDOMWrapReconcileNamespaces
xmlGetBufferAllocationScheme
xmlLoadSGMLSuperCatalog
+xmlNewEntity
xmlNewNodeEatName
xmlParseElementChildrenContentDecl
xmlParseElementMixedContentDecl
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html index 584a8bde..c84804cc 100644 --- a/doc/APIchunk22.html +++ b/doc/APIchunk22.html @@ -170,7 +170,8 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGcMemGet
xmlMemGet
xmlReplaceNode
-
places
xmlStrPrintf
+
places
xmlMemDisplayLast
+xmlStrPrintf
xmlStrVPrintf
plug
xmlXPathFuncLookupFunc
xmlXPathVariableLookupFunc
@@ -229,6 +230,7 @@ A:link, A:visited, A:active { text-decoration: underline }
potential
xmlDebugCheckDocument
xmlValidGetPotentialChildren
potentially
_xmlURI
+
practice
xmlParseVersionNum
pre-interned
_xmlParserCtxt
preallocated
xmlBuildQName
precede
xmlParseEntityRef
@@ -427,6 +429,32 @@ A:link, A:visited, A:active { text-decoration: underline }
produced
xmlCharEncodingOutputFunc
xmlCurrentChar
producing
xmlCheckUTF8
+
production
IS_BASECHAR
+IS_BLANK
+IS_BYTE_CHAR
+IS_CHAR
+IS_COMBINING
+IS_DIGIT
+IS_EXTENDER
+IS_IDEOGRAPHIC
+IS_LETTER
+IS_PUBIDCHAR
+xmlIsLetter
+xmlParseAttributeType
+xmlParseBalancedChunkMemory
+xmlParseBalancedChunkMemoryRecover
+xmlParseCharRef
+xmlParseCtxtExternalEntity
+xmlParseExtParsedEnt
+xmlParseExternalEntity
+xmlParseExternalID
+xmlParseInNodeContext
+xmlValidateNameValue
+xmlValidateNamesValue
+xmlValidateNmtokenValue
+xmlValidateNmtokensValue
+xmlXPathIdFunction
+xmlXPathNormalizeFunction
production:
xmlCheckLanguageID
productions
xmlCheckLanguageID
program
xmlXPtrNewContext
@@ -453,7 +481,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlXPathIsNaN
prolog
xmlParseDocument
prompt
xmlShellReadlineFunc
-
proper
xmlValidateAttributeValue
properly
xmlParseElementChildrenContentDecl
xmlParseMarkupDecl
xmlReconciliateNs
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html index 9bee735c..b7b26c21 100644 --- a/doc/APIchunk23.html +++ b/doc/APIchunk23.html @@ -239,32 +239,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewCharRef
referenced
xmlLinkGetData
xmlParseAttValue
-
references
XML_SCHEMAS_ATTRGROUP_HAS_REFS
-XML_SCHEMAS_ATTR_INTERNAL_RESOLVED
-XML_SCHEMAS_ELEM_CIRCULAR
-XML_SCHEMAS_ELEM_INTERNAL_RESOLVED
-htmlParseEntityRef
-xmlGetRefs
-xmlLoadSGMLSuperCatalog
-xmlNewChild
-xmlNewDocNode
-xmlNewDocNodeEatName
-xmlNodeAddContent
-xmlNodeAddContentLen
-xmlNodeBufGetContent
-xmlNodeGetContent
-xmlNodeSetContent
-xmlNodeSetContentLen
-xmlParseAttribute
-xmlParseCharRef
-xmlParseEntityRef
-xmlParseMarkupDecl
-xmlParsePEReference
-xmlParseReference
-xmlParseSDDecl
-xmlParserHandlePEReference
-xmlScanName
-xmlSubstituteEntitiesDefault
referencing
xmlGetDocEntity
xmlGetDtdEntity
xmlGetParameterEntity
@@ -334,9 +308,9 @@ A:link, A:visited, A:active { text-decoration: underline } xmlTextReaderMoveToAttributeNo
xmlUTF8Strloc
xmlUTF8Strsub
-
relativeURI
xmlParseURI
-xmlParseURIRaw
+
relative-ref
xmlParseURIRaw
xmlParseURIReference
+
relativeURI
xmlParseURI
release
xmlClearNodeInfoSeq
xmlClearParserCtxt
xmlDecodeEntities
@@ -528,6 +502,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNodeSetContentLen
respect
xmlExpStringDerive
respecting
xmlValidGetValidElements
+
responsability
xmlNewEntity
response
xmlNanoFTPCheckResponse
xmlNanoFTPGetResponse
xmlNanoHTTPContentLength
@@ -643,6 +618,7 @@ A:link, A:visited, A:active { text-decoration: underline }
running
xmlKeepBlanksDefault
runtime
LIBXML_DEBUG_RUNTIME
XML_MAX_NAMELEN
+xmlMemDisplayLast

A-B C-C D-E diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html index e808b6b6..2dce6a0c 100644 --- a/doc/APIchunk25.html +++ b/doc/APIchunk25.html @@ -401,6 +401,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlHasProp
xmlLineNumbersDefault
two
_xmlParserCtxt
+xmlMemDisplayLast
xmlStrncatNew
xmlTextMerge
xmlUTF8Charcmp
@@ -422,7 +423,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaNewStringValue
xmlSchemaValidateFacetWhtsp
xmlStreamWantsAnyNode
-
typo
xmlParseTextDecl

A-B C-C D-E diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html index beaf7e3c..4fca7665 100644 --- a/doc/APIchunk26.html +++ b/doc/APIchunk26.html @@ -107,6 +107,7 @@ A:link, A:visited, A:active { text-decoration: underline }
unlinked
xmlAddNextSibling
xmlAddPrevSibling
xmlAddSibling
+xmlNewEntity
xmlReplaceNode
unload
xmlModuleClose
xmlModuleFree
@@ -192,6 +193,7 @@ A:link, A:visited, A:active { text-decoration: underline } _xmlSchemaElement
useful
xmlGcMemGet
xmlGcMemSetup
+xmlMemDisplayLast
xmlNewRMutex
xmlParserInputBufferCreateStatic
useless
setDocumentLocator
diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html index 1888ead9..5fbd28f9 100644 --- a/doc/APIchunk28.html +++ b/doc/APIchunk28.html @@ -98,6 +98,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xml:space
_xmlParserCtxt
xmlNodeGetSpacePreserve
xmlNodeSetSpacePreserve
+
xmlAddDocEntity
xmlNewEntity
xmlAttr
attribute
attributeSAXFunc
xmlAttrPtr
xmlCopyProp
@@ -141,6 +142,7 @@ A:link, A:visited, A:active { text-decoration: underline }
xmlDoc
_xmlNs
xmlDocCopyNodeList
xmlCopyNodeList
xmlDocNewPI
xmlNewPI
+
xmlDocProperties
_xmlDoc
xmlDocPtr
xmlCopyDoc
xmlNewTextWriterDoc
xmlNewTextWriterTree
diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html index e8d2266f..3f5646a3 100644 --- a/doc/APIchunk3.html +++ b/doc/APIchunk3.html @@ -192,14 +192,12 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParserInputBufferRead
IDREF
xmlParseAttributeType
xmlValidateAttributeDecl
-xmlValidateAttributeValue
xmlValidateDocumentFinal
xmlValidateDtd
xmlValidateOneAttribute
xmlValidateOneElement
xmlValidateOneNamespace
IDREFS
xmlParseAttributeType
-xmlValidateAttributeValue
xmlValidateDocumentFinal
IDREFs
_xmlDoc
IDs
xmlXPathIdFunction
diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html index b954f386..924c236c 100644 --- a/doc/APIchunk4.html +++ b/doc/APIchunk4.html @@ -182,9 +182,7 @@ A:link, A:visited, A:active { text-decoration: underline }
NDataDecl
xmlParseEntityDecl
NDataDecl?
xmlParseEntityDecl
NMTOKEN
xmlParseAttributeType
-xmlValidateAttributeValue
NMTOKENS
xmlParseAttributeType
-xmlValidateAttributeValue
NMToken
xmlValidateNMToken
NOTATION
xmlParseEnumeratedType
xmlParseNotationType
@@ -234,7 +232,6 @@ A:link, A:visited, A:active { text-decoration: underline }
Names
xmlParseAttributeType
xmlParseName
xmlScanName
-xmlValidateAttributeValue
xmlValidateNamesValue
Namespace
XML_XML_NAMESPACE
_xmlElementContent
@@ -251,11 +248,9 @@ A:link, A:visited, A:active { text-decoration: underline }
Nmtoken
xmlParseAttributeType
xmlParseEnumerationType
xmlParseNmtoken
-xmlValidateAttributeValue
xmlValidateNmtokenValue
Nmtokens
xmlParseAttributeType
xmlParseNmtoken
-xmlValidateAttributeValue
xmlValidateNmtokensValue
Node
_xmlParserCtxt
_xmlValidCtxt
diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html index c9364499..f5980933 100644 --- a/doc/APIchunk6.html +++ b/doc/APIchunk6.html @@ -61,7 +61,6 @@ A:link, A:visited, A:active { text-decoration: underline }
Query
xmlDictSize
xmlHashSize
xmlStreamWantsAnyNode
-
Question:
xmlParseTextDecl

Letter R:

REC
IS_BASECHAR
IS_COMBINING
IS_DIGIT
@@ -75,6 +74,8 @@ A:link, A:visited, A:active { text-decoration: underline }
RFC
xmlBuildURI
xmlNodeGetBase
xmlNormalizeURIPath
+xmlParseURI
+xmlParseURIReference
RFC2396
xmlURIEscape
Raises
xmlXPathSetArityError
xmlXPathSetError
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html index 4df9492d..f9550fc0 100644 --- a/doc/APIchunk7.html +++ b/doc/APIchunk7.html @@ -167,7 +167,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlLinkGetData
xmlParseNotationDecl
xmlTextReaderByteConsumed
-
Seems
xmlParseTextDecl
Semi
xmlRelaxParserSetFlag
Send
xmlNanoFTPQuit
Serialize
xmlAttrSerializeTxtContent
diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html index 2d733000..10e852af 100644 --- a/doc/APIchunk8.html +++ b/doc/APIchunk8.html @@ -119,7 +119,6 @@ A:link, A:visited, A:active { text-decoration: underline }
Thus:
xmlXPathSubstringFunction
Tibetan
xmlUCSIsTibetan
Token
xmlParseAttributeType
-xmlValidateAttributeValue
xmlValidateNmtokenValue
xmlValidateNmtokensValue
xmlValidateOneAttribute
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html index 475d52f4..fb32180c 100644 --- a/doc/APIchunk9.html +++ b/doc/APIchunk9.html @@ -46,7 +46,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSchemaValidateStream
xmlSchematronValidateDoc
xmlShellValidate
-xmlValidateAttributeValue
xmlValidateNameValue
xmlValidateNamesValue
xmlValidateNmtokenValue
@@ -63,7 +62,6 @@ A:link, A:visited, A:active { text-decoration: underline } xmlParseDefaultDecl
xmlParseEnumerationType
xmlParseNotationType
-xmlValidateAttributeValue
Variable
xmlXPathVariableLookup
xmlXPathVariableLookupNS
VariationSelectors
xmlUCSIsVariationSelectors
@@ -197,6 +195,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlStringLenDecodeEntities
XML_xxx_yyy_ENTITY
xmlAddDocEntity
xmlAddDtdEntity
+xmlNewEntity
XMl-Schema
xmlSchemaGetParserErrors
XPATH
xmlXPathFreeCompExpr
XPATH_INVALID_ARITY
xmlXPathSetArityError
diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html index 2f8eead2..300fc038 100644 --- a/doc/APIconstructors.html +++ b/doc/APIconstructors.html @@ -318,6 +318,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGetDtdEntity
xmlGetParameterEntity
xmlGetPredefinedEntity
+xmlNewEntity
xmlParseEntityRef
xmlSAX2GetEntity
xmlSAX2GetParameterEntity
diff --git a/doc/APIfiles.html b/doc/APIfiles.html index bf36bed2..3bbc1646 100644 --- a/doc/APIfiles.html +++ b/doc/APIfiles.html @@ -405,6 +405,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlGetParameterEntity
xmlGetPredefinedEntity
xmlInitializePredefinedEntities
+xmlNewEntity

Module globals:

_xmlGlobalState
docbDefaultSAXHandler
htmlDefaultSAXHandler
@@ -601,6 +602,8 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSE_DTDATTR
XML_PARSE_DTDLOAD
XML_PARSE_DTDVALID
+XML_PARSE_HUGE
+XML_PARSE_NOBASEFIX
XML_PARSE_NOBLANKS
XML_PARSE_NOCDATA
XML_PARSE_NODICT
@@ -610,6 +613,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSE_NOWARNING
XML_PARSE_NOXINCNODE
XML_PARSE_NSCLEAN
+XML_PARSE_OLD10
XML_PARSE_PEDANTIC
XML_PARSE_PUSH_DOM
XML_PARSE_PUSH_SAX
@@ -1289,6 +1293,14 @@ A:link, A:visited, A:active { text-decoration: underline } XML_DOCUMENT_FRAG_NODE
XML_DOCUMENT_NODE
XML_DOCUMENT_TYPE_NODE
+XML_DOC_DTDVALID
+XML_DOC_HTML
+XML_DOC_INTERNAL
+XML_DOC_NSVALID
+XML_DOC_OLD10
+XML_DOC_USERBUILT
+XML_DOC_WELLFORMED
+XML_DOC_XINCLUDE
XML_DTD_NODE
XML_ELEMENT_CONTENT_ELEMENT
XML_ELEMENT_CONTENT_MULT
@@ -1398,6 +1410,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDocDumpMemoryEnc
xmlDocFormatDump
xmlDocGetRootElement
+xmlDocProperties
xmlDocPtr
xmlDocSetRootElement
xmlDtd
@@ -1963,11 +1976,13 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_TAG_NOT_FINISHED
XML_ERR_UNDECLARED_ENTITY
XML_ERR_UNKNOWN_ENCODING
+XML_ERR_UNKNOWN_VERSION
XML_ERR_UNPARSED_ENTITY
XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
XML_ERR_VALUE_REQUIRED
+XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
XML_ERR_WARNING
XML_ERR_XMLDECL_NOT_FINISHED
@@ -2075,6 +2090,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_MODULE_CLOSE
XML_MODULE_OPEN
XML_NS_ERR_ATTRIBUTE_REDEFINED
+XML_NS_ERR_COLON
XML_NS_ERR_EMPTY
XML_NS_ERR_QNAME
XML_NS_ERR_UNDEFINED_NAMESPACE
@@ -2581,6 +2597,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMallocLoc
xmlMemBlocks
xmlMemDisplay
+xmlMemDisplayLast
xmlMemFree
xmlMemGet
xmlMemMalloc
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html index 4f460092..3cf9ced2 100644 --- a/doc/APIfunctions.html +++ b/doc/APIfunctions.html @@ -59,6 +59,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlElemDump
xmlLsOneNode
xmlMemDisplay
+xmlMemDisplayLast
xmlMemShow
xmlOutputBufferCreateFile
xmlParserInputBufferCreateFile
@@ -276,6 +277,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewDocTextLen
xmlNewDtd
xmlNewElementContent
+xmlNewEntity
xmlNewGlobalNs
xmlNewNode
xmlNewNs
@@ -577,6 +579,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlSplitQName3
xmlStringCurrentChar
xmlValidGetPotentialChildren
+

Type long:

xmlMemDisplayLast

Type size_t:

xmlBufferCreateSize
xmlBufferCreateStatic
xmlMallocAtomicLoc
@@ -1161,6 +1164,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewDocText
xmlNewDocTextLen
xmlNewDtd
+xmlNewEntity
xmlNewGlobalNs
xmlNewReference
xmlNewTextWriterTree
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html index 35e5d102..7963ef13 100644 --- a/doc/APIsymbols.html +++ b/doc/APIsymbols.html @@ -242,6 +242,14 @@ A:link, A:visited, A:active { text-decoration: underline } XML_DOCUMENT_FRAG_NODE
XML_DOCUMENT_NODE
XML_DOCUMENT_TYPE_NODE
+XML_DOC_DTDVALID
+XML_DOC_HTML
+XML_DOC_INTERNAL
+XML_DOC_NSVALID
+XML_DOC_OLD10
+XML_DOC_USERBUILT
+XML_DOC_WELLFORMED
+XML_DOC_XINCLUDE
XML_DTD_ATTRIBUTE_DEFAULT
XML_DTD_ATTRIBUTE_REDEFINED
XML_DTD_ATTRIBUTE_VALUE
@@ -396,11 +404,13 @@ A:link, A:visited, A:active { text-decoration: underline } XML_ERR_TAG_NOT_FINISHED
XML_ERR_UNDECLARED_ENTITY
XML_ERR_UNKNOWN_ENCODING
+XML_ERR_UNKNOWN_VERSION
XML_ERR_UNPARSED_ENTITY
XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
XML_ERR_VALUE_REQUIRED
+XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
XML_ERR_WARNING
XML_ERR_XMLDECL_NOT_FINISHED
@@ -529,6 +539,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_NAMESPACE_DECL
XML_NOTATION_NODE
XML_NS_ERR_ATTRIBUTE_REDEFINED
+XML_NS_ERR_COLON
XML_NS_ERR_EMPTY
XML_NS_ERR_QNAME
XML_NS_ERR_UNDEFINED_NAMESPACE
@@ -564,6 +575,8 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSE_DTDATTR
XML_PARSE_DTDLOAD
XML_PARSE_DTDVALID
+XML_PARSE_HUGE
+XML_PARSE_NOBASEFIX
XML_PARSE_NOBLANKS
XML_PARSE_NOCDATA
XML_PARSE_NODICT
@@ -573,6 +586,7 @@ A:link, A:visited, A:active { text-decoration: underline } XML_PARSE_NOWARNING
XML_PARSE_NOXINCNODE
XML_PARSE_NSCLEAN
+XML_PARSE_OLD10
XML_PARSE_PEDANTIC
XML_PARSE_PUSH_DOM
XML_PARSE_PUSH_SAX
@@ -1908,6 +1922,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlDocDumpMemoryEnc
xmlDocFormatDump
xmlDocGetRootElement
+xmlDocProperties
xmlDocPtr
xmlDocSetRootElement
xmlDtd
@@ -2206,6 +2221,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlMallocLoc
xmlMemBlocks
xmlMemDisplay
+xmlMemDisplayLast
xmlMemFree
xmlMemGet
xmlMemMalloc
@@ -2290,6 +2306,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlNewDocTextLen
xmlNewDtd
xmlNewElementContent
+xmlNewEntity
xmlNewEntityInputStream
xmlNewGlobalNs
xmlNewIOInputStream
diff --git a/doc/devhelp/libxml2-entities.html b/doc/devhelp/libxml2-entities.html index cd1e9a8c..0d0effb6 100644 --- a/doc/devhelp/libxml2-entities.html +++ b/doc/devhelp/libxml2-entities.html @@ -47,6 +47,7 @@ typedef struct _xmlHashTable xmlEntitiesTable; typedef xmlEntitiesTable * xmlEntitiesTablePtr; xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); +xmlEntityPtr xmlNewEntity (xmlDocPtr doc,
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content); xmlChar * xmlEncodeEntitiesReentrant (xmlDocPtr doc,
const xmlChar * input); xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc,
const xmlChar * name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar * name); @@ -155,6 +156,10 @@ The content of this structure is not made public by the API.

Set up the predefined entities. Deprecated call


+

xmlNewEntity ()

xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)
+

Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.

+
doc:the document
name:the entity name
type:the entity type XML_xxx_yyy_ENTITY
ExternalID:the entity external ID if available
SystemID:the entity system ID if available
content:the entity content
Returns:a pointer to the entity or NULL in case of error
+
diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html index 76b49674..ea0697fe 100644 --- a/doc/devhelp/libxml2-parser.html +++ b/doc/devhelp/libxml2-parser.html @@ -302,7 +302,10 @@ void xmlSetExternalEntityLoader (XML_PARSE_NSCLEAN = 8192 /* remove redundant namespaces declarations */ XML_PARSE_NOCDATA = 16384 /* merge CDATA as text nodes */ XML_PARSE_NOXINCNODE = 32768 /* do not generate XINCLUDE START/END nodes */ - XML_PARSE_COMPACT = 65536 /* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */ + XML_PARSE_COMPACT = 65536 /* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */ + XML_PARSE_OLD10 = 131072 /* parse using XML-1.0 before update 5 */ + XML_PARSE_NOBASEFIX = 262144 /* do not fixup XINCLUDE xml:base uris */ + XML_PARSE_HUGE = 524288 /* relax any hardcoded limit from the parser */ };

diff --git a/doc/devhelp/libxml2-parserInternals.html b/doc/devhelp/libxml2-parserInternals.html index 1e575f8b..14584275 100644 --- a/doc/devhelp/libxml2-parserInternals.html +++ b/doc/devhelp/libxml2-parserInternals.html @@ -587,7 +587,7 @@ void xmlParseEntityDecl (
ctxt:an XML parser context
Returns:the SystemLiteral parsed or NULL


xmlParseTextDecl ()

void	xmlParseTextDecl		(xmlParserCtxtPtr ctxt)
-

parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' Question: Seems that EncodingDecl is mandatory ? Is that a typo ?

+

parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

ctxt:an XML parser context


xmlParseVersionNum ()

xmlChar *	xmlParseVersionNum	(xmlParserCtxtPtr ctxt)
-

parse the XML version value. [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+

+

parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level

ctxt:an XML parser context
Returns:the string giving the XML version number, or NULL

xmlParseXMLDecl ()

void	xmlParseXMLDecl			(xmlParserCtxtPtr ctxt)
diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html index d5879f5d..f822935b 100644 --- a/doc/devhelp/libxml2-tree.html +++ b/doc/devhelp/libxml2-tree.html @@ -96,6 +96,7 @@ typedef struct _xmlOutputBuffer xmlOutputBuffer; typedef struct _xmlSAXLocator xmlSAXLocator; typedef xmlElementContent * xmlElementContentPtr; typedef enum xmlElementContentType; +typedef enum xmlDocProperties; typedef xmlID * xmlIDPtr; typedef struct _xmlDtd xmlDtd; typedef struct _xmlAttribute xmlAttribute; @@ -421,8 +422,23 @@ void xmlFreeNsList (xmlCharEncoding struct _xmlDict * dict : dict used to allocate names or NULL void * psvi : for type/PSVI informations + int parseFlags : set of xmlParserOption used to parse the document + int properties : set of xmlDocProperties for this document set at the end of parsing } xmlDoc;

+

+
+

Enum xmlDocProperties

enum xmlDocProperties {
+    XML_DOC_WELLFORMED = 1 /* document is XML well formed */
+    XML_DOC_NSVALID = 2 /* document is Namespace valid */
+    XML_DOC_OLD10 = 4 /* parsed with old XML-1.0 parser */
+    XML_DOC_DTDVALID = 8 /* DTD validation was successful */
+    XML_DOC_XINCLUDE = 16 /* XInclude substitution was done */
+    XML_DOC_USERBUILT = 32 /* Document was built using the API and not by parsing an instance */
+    XML_DOC_INTERNAL = 64 /* built for internal processing */
+    XML_DOC_HTML = 128 /*  parsed or built HTML document */
+};
+


Typedef xmlDocPtr

xmlDoc * xmlDocPtr;
@@ -567,7 +583,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
+    int	checked	: was the entity content checked this is also used to count entites * r
 } xmlEntity;
 

@@ -757,6 +773,7 @@ void xmlFreeNsList (xmlAttrPtr freeAttrs : * the complete error informations for the last error. * xmlError lastError xmlParserMode parseMode : the parser mode + unsigned long nbentities : number of entities references } xmlParserCtxt;

diff --git a/doc/devhelp/libxml2-uri.html b/doc/devhelp/libxml2-uri.html index c67dacf6..8b33c4ec 100644 --- a/doc/devhelp/libxml2-uri.html +++ b/doc/devhelp/libxml2-uri.html @@ -113,15 +113,15 @@ int xmlParseURIReference (
path:pointer to the path string
Returns:0 or an error code


xmlParseURI ()

xmlURIPtr	xmlParseURI		(const char * str)
-

Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

+

Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

str:the URI string to analyze
Returns:a newly built xmlURIPtr or NULL in case of error

xmlParseURIRaw ()

xmlURIPtr	xmlParseURIRaw		(const char * str, 
int raw)
-

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

+

Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref

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

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 ]

+

Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref

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

xmlPathToURI ()

xmlChar *	xmlPathToURI		(const xmlChar * path)
diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html index 3480214a..15b33716 100644 --- a/doc/devhelp/libxml2-valid.html +++ b/doc/devhelp/libxml2-valid.html @@ -443,8 +443,8 @@ The content of this structure is not made public by the API.
ctxt:the validation context
doc:a document instance
attr:an attribute definition
Returns:1 if valid or 0 otherwise

xmlValidateAttributeValue ()

int	xmlValidateAttributeValue	(xmlAttributeType type, 
const xmlChar * value)
-

Validate that the given attribute value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

-
type:an attribute type
value:an attribute value
Returns:1 if valid or 0 otherwise
+

+

type:
value:
Returns:

xmlValidateDocument ()

int	xmlValidateDocument		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.

diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html index eaacd0bf..95b6ca8d 100644 --- a/doc/devhelp/libxml2-xmlerror.html +++ b/doc/devhelp/libxml2-xmlerror.html @@ -247,11 +247,14 @@ void xmlResetError (XML_ERR_NOTATION_PROCESSING = 105 /* 105 */ XML_WAR_NS_COLUMN = 106 /* 106 */ XML_WAR_ENTITY_REDEFINED = 107 /* 107 */ + XML_ERR_UNKNOWN_VERSION = 108 /* 108 */ + XML_ERR_VERSION_MISMATCH = 109 /* 109 */ XML_NS_ERR_XML_NAMESPACE = 200 XML_NS_ERR_UNDEFINED_NAMESPACE = 201 /* 201 */ XML_NS_ERR_QNAME = 202 /* 202 */ XML_NS_ERR_ATTRIBUTE_REDEFINED = 203 /* 203 */ XML_NS_ERR_EMPTY = 204 /* 204 */ + XML_NS_ERR_COLON = 205 /* 205 */ XML_DTD_ATTRIBUTE_DEFAULT = 500 XML_DTD_ATTRIBUTE_REDEFINED = 501 /* 501 */ XML_DTD_ATTRIBUTE_VALUE = 502 /* 502 */ diff --git a/doc/devhelp/libxml2-xmlmemory.html b/doc/devhelp/libxml2-xmlmemory.html index eabbbf90..8610538f 100644 --- a/doc/devhelp/libxml2-xmlmemory.html +++ b/doc/devhelp/libxml2-xmlmemory.html @@ -52,6 +52,7 @@ void * xmlMemRealloc (void * ptr,
size int xmlInitMemory (void); void xmlMemFree (void * ptr); void * xmlMemMalloc (size_t size); +void xmlMemDisplayLast (FILE * fp,
long nbBytes); int xmlMemGet (xmlFreeFunc * freeFunc,
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc); void xmlMemoryDump (void); void * xmlMallocLoc (size_t size,
const char * file,
int line); @@ -130,6 +131,10 @@ char * xmlMemStrdupLoc (const char * str,
+
+

xmlMemFree ()

void	xmlMemFree			(void * ptr)

a free() equivalent, with error checking.

diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp index 4466b4da..880f1250 100644 --- a/doc/devhelp/libxml2.devhelp +++ b/doc/devhelp/libxml2.devhelp @@ -427,6 +427,14 @@ + + + + + + + + @@ -581,11 +589,13 @@ + + @@ -710,6 +720,7 @@ + @@ -745,6 +756,8 @@ + + @@ -754,6 +767,7 @@ + @@ -1547,6 +1561,7 @@ + @@ -2414,6 +2429,7 @@ + @@ -2492,6 +2508,7 @@ + diff --git a/doc/html/libxml-entities.html b/doc/html/libxml-entities.html index fe4ea862..406e64e9 100644 --- a/doc/html/libxml-entities.html +++ b/doc/html/libxml-entities.html @@ -30,6 +30,7 @@ The content of this structure is not made public by the API.
xmlEntityPtr	xmlGetParameterEntity	(xmlDocPtr doc, 
const xmlChar * name)
xmlEntityPtr	xmlGetPredefinedEntity	(const xmlChar * name)
void	xmlInitializePredefinedEntities	(void)
+
xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)

Description

Structure xmlEntitiesTable

Structure xmlEntitiesTable
struct _xmlHashTable { The content of this structure is not made public by the API. @@ -73,4 +74,6 @@ The content of this structure is not made public by the API.

Check whether this name is an predefined entity.

name:the entity name
Returns:NULL if not, otherwise the entity

Function: xmlInitializePredefinedEntities

void	xmlInitializePredefinedEntities	(void)

Set up the predefined entities. Deprecated call

-

Daniel Veillard

+

Function: xmlNewEntity

xmlEntityPtr	xmlNewEntity		(xmlDocPtr doc, 
const xmlChar * name,
int type,
const xmlChar * ExternalID,
const xmlChar * SystemID,
const xmlChar * content)
+

Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.

+
doc:the document
name:the entity name
type:the entity type XML_xxx_yyy_ENTITY
ExternalID:the entity external ID if available
SystemID:the entity system ID if available
content:the entity content
Returns:a pointer to the entity or NULL in case of error

Daniel Veillard

diff --git a/doc/html/libxml-parser.html b/doc/html/libxml-parser.html index 82c6f8e8..82dbf959 100644 --- a/doc/html/libxml-parser.html +++ b/doc/html/libxml-parser.html @@ -282,6 +282,9 @@ void xmlParserInputDeallocate (XML_PARSE_NOCDATA = 16384 : merge CDATA as text nodes XML_PARSE_NOXINCNODE = 32768 : do not generate XINCLUDE START/END nodes XML_PARSE_COMPACT = 65536 : compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) + XML_PARSE_OLD10 = 131072 : parse using XML-1.0 before update 5 + XML_PARSE_NOBASEFIX = 262144 : do not fixup XINCLUDE xml:base uris + XML_PARSE_HUGE = 524288 : relax any hardcoded limit from the parser }

Structure xmlSAXHandlerV1

Structure xmlSAXHandlerV1
struct _xmlSAXHandlerV1 { internalSubsetSAXFunc internalSubset diff --git a/doc/html/libxml-parserInternals.html b/doc/html/libxml-parserInternals.html index 3c12a6ad..d26d52f3 100644 --- a/doc/html/libxml-parserInternals.html +++ b/doc/html/libxml-parserInternals.html @@ -278,11 +278,11 @@ void xmlEntityReferenceFunc (xmlEntityP
ctxt:an XML parser context
Returns:the element name parsed

Function: xmlParseSystemLiteral

xmlChar *	xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt)

parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")

ctxt:an XML parser context
Returns:the SystemLiteral parsed or NULL

Function: xmlParseTextDecl

void	xmlParseTextDecl		(xmlParserCtxtPtr ctxt)
-

parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' Question: Seems that EncodingDecl is mandatory ? Is that a typo ?

+

parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

ctxt:an XML parser context

Function: xmlParseVersionInfo

xmlChar *	xmlParseVersionInfo	(xmlParserCtxtPtr ctxt)

parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S?

ctxt:an XML parser context
Returns:the version string, e.g. "1.0"

Function: xmlParseVersionNum

xmlChar *	xmlParseVersionNum	(xmlParserCtxtPtr ctxt)
-

parse the XML version value. [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+

+

parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level

ctxt:an XML parser context
Returns:the string giving the XML version number, or NULL

Function: xmlParseXMLDecl

void	xmlParseXMLDecl			(xmlParserCtxtPtr ctxt)

parse an XML declaration header [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

ctxt:an XML parser context

Function: xmlParserHandlePEReference

void	xmlParserHandlePEReference	(xmlParserCtxtPtr ctxt)
diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html index 34914cbc..3b69077b 100644 --- a/doc/html/libxml-tree.html +++ b/doc/html/libxml-tree.html @@ -22,6 +22,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Structure xmlDOMWrapCtxt
struct _xmlDOMWrapCtxt
Typedef xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr
 
Structure xmlDoc
struct _xmlDoc +
Enum xmlDocProperties
 
Typedef xmlDoc * xmlDocPtr
 
Structure xmlDtd
struct _xmlDtd
Typedef xmlDtd * xmlDtdPtr
@@ -310,7 +311,19 @@ A:link, A:visited, A:active { text-decoration: underline }
     int	charset	: encoding of the in-memory content actua
     struct _xmlDict *	dict	: dict used to allocate names or NULL
     void *	psvi	: for type/PSVI informations
-}

Structure xmlDtd

Structure xmlDtd
struct _xmlDtd { + int parseFlags : set of xmlParserOption used to parse th + int properties : set of xmlDocProperties for this docume +}

Enum xmlDocProperties

Enum xmlDocProperties {
+    XML_DOC_WELLFORMED = 1 : document is XML well formed
+    XML_DOC_NSVALID = 2 : document is Namespace valid
+    XML_DOC_OLD10 = 4 : parsed with old XML-1.0 parser
+    XML_DOC_DTDVALID = 8 : DTD validation was successful
+    XML_DOC_XINCLUDE = 16 : XInclude substitution was done
+    XML_DOC_USERBUILT = 32 : Document was built using the API and not by parsing an instance
+    XML_DOC_INTERNAL = 64 : built for internal processing
+    XML_DOC_HTML = 128 : parsed or built HTML document
+}
+

Structure xmlDtd

Structure xmlDtd
struct _xmlDtd { void * _private : application data xmlElementType type : XML_DTD_NODE, must be second ! const xmlChar * name : Name of the DTD @@ -412,7 +425,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 + int checked : was the entity content checked this is }

Structure xmlEnumeration

Structure xmlEnumeration
struct _xmlEnumeration { struct _xmlEnumeration * next : next one const xmlChar * name : Enumeration name @@ -542,6 +555,7 @@ A:link, A:visited, A:active { text-decoration: underline } xmlAttrPtr freeAttrs : * the complete error informations for th xmlError lastError xmlParserMode parseMode : the parser mode + unsigned long nbentities : number of entities references }

Structure xmlParserInput

Structure xmlParserInput
struct _xmlParserInput { xmlParserInputBufferPtr buf : UTF-8 encoded buffer const char * filename : The file analyzed, if any diff --git a/doc/html/libxml-uri.html b/doc/html/libxml-uri.html index 9b8cdb6d..61d4dba1 100644 --- a/doc/html/libxml-uri.html +++ b/doc/html/libxml-uri.html @@ -53,11 +53,11 @@ A:link, A:visited, A:active { text-decoration: underline }
uri:pointer to an xmlURI

Function: xmlNormalizeURIPath

int	xmlNormalizeURIPath		(char * path)

Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done

path:pointer to the path string
Returns:0 or an error code

Function: xmlParseURI

xmlURIPtr	xmlParseURI		(const char * str)
-

Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

+

Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

str:the URI string to analyze
Returns:a newly built xmlURIPtr or NULL in case of error

Function: xmlParseURIRaw

xmlURIPtr	xmlParseURIRaw		(const char * str, 
int raw)
-

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

+

Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref

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 ]

+

Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref

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)
diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html index 30ef3cd2..eb9f6670 100644 --- a/doc/html/libxml-valid.html +++ b/doc/html/libxml-valid.html @@ -241,8 +241,8 @@ The content of this structure is not made public by the API.
doc:the document
elem:the parent
name:the attribute name
value:the attribute value
Returns:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.

Function: xmlValidateAttributeDecl

int	xmlValidateAttributeDecl	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlAttributePtr attr)

Try to validate a single attribute definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Default Legal ] - [ VC: Enumeration ] - [ VC: ID Attribute Default ] The ID/IDREF uniqueness and matching are done separately

ctxt:the validation context
doc:a document instance
attr:an attribute definition
Returns:1 if valid or 0 otherwise

Function: xmlValidateAttributeValue

int	xmlValidateAttributeValue	(xmlAttributeType type, 
const xmlChar * value)
-

Validate that the given attribute value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.

-
type:an attribute type
value:an attribute value
Returns:1 if valid or 0 otherwise

Function: xmlValidateDocument

int	xmlValidateDocument		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)
+

+
type:
value:
Returns:

Function: xmlValidateDocument

int	xmlValidateDocument		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.

ctxt:the validation context
doc:a document instance
Returns:1 if valid or 0 otherwise

Function: xmlValidateDocumentFinal

int	xmlValidateDocumentFinal	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc)

Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity

diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html index 9803b4a4..8cdd73ab 100644 --- a/doc/html/libxml-xmlerror.html +++ b/doc/html/libxml-xmlerror.html @@ -197,11 +197,14 @@ void xmlStructuredErrorFunc (void * userD XML_ERR_NOTATION_PROCESSING = 105 : 105 XML_WAR_NS_COLUMN = 106 : 106 XML_WAR_ENTITY_REDEFINED = 107 : 107 + XML_ERR_UNKNOWN_VERSION = 108 : 108 + XML_ERR_VERSION_MISMATCH = 109 : 109 XML_NS_ERR_XML_NAMESPACE = 200 XML_NS_ERR_UNDEFINED_NAMESPACE = 201 : 201 XML_NS_ERR_QNAME = 202 : 202 XML_NS_ERR_ATTRIBUTE_REDEFINED = 203 : 203 XML_NS_ERR_EMPTY = 204 : 204 + XML_NS_ERR_COLON = 205 : 205 XML_DTD_ATTRIBUTE_DEFAULT = 500 XML_DTD_ATTRIBUTE_REDEFINED = 501 : 501 XML_DTD_ATTRIBUTE_VALUE = 502 : 502 diff --git a/doc/html/libxml-xmlmemory.html b/doc/html/libxml-xmlmemory.html index ea62ae72..8dd16ec7 100644 --- a/doc/html/libxml-xmlmemory.html +++ b/doc/html/libxml-xmlmemory.html @@ -32,6 +32,7 @@ void * xmlMallocFunc (size_t size)
void *	xmlMallocLoc			(size_t size, 
const char * file,
int line)
int	xmlMemBlocks			(void)
void	xmlMemDisplay			(FILE * fp)
+
void	xmlMemDisplayLast		(FILE * fp, 
long nbBytes)
void	xmlMemFree			(void * ptr)
int	xmlMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)
void *	xmlMemMalloc			(size_t size)
@@ -73,7 +74,9 @@ void * xmlMallocFunc (size_t size)

Provides the number of memory areas currently allocated

Returns:an int representing the number of blocks

Function: xmlMemDisplay

void	xmlMemDisplay			(FILE * fp)

show in-extenso the memory blocks allocated

-
fp:a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist

Function: xmlMemFree

void	xmlMemFree			(void * ptr)
+
fp:a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist

Function: xmlMemDisplayLast

void	xmlMemDisplayLast		(FILE * fp, 
long nbBytes)
+

the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.

+
fp:a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist
nbBytes:the amount of memory to dump

Function: xmlMemFree

void	xmlMemFree			(void * ptr)

a free() equivalent, with error checking.

ptr:the memory block pointer

Function: xmlMemGet

int	xmlMemGet			(xmlFreeFunc * freeFunc, 
xmlMallocFunc * mallocFunc,
xmlReallocFunc * reallocFunc,
xmlStrdupFunc * strdupFunc)

Provides the memory access functions set currently in use

diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index d62c5a6e..81974e79 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -445,6 +445,7 @@ + @@ -665,6 +666,7 @@ + @@ -674,9 +676,10 @@ - + + @@ -699,7 +702,7 @@ - + @@ -711,7 +714,7 @@ - + @@ -729,7 +732,7 @@ - + @@ -738,6 +741,7 @@ + @@ -1393,36 +1397,43 @@ + + - + + + + + - + - + + @@ -1436,6 +1447,7 @@ + @@ -1487,6 +1499,7 @@ + @@ -2010,7 +2023,6 @@ - @@ -2062,7 +2074,7 @@ - + @@ -2193,6 +2205,7 @@ + @@ -2266,7 +2279,7 @@ - + @@ -2360,6 +2373,7 @@ + @@ -2470,7 +2484,7 @@ - + @@ -2505,6 +2519,7 @@ + @@ -2666,6 +2681,7 @@ + @@ -2742,6 +2758,7 @@ + @@ -4671,6 +4688,15 @@ + + + + + + + + @@ -4825,11 +4851,13 @@ + + @@ -4954,6 +4982,7 @@ + @@ -4984,13 +5013,15 @@ - + + @@ -5000,6 +5031,7 @@ crash if you try to modify the tree)'/> + @@ -5941,7 +5973,12 @@ standalone attribute was specified'/> actually an xmlCharEncoding'/> + + + @@ -6017,7 +6054,8 @@ actually an xmlCharEncoding'/> - + @@ -6256,6 +6294,7 @@ actually an xmlCharEncoding'/> *'/> + @@ -10743,6 +10782,12 @@ Could we use @subtypes for this?'/> + + the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime. + + + + a free() equivalent, with error checking. @@ -11258,6 +11303,16 @@ Could we use @subtypes for this?'/> + + Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore. + + + + + + + + Create a new input stream based on an xmlEntityPtr @@ -12043,23 +12098,23 @@ Could we use @subtypes for this?'/> - parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' Question: Seems that EncodingDecl is mandatory ? Is that a typo ? + parse an XML declaration header for external entities [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' - Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] - Parse an URI but allows to keep intact the original fragments. URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref - Parse an URI reference string and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref @@ -12070,7 +12125,7 @@ Could we use @subtypes for this?'/> - parse the XML version value. [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+ + parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level @@ -16677,10 +16732,10 @@ Could we use @subtypes for this?'/> defined(LIBXML_VALID_ENABLED) - Validate that the given attribute value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens. - - - + + + + defined(LIBXML_VALID_ENABLED) diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml index e42f4e75..a8b58f72 100644 --- a/doc/libxml2-refs.xml +++ b/doc/libxml2-refs.xml @@ -236,6 +236,14 @@ + + + + + + + + @@ -390,11 +398,13 @@ + + @@ -523,6 +533,7 @@ + @@ -558,6 +569,8 @@ + + @@ -567,6 +580,7 @@ + @@ -1902,6 +1916,7 @@ + @@ -2200,6 +2215,7 @@ + @@ -2284,6 +2300,7 @@ + @@ -3754,6 +3771,14 @@ + + + + + + + + @@ -3908,11 +3933,13 @@ + + @@ -4041,6 +4068,7 @@ + @@ -4076,6 +4104,8 @@ + + @@ -4085,6 +4115,7 @@ + @@ -5456,6 +5487,7 @@ + @@ -5754,6 +5786,7 @@ + @@ -5838,6 +5871,7 @@ + @@ -7441,6 +7475,7 @@ + @@ -7870,6 +7905,7 @@ + @@ -8119,6 +8155,7 @@ + @@ -8453,6 +8490,9 @@ + + + @@ -9112,6 +9152,7 @@ + @@ -10925,6 +10966,7 @@ + @@ -11133,6 +11175,8 @@ + + @@ -11142,6 +11186,7 @@ + @@ -11835,6 +11880,14 @@ + + + + + + + + @@ -11944,6 +11997,7 @@ + @@ -12523,11 +12577,13 @@ + + @@ -12635,6 +12691,7 @@ + @@ -13145,6 +13202,7 @@ + @@ -15250,7 +15308,6 @@ - @@ -15258,7 +15315,6 @@ - @@ -15391,7 +15447,6 @@ - @@ -15833,7 +15888,6 @@ - @@ -15842,7 +15896,6 @@ - @@ -16347,11 +16400,9 @@ - - @@ -16419,7 +16470,6 @@ - @@ -16448,13 +16498,11 @@ - - @@ -16961,9 +17009,6 @@ - - - @@ -16988,6 +17033,8 @@ + + @@ -17431,9 +17478,6 @@ - - - @@ -17781,7 +17825,6 @@ - @@ -18025,7 +18068,6 @@ - @@ -18048,7 +18090,6 @@ - @@ -18310,6 +18351,7 @@ + @@ -18414,9 +18456,6 @@ - - - @@ -18452,8 +18491,6 @@ - - @@ -18810,6 +18847,7 @@ + @@ -18880,6 +18918,7 @@ + @@ -18914,6 +18953,7 @@ + @@ -18983,6 +19023,7 @@ + @@ -19283,6 +19324,8 @@ + + @@ -19399,6 +19442,7 @@ + @@ -20715,6 +20759,7 @@ + @@ -21022,6 +21067,7 @@ + @@ -21192,6 +21238,7 @@ + @@ -21343,6 +21390,9 @@ + + + @@ -21606,10 +21656,14 @@ + + + + @@ -21886,6 +21940,9 @@ + + + @@ -22682,8 +22739,6 @@ - - @@ -24092,6 +24147,7 @@ + @@ -24131,6 +24187,7 @@ + @@ -24187,6 +24244,7 @@ + @@ -24548,9 +24606,6 @@ - - - @@ -24724,6 +24779,7 @@ + @@ -25005,6 +25061,9 @@ + + + @@ -25067,6 +25126,7 @@ + @@ -26025,6 +26085,7 @@ + @@ -26127,6 +26188,9 @@ + + + @@ -26411,6 +26475,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26457,9 +26549,6 @@ - - - @@ -26905,34 +26994,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -27036,11 +27097,13 @@ - - + + + + @@ -27328,6 +27391,9 @@ + + + @@ -27502,6 +27568,7 @@ + @@ -29327,6 +29394,7 @@ + @@ -29357,9 +29425,6 @@ - - - @@ -29477,6 +29542,7 @@ + @@ -29606,6 +29672,7 @@ + @@ -30254,6 +30321,9 @@ + + + @@ -30351,6 +30421,9 @@ + + + diff --git a/gentest.py b/gentest.py index 13792463..17c9f592 100755 --- a/gentest.py +++ b/gentest.py @@ -208,6 +208,8 @@ extra_pre_call = { extra_post_call = { "xmlAddChild": "if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }", + "xmlAddEntity": + "if (ret_val != NULL) { xmlFreeNode(ret_val) ; ret_val = NULL; }", "xmlAddChildList": "if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }", "xmlAddSibling": diff --git a/python/libxml2class.txt b/python/libxml2class.txt index 99b68197..68a2de13 100644 --- a/python/libxml2class.txt +++ b/python/libxml2class.txt @@ -578,6 +578,7 @@ Class xmlDoc(xmlNode) encodeEntities() encodeEntitiesReentrant() encodeSpecialChars() + newEntity() parameterEntity() # functions from module relaxng diff --git a/testapi.c b/testapi.c index 1789d509..32db6768 100644 --- a/testapi.c +++ b/testapi.c @@ -494,10 +494,11 @@ static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputB xmlFreeParserInputBuffer(val); } -#define gen_nb_xmlDocPtr 3 +#define gen_nb_xmlDocPtr 4 static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) { if (no == 0) return(xmlNewDoc(BAD_CAST "1.0")); if (no == 1) return(xmlReadMemory("", 6, "test", NULL, 0)); + if (no == 2) return(xmlReadMemory(" ", 24, "test", NULL, 0)); return(NULL); } static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) { @@ -9614,11 +9615,78 @@ test_xmlInitializePredefinedEntities(void) { return(test_ret); } + +static int +test_xmlNewEntity(void) { + int test_ret = 0; + + int mem_base; + xmlEntityPtr ret_val; + xmlDocPtr doc; /* the document */ + int n_doc; + xmlChar * name; /* the entity name */ + int n_name; + int type; /* the entity type XML_xxx_yyy_ENTITY */ + int n_type; + xmlChar * ExternalID; /* the entity external ID if available */ + int n_ExternalID; + xmlChar * SystemID; /* the entity system ID if available */ + int n_SystemID; + xmlChar * content; /* the entity content */ + int n_content; + + for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) { + for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) { + for (n_type = 0;n_type < gen_nb_int;n_type++) { + for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) { + for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) { + for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) { + mem_base = xmlMemBlocks(); + doc = gen_xmlDocPtr(n_doc, 0); + name = gen_const_xmlChar_ptr(n_name, 1); + type = gen_int(n_type, 2); + ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3); + SystemID = gen_const_xmlChar_ptr(n_SystemID, 4); + content = gen_const_xmlChar_ptr(n_content, 5); + + ret_val = xmlNewEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content); + desret_xmlEntityPtr(ret_val); + call_tests++; + des_xmlDocPtr(n_doc, doc, 0); + des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1); + des_int(n_type, type, 2); + des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3); + des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4); + des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5); + xmlResetLastError(); + if (mem_base != xmlMemBlocks()) { + printf("Leak of %d blocks found in xmlNewEntity", + xmlMemBlocks() - mem_base); + test_ret++; + printf(" %d", n_doc); + printf(" %d", n_name); + printf(" %d", n_type); + printf(" %d", n_ExternalID); + printf(" %d", n_SystemID); + printf(" %d", n_content); + printf("\n"); + } + } + } + } + } + } + } + function_tests++; + + return(test_ret); +} + static int test_entities(void) { int test_ret = 0; - if (quiet == 0) printf("Testing entities : 12 of 16 functions ...\n"); + if (quiet == 0) printf("Testing entities : 13 of 17 functions ...\n"); test_ret += test_xmlAddDocEntity(); test_ret += test_xmlAddDtdEntity(); test_ret += test_xmlCleanupPredefinedEntities(); @@ -9633,6 +9701,7 @@ test_entities(void) { test_ret += test_xmlGetParameterEntity(); test_ret += test_xmlGetPredefinedEntity(); test_ret += test_xmlInitializePredefinedEntities(); + test_ret += test_xmlNewEntity(); if (test_ret != 0) printf("Module entities: %d errors\n", test_ret); @@ -25895,9 +25964,9 @@ test_xmlValidateAttributeValue(void) { #if defined(LIBXML_VALID_ENABLED) int mem_base; int ret_val; - xmlAttributeType type; /* an attribute type */ + xmlAttributeType type; /* */ int n_type; - xmlChar * value; /* an attribute value */ + xmlChar * value; /* */ int n_value; for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) { diff --git a/threads.c b/threads.c index 12b1eec6..23cb200a 100644 --- a/threads.c +++ b/threads.c @@ -73,6 +73,10 @@ extern int pthread_mutex_unlock () __attribute((weak)); extern int pthread_cond_init () __attribute((weak)); +extern int pthread_cond_destroy () + __attribute((weak)); +extern int pthread_cond_wait () + __attribute((weak)); extern int pthread_equal () __attribute((weak)); extern pthread_t pthread_self () @@ -860,6 +864,8 @@ xmlInitThreads(void) (pthread_mutex_lock != NULL) && (pthread_mutex_unlock != NULL) && (pthread_cond_init != NULL) && + (pthread_cond_destroy != NULL) && + (pthread_cond_wait != NULL) && (pthread_equal != NULL) && (pthread_self != NULL) && (pthread_cond_signal != NULL)) { diff --git a/tree.c b/tree.c index 88432ea8..57bf7efc 100644 --- a/tree.c +++ b/tree.c @@ -3467,6 +3467,11 @@ xmlFreeNode(xmlNodePtr cur) { if (cur->doc != NULL) dict = cur->doc->dict; + if (cur->type == XML_ENTITY_DECL) { + xmlEntityPtr ent = (xmlEntityPtr) cur; + DICT_FREE(ent->SystemID); + DICT_FREE(ent->ExternalID); + } if ((cur->children != NULL) && (cur->type != XML_ENTITY_REF_NODE)) xmlFreeNodeList(cur->children); @@ -3527,6 +3532,28 @@ xmlUnlinkNode(xmlNodePtr cur) { doc->extSubset = NULL; } } + if (cur->type == XML_ENTITY_DECL) { + xmlDocPtr doc; + doc = cur->doc; + if (doc != NULL) { + if (doc->intSubset != NULL) { + if (xmlHashLookup(doc->intSubset->entities, cur->name) == cur) + xmlHashRemoveEntry(doc->intSubset->entities, cur->name, + NULL); + if (xmlHashLookup(doc->intSubset->pentities, cur->name) == cur) + xmlHashRemoveEntry(doc->intSubset->pentities, cur->name, + NULL); + } + if (doc->extSubset != NULL) { + if (xmlHashLookup(doc->extSubset->entities, cur->name) == cur) + xmlHashRemoveEntry(doc->extSubset->entities, cur->name, + NULL); + if (xmlHashLookup(doc->extSubset->pentities, cur->name) == cur) + xmlHashRemoveEntry(doc->extSubset->pentities, cur->name, + NULL); + } + } + } if (cur->parent != NULL) { xmlNodePtr parent; parent = cur->parent; diff --git a/valid.c b/valid.c index 594d3839..49fb720c 100644 --- a/valid.c +++ b/valid.c @@ -6786,7 +6786,7 @@ xmlValidateDtdFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { xmlAttributeTablePtr table; xmlEntitiesTablePtr entities; - if (doc == NULL) return(0); + if ((doc == NULL) || (ctxt == NULL)) return(0); if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) return(0); ctxt->doc = doc;