From 024b57019fd4fb5dcbdd7fec7e3d54230e7102da Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 12 Dec 2002 00:15:55 +0000 Subject: [PATCH] patch from Mark Vadok about htmlNodeDumpOutput location. removed an * HTMLtree.c include/libxml/HTMLtree.h: patch from Mark Vadok about htmlNodeDumpOutput location. * xpath.c: removed an undefined function signature * doc/apibuild.py doc/libxml2-api.xml: the script was exporting too many symbols in the API breaking the python bindings. Updated with the libxslt/libexslt changes. Daniel --- ChangeLog | 9 + HTMLtree.c | 2 - doc/apibuild.py | 36 +- doc/libxml2-api.xml | 1181 ++----------------------------------- include/libxml/HTMLtree.h | 3 + python/libxml2class.txt | 38 -- xpath.c | 2 - 7 files changed, 74 insertions(+), 1197 deletions(-) diff --git a/ChangeLog b/ChangeLog index 931d166d..cbcd66a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Dec 12 01:09:34 CET 2002 Daniel Veillard + + * HTMLtree.c include/libxml/HTMLtree.h: patch from Mark Vadok + about htmlNodeDumpOutput location. + * xpath.c: removed an undefined function signature + * doc/apibuild.py doc/libxml2-api.xml: the script was exporting + too many symbols in the API breaking the python bindings. + Updated with the libxslt/libexslt changes. + Wed Dec 11 20:26:15 CET 2002 Daniel Veillard * configure.in: preparing release of 2.4.29 diff --git a/HTMLtree.c b/HTMLtree.c index 58c12ae7..fe69b3de 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -651,8 +651,6 @@ htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, co } -void htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, - xmlNodePtr cur, const char *encoding); /** * htmlNodeListDumpOutput: diff --git a/doc/apibuild.py b/doc/apibuild.py index 8d1b204a..3c482460 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -182,9 +182,6 @@ class index: if self.functions.has_key(id): up = idx.functions[id] self.functions[id].update(None, up.type, up.info, up.extra) - else: - if idx.functions[id].static == 0: - self.functions[id] = idx.functions[id] def analyze_dict(self, type, dict): count = 0 @@ -225,6 +222,8 @@ ignored_words = { "LIBXML_DLL_IMPORT": (0, "Special macro to flag external keywords"), "__declspec": (3, "Windows keyword"), "ATTRIBUTE_UNUSED": (0, "macro keyword"), + "LIBEXSLT_PUBLIC": (0, "macro keyword"), + "X_IN_Y": (5, "macro function builder"), } class CLexer: @@ -1342,15 +1341,20 @@ class docBuilder: output.write(" \n"); - for field in self.idx.structs[name].info: - desc = field[2] - if desc == None: - desc = '' - else: - desc = escape(desc) - output.write(" \n" % (field[1] , field[0], desc)) + try: + for field in self.idx.structs[name].info: + print name, field + desc = field[2] + if desc == None: + desc = '' + else: + desc = escape(desc) + output.write(" \n" % (field[1] , field[0], desc)) + except: + print "Failed to serialize struct %s" % (name) output.write(" \n") else: output.write("/>\n"); @@ -1433,17 +1437,23 @@ def rebuild(): if glob.glob("../parser.c") != [] : print "Rebuilding API description for libxml2" builder = docBuilder("libxml2", ["..", "../include/libxml"], - ["xmlwin32version.h", "tst.c"]) + ["xmlwin32version.h", "tst.c", + "schemasInternals.h", "xmlschemas" ]) elif glob.glob("../libxslt/transform.c") != [] : print "Rebuilding API description for libxslt" builder = docBuilder("libxslt", ["../libxslt"], - ["win32config.h", "tst.c"]) + ["win32config.h", "libxslt.h", "tst.c"]) else: print "rebuild() failed, unable to guess the module" return None builder.scan() builder.analyze() builder.serialize() + if glob.glob("../libexslt/exslt.c") != [] : + extra = docBuilder("libexslt", ["../libexslt"], ["libexslt.h"]) + extra.scan() + extra.analyze() + extra.serialize() return builder # diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index 13bfb2a9..2e415af8 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -498,14 +498,6 @@ - - - - - - - - @@ -1093,92 +1085,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1202,53 +1108,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2163,54 +2022,6 @@ Identifiers can be longer, but this will be more costly at runtime. - - - - - - - - the element is abstract - - - the element has a default value - - - the element has a fixed value - - - the element is global - - - the element is nillable - - - the element is a reference to a type - - - the element is top level - - - collapse the types of the facet - - - preserve the type of the facet - - - replace the type of the facet - - - unknown facet handling - - - the shemas requires qualified attributes - - - the shemas requires qualified elements - - - the element content type is mixed - Both general and parameter entities need to be substituted. @@ -2543,70 +2354,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2654,23 +2401,9 @@ - - - - - - - - - - - + - - - - - + @@ -2682,48 +2415,15 @@ - - - - - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + @@ -2733,12 +2433,7 @@ - - - - - - + @@ -2747,83 +2442,14 @@ - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -2834,67 +2460,16 @@ actually an xmlCharEncoding'/> - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + @@ -2902,172 +2477,38 @@ actually an xmlCharEncoding'/> - - - - - + - - - - - - - - - - - - - - - + - - - - - + - - - - - + - - - - - - - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - + - - - - - + - - - - - + @@ -3075,301 +2516,37 @@ actually an xmlCharEncoding'/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - + - - - - + - - - - + Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out. @@ -3379,14 +2556,6 @@ actually an xmlCharEncoding'/> - - Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out. - - - - - - Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out. @@ -3762,15 +2931,6 @@ actually an xmlCharEncoding'/> - - Substitute the HTML entities by their value DEPRECATED !!!! - - - - - - - Initialize the default SAX handler @@ -3901,14 +3061,6 @@ actually an xmlCharEncoding'/> - - Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added. - - - - - - parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' @@ -4078,12 +3230,6 @@ actually an xmlCharEncoding'/> - - - - - - Pops the top element name from the name stack @@ -5504,19 +4650,6 @@ actually an xmlCharEncoding'/> - - Quick display of a NodeSet - - - - - - - - - - - Signature of the function to use when there is an error and no parsing or validity context available . @@ -6303,10 +5436,6 @@ actually an xmlCharEncoding'/> - - Breakpoint to use in conjunction with xmlMemStopAtBlock. When the block number reaches the specified value this function is called. One need to add a breakpoint to it to get the context in which the given block is allocated. - - Signature for a malloc() implementation. @@ -6541,11 +5670,6 @@ actually an xmlCharEncoding'/> - - Provides the specified content length from the HTTP header. - - - This function try to fetch the indicated resource via HTTP GET and save it's content in the file. @@ -6553,13 +5677,6 @@ actually an xmlCharEncoding'/> - - Check if all the content was read - - - - - Initialize the HTTP protocol layer. Currently it just checks for proxy informations @@ -6828,13 +5945,6 @@ actually an xmlCharEncoding'/> xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion. - - This function tries to locate a namespace definition in a tree ancestors, or create a new namespace definition node similar to @ns trying to reuse the same prefix. However if the given prefix is null (default namespace) or reused within the subtree defined by @tree or on one of its ancestors then a new prefix is generated. - - - - - Creation of a new reference node. @@ -7084,11 +6194,6 @@ actually an xmlCharEncoding'/> - - parse a value for an attribute, this is the fallback function of xmlParseAttValue() when the attribute parsing requires handling of non-ASCII characters. - - - parse an attribute [41] Attribute ::= Name Eq AttValue [ WFC: No External Entity References ] Attribute values cannot contain direct or indirect entity references to external entities. [ WFC: No < in Attribute Values ] The replacement text of any entity referred to directly or indirectly in an attribute value (other than "&lt;") must not contain a <. [ VC: Attribute Value Type ] The attribute must have been declared; the value must be of the type declared for it. [25] Eq ::= S? '=' S? With namespace: [NS 11] Attribute ::= QName Eq AttValue Also the case QName == xmlns:??? is handled independently as a namespace definition. @@ -7143,12 +6248,6 @@ actually an xmlCharEncoding'/> - - parse a CharData section.this is the fallback function of xmlParseCharData() when the parsing requires handling of non-ASCII characters. - - - - Compare the string to the known encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities. @@ -7404,18 +6503,6 @@ actually an xmlCharEncoding'/> - - parse ENTITY references declarations, but this version parses it from a string value. [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity - - - - - - parse PEReference declarations [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. - - - - parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") @@ -7890,143 +6977,11 @@ actually an xmlCharEncoding'/> - - When inserting a new element scan the DtD for existing attributes for that element and initialize the Attribute chain - - - - Trickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of xmlParserHandleReference [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)* - - Cleanup the default XML Schemas type library - - - - Dump a Schema structure. - - - - - - Deallocate a Schema structure. - - - - - Free the resources associated to the schema parser context - - - - - Deallocate a Schema Type structure. - - - - - Free the resources associated to the schema validation context - - - - - Cleanup the default XML Schemas type library - - - - - Lookup a type in the default XML Schemas type library - - - - - - Initialize the default XML Schemas type library - - - - Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file. - - - - - - Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file. - - - - - Create an XML Schemas validation context based on the given schema - - - - - parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change - - - - - Set the callback functions used to handle errors for a validation context - - - - - - - - Set the error and warning callback informations - - - - - - - - Validate a document tree in memory. - - - - - - Check a value against a facet condition - - - - - - - - Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. - - - - - - - Validate a document tree in memory. - - - - - - - - - - - - - - - - - - - - - Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case. @@ -9254,11 +8209,6 @@ actually an xmlCharEncoding'/> - - Upgrade old style Namespaces (PI) and move them to the root of the document. DEPRECATED - - - (Re)Build the automata associated to the content model of this element @@ -9626,12 +8576,6 @@ actually an xmlCharEncoding'/> - - - - - - Implement the equal operation on XPath objects content: @arg1 == @arg2 @@ -10315,22 +9259,11 @@ actually an xmlCharEncoding'/> - - - - - Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations. - - Function implementing end-point() operation as described in 5.4.3 ---------------------------- location-set end-point(location-set) For each location x in the argument location-set, end-point adds a location of type point to the result location-set. That point represents the end point of location x and is determined by the following rules: - If x is of type point, the resulting point is x. - If x is of type range, the resulting point is the end point of x. - If x is of type root or element, the container node of the resulting point is x and the index is the number of location children of x. - If x is of type text, comment, or processing instruction, the container node of the resulting point is x and the index is the length of the string-value of x. - If x is of type attribute or namespace, the function must signal a syntax error. ---------------------------- - - - - Evaluate the XPath Location Path in the given context. @@ -10347,12 +9280,6 @@ actually an xmlCharEncoding'/> - - Function implementing here() operation as described in 5.4.3 - - - - add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set @val is freed. @@ -10443,42 +9370,12 @@ actually an xmlCharEncoding'/> - - Function implementing origin() operation as described in 5.4.3 - - - - - - Function implementing the range() function 5.4.3 location-set range(location-set ) The range function returns ranges covering the locations in the argument location-set. For each location x in the argument location-set, a range location representing the covering range of x is added to the result location-set. - - - - - - Function implementing the range-inside() function 5.4.3 location-set range-inside(location-set ) The range-inside function returns ranges covering the contents of the locations in the argument location-set. For each location x in the argument location-set, a range location is added to the result location-set. If x is a range location, then x is added to the result location-set. If x is not a range location, then x is used as the container location of the start and end points of the range location to be added; the index of the start point of the range is zero; if the end point is a character point then its index is the length of the string-value of x, and otherwise is the number of location children of x. - - - - Implement the range-to() XPointer function - - Function implementing start-point() operation as described in 5.4.3 ---------------- location-set start-point(location-set) For each location x in the argument location-set, start-point adds a location of type point to the result location-set. That point represents the start point of location x and is determined by the following rules: - If x is of type point, the start point is x. - If x is of type range, the start point is the start point of x. - If x is of type root, element, text, comment, or processing instruction, - the container node of the start point is x and the index is 0. - If x is of type attribute or namespace, the function must signal a syntax error. ---------------- - - - - - - Function implementing the string-range() function range as described in 5.4.2 ------------------------------ [Definition: For each location in the location-set argument, string-range returns a set of string ranges, a set of substrings in a string. Specifically, the string-value of the location is searched for substrings that match the string argument, and the resulting location-set will contain a range location for each non-overlapping match.] An empty string is considered to match before each character of the string-value and after the final character. Whitespace in a string is matched literally, with no normalization except that provided by XML for line ends. The third argument gives the position of the first character to be in the resulting range, relative to the start of the match. The default value is 1, which makes the range start immediately before the first character of the matched string. The fourth argument gives the number of characters in the range; the default is that the range extends to the end of the matched string. Element boundaries, as well as entire embedded nodes such as processing instructions and comments, are ignored as defined in [XPath]. If the string in the second argument is not found in the string-value of the location, or if a value in the third or fourth argument indicates a string that is beyond the beginning or end of the document, the expression fails. The points of the range-locations in the returned location-set will all be character points. ------------------------------ - - - - Wrap the LocationSet @val in a new xmlXPathObjectPtr diff --git a/include/libxml/HTMLtree.h b/include/libxml/HTMLtree.h index 30ca7f22..3a441c4b 100644 --- a/include/libxml/HTMLtree.h +++ b/include/libxml/HTMLtree.h @@ -103,6 +103,9 @@ void htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, int format); int htmlIsBooleanAttr (const xmlChar *name); +void htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, + xmlNodePtr cur, const char *encoding); + diff --git a/python/libxml2class.txt b/python/libxml2class.txt index f94976a7..f72e7533 100644 --- a/python/libxml2class.txt +++ b/python/libxml2class.txt @@ -165,16 +165,9 @@ registerDefaultInputCallbacks() registerDefaultOutputCallbacks() registerHTTPPostCallbacks() -# functions from module xmlmemory.c -mallocBreakpoint() - # functions from module xmlregexp regexpCompile() -# functions from module xmlschemastypes -schemaCleanupTypes() -schemaInitTypes() - # functions from module xmlunicode uCSIsAlphabeticPresentationForms() uCSIsArabic() @@ -395,9 +388,6 @@ Class xmlNode(xmlCore) unsetNsProp() unsetProp() - # functions from module tree.c - newReconciliedNs() - # functions from module valid isID() isRef() @@ -425,9 +415,6 @@ Class xmlNode(xmlCore) xpathNextPrecedingSibling() xpathNextSelf() - # functions from module xpointer.c - xpointerAdvanceNode() - Class xmlDoc(xmlNode) @@ -448,9 +435,6 @@ Class xmlDoc(xmlNode) htmlSaveFileFormat() htmlSetMetaEncoding() - # functions from module HTMLtree.c - htmlNodeDumpOutput() - # functions from module debugXML debugDumpDocument() debugDumpDocumentHead() @@ -466,9 +450,6 @@ Class xmlDoc(xmlNode) encodeSpecialChars() parameterEntity() - # functions from module parserInternals.c - upgradeOldNs() - # functions from module tree copyDoc() createIntSubset() @@ -636,15 +617,6 @@ Class xpathParserContext() xpathTrueFunction() xpathValueFlipSign() xpatherror() - - # functions from module xpointer.c - xpointerEndPointFunction() - xpointerHereFunction() - xpointerOriginFunction() - xpointerRangeFunction() - xpointerRangeInsideFunction() - xpointerStartPointFunction() - xpointerStringRangeFunction() Class parserCtxt() # accessors doc() @@ -663,9 +635,6 @@ Class parserCtxt() htmlParseDocument() htmlParseElement() - # functions from module HTMLparser.c - htmlDecodeEntities() - # functions from module parser clearParserCtxt() freeParserCtxt() @@ -676,10 +645,6 @@ Class parserCtxt() setupParserForBuffer() stopParser() - # functions from module parser.c - parseAttValueComplex() - parseCharDataComplex() - # functions from module parserInternals decodeEntities() namespaceParseNCName() @@ -743,9 +708,6 @@ Class xmlDtd(xmlNode) dtdQAttrDesc() dtdQElementDesc() - # functions from module valid.c - scanAttributeDecl() - Class xmlNs(xmlNode) diff --git a/xpath.c b/xpath.c index fc39cf7f..305bccf3 100644 --- a/xpath.c +++ b/xpath.c @@ -59,8 +59,6 @@ /* #define DEBUG_EXPR */ /* #define DEBUG_EVAL_COUNTS */ -double xmlXPathDivideBy(double f, double fzero); - static xmlNs xmlXPathXMLNamespaceStruct = { NULL, XML_NAMESPACE_DECL,