From a9b66d00b5fbae2381f59c0be4d8c7b8e3c16cf7 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 11 Dec 2002 14:23:49 +0000 Subject: [PATCH] new API building Python script, does the C parsing directly, generates a * doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API building Python script, does the C parsing directly, generates a better API description including structure fieds defs and enums. Still a couple of bugs, but good enough for the python wrappers now. * DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c include/libxml/schemasInternals.h include/libxml/tree.h: more cleanup based on the python analysis script reports. * libxml.spec.in: make sure the API XML description is part of the devel package. Daniel --- ChangeLog | 14 + DOCBparser.c | 12 - SAX.c | 8 +- doc/Makefile.am | 7 +- doc/apibuild.py | 1458 ++++ doc/libxml2-api.xml | 12218 +++++++++++++++------------- include/libxml/schemasInternals.h | 82 +- include/libxml/tree.h | 2 +- libxml.spec.in | 2 +- nanohttp.c | 4 + parser.c | 2 + parserInternals.c | 2 +- python/libxml2class.txt | 47 +- tree.c | 7 +- valid.c | 1 + xmlIO.c | 12 +- xmlmemory.c | 12 +- xmlreader.c | 2 +- xmlregexp.c | 11 +- xmlschemas.c | 2 +- 20 files changed, 8369 insertions(+), 5536 deletions(-) create mode 100755 doc/apibuild.py diff --git a/ChangeLog b/ChangeLog index ba2758e9..f8aaa3bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Wed Dec 11 14:54:47 CET 2002 Daniel Veillard + + * doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API + building Python script, does the C parsing directly, generates + a better API description including structure fieds defs and + enums. Still a couple of bugs, but good enough for the python + wrappers now. + * DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c + valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c + include/libxml/schemasInternals.h include/libxml/tree.h: more + cleanup based on the python analysis script reports. + * libxml.spec.in: make sure the API XML description is part of the + devel package. + Tue Dec 10 16:16:34 CET 2002 Daniel Veillard * DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c diff --git a/DOCBparser.c b/DOCBparser.c index 840b309d..f84a0be4 100644 --- a/DOCBparser.c +++ b/DOCBparser.c @@ -68,18 +68,6 @@ struct _docbEntityDesc { const char *desc; /* the description */ }; -#if 0 -docbElemDescPtr docbTagLookup (const xmlChar *tag); -docbEntityDescPtr docbEntityLookup(const xmlChar *name); -docbEntityDescPtr docbEntityValueLookup(int value); - -int docbIsAutoClosed(docbDocPtr doc, - docbNodePtr elem); -int docbAutoCloseTag(docbDocPtr doc, - const xmlChar *name, - docbNodePtr elem); - -#endif static int docbParseCharRef(docbParserCtxtPtr ctxt); static xmlEntityPtr docbParseEntityRef(docbParserCtxtPtr ctxt, xmlChar **str); diff --git a/SAX.c b/SAX.c index c8452ebf..785ea0ba 100644 --- a/SAX.c +++ b/SAX.c @@ -33,7 +33,7 @@ * getPublicId: * @ctx: the user data (XML parser context) * - * Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" + * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" * * Returns a xmlChar * */ @@ -48,7 +48,7 @@ getPublicId(void *ctx ATTRIBUTE_UNUSED) * getSystemId: * @ctx: the user data (XML parser context) * - * Return the system ID, basically URL or filename e.g. + * Provides the system ID, basically URL or filename e.g. * http://www.sgmlsource.com/dtds/memo.dtd * * Returns a xmlChar * @@ -64,7 +64,7 @@ getSystemId(void *ctx) * getLineNumber: * @ctx: the user data (XML parser context) * - * Return the line number of the current parsing point. + * Provide the line number of the current parsing point. * * Returns an int */ @@ -79,7 +79,7 @@ getLineNumber(void *ctx) * getColumnNumber: * @ctx: the user data (XML parser context) * - * Return the column number of the current parsing point. + * Provide the column number of the current parsing point. * * Returns an int */ diff --git a/doc/Makefile.am b/doc/Makefile.am index 5bd6275c..7b373041 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -21,7 +21,8 @@ APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \ EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \ tutorial/images/*.png tutorial/images/callouts/*.png \ API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \ - html/*.sgml libxml2-api.xml parsedecl.py index.py search.php + html/*.sgml libxml2-api.xml parsedecl.py index.py search.php \ + apibuild.py man_MANS = xmllint.1 xmlcatalog.1 @@ -52,8 +53,8 @@ xml: sgml -@(for s in sgml/*.sgml ; do name=`basename $$s .sgml` ; \ xmllint --sgml $$s > xml/"$$name".xml ; done) -libxml2-api.xml libxml2-refs.xml: xml parsedecl.py libxml-decl.txt libxml-decl-list.txt - -(./parsedecl.py) +libxml2-api.xml: apibuild.py ../include/libxml/*.h + -(./apibuild.py) api: libxml2-api.xml libxml2-refs.xml diff --git a/doc/apibuild.py b/doc/apibuild.py new file mode 100755 index 00000000..8d1b204a --- /dev/null +++ b/doc/apibuild.py @@ -0,0 +1,1458 @@ +#!/usr/bin/python -u +# +# This is the API builder, it parses the C sources and build the +# API formal description in XML. +# +# See Copyright for the status of this software. +# +# daniel@veillard.com +# +import sys +import string +import glob + +def escape(raw): + raw = string.replace(raw, '&', '&') + raw = string.replace(raw, '<', '<') + raw = string.replace(raw, '>', '>') + raw = string.replace(raw, "'", ''') + raw = string.replace(raw, '"', '"') + return raw + +class identifier: + def __init__(self, name, module=None, type=None, info=None, extra=None): + self.name = name + self.module = module + self.type = type + self.info = info + self.extra = extra + self.static = 0 + + def __repr__(self): + r = "%s %s:" % (self.type, self.name) + if self.static: + r = r + " static" + if self.module != None: + r = r + " from %s" % (self.module) + if self.info != None: + r = r + " " + `self.info` + if self.extra != None: + r = r + " " + `self.extra` + return r + + + def set_module(self, module): + self.module = module + def set_type(self, type): + self.type = type + def set_info(self, info): + self.info = info + def set_extra(self, extra): + self.extra = extra + def set_static(self, static): + self.static = static + + def update(self, module, type = None, info = None, extra=None): + if module != None and self.module == None: + self.set_module(module) + if type != None and self.type == None: + self.set_type(type) + if info != None: + self.set_info(info) + if extra != None: + self.set_extra(extra) + + +class index: + def __init__(self, name = "noname"): + self.name = name; + self.identifiers = {} + self.functions = {} + self.variables = {} + self.includes = {} + self.structs = {} + self.enums = {} + self.typedefs = {} + self.macros = {} + self.references = {} + + def add(self, name, module, static, type, info=None, extra=None): + if name[0:2] == '__': + return None + d = None + try: + d = self.identifiers[name] + d.update(module, type, info, extra) + except: + d = identifier(name, module, type, info, extra) + self.identifiers[name] = d + + if d != None and static == 1: + d.set_static(1) + + if d != None and name != None and type != None: + if type == "function": + self.functions[name] = d + elif type == "functype": + self.functions[name] = d + elif type == "variable": + self.variables[name] = d + elif type == "include": + self.includes[name] = d + elif type == "struct": + self.structs[name] = d + elif type == "enum": + self.enums[name] = d + elif type == "typedef": + self.typedefs[name] = d + elif type == "macro": + self.macros[name] = d + else: + print "Unable to register type ", type + return d + + def merge(self, idx): + for id in idx.functions.keys(): + # + # macro might be used to override functions or variables + # definitions + # + if self.macros.has_key(id): + del self.macros[id] + if self.functions.has_key(id): + print "function %s from %s redeclared in %s" % ( + id, self.functions[id].module, idx.functions[id].module) + else: + self.functions[id] = idx.functions[id] + self.identifiers[id] = idx.functions[id] + for id in idx.variables.keys(): + # + # macro might be used to override functions or variables + # definitions + # + if self.macros.has_key(id): + del self.macros[id] + if self.variables.has_key(id): + print "variable %s from %s redeclared in %s" % ( + id, self.variables[id].module, idx.variables[id].module) + else: + self.variables[id] = idx.variables[id] + self.identifiers[id] = idx.variables[id] + for id in idx.structs.keys(): + if self.structs.has_key(id): + print "struct %s from %s redeclared in %s" % ( + id, self.structs[id].module, idx.structs[id].module) + else: + self.structs[id] = idx.structs[id] + self.identifiers[id] = idx.structs[id] + for id in idx.typedefs.keys(): + if self.typedefs.has_key(id): + print "typedef %s from %s redeclared in %s" % ( + id, self.typedefs[id].module, idx.typedefs[id].module) + else: + self.typedefs[id] = idx.typedefs[id] + self.identifiers[id] = idx.typedefs[id] + for id in idx.macros.keys(): + # + # macro might be used to override functions or variables + # definitions + # + if self.variables.has_key(id): + continue + if self.functions.has_key(id): + continue + if self.enums.has_key(id): + continue + if self.macros.has_key(id): + print "macro %s from %s redeclared in %s" % ( + id, self.macros[id].module, idx.macros[id].module) + else: + self.macros[id] = idx.macros[id] + self.identifiers[id] = idx.macros[id] + for id in idx.enums.keys(): + if self.enums.has_key(id): + print "enum %s from %s redeclared in %s" % ( + id, self.enums[id].module, idx.enums[id].module) + else: + self.enums[id] = idx.enums[id] + self.identifiers[id] = idx.enums[id] + + def merge_public(self, idx): + for id in idx.functions.keys(): + 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 + public = 0 + for name in dict.keys(): + id = dict[name] + count = count + 1 + if id.static == 0: + public = public + 1 + if count != public: + print " %d %s , %d public" % (count, type, public) + elif count != 0: + print " %d public %s" % (count, type) + + + def analyze(self): + self.analyze_dict("functions", self.functions) + self.analyze_dict("variables", self.variables) + self.analyze_dict("structs", self.structs) + self.analyze_dict("typedefs", self.typedefs) + self.analyze_dict("macros", self.macros) + +# +# C parser analysis code +# +ignored_files = { + "trio": "too many non standard macros", + "trio.c": "too many non standard macros", + "trionan.c": "too many non standard macros", + "triostr.c": "too many non standard macros", + "acconfig.h": "generated portability layer", + "config.h": "generated portability layer", + "libxml.h": "internal only", +} + +ignored_words = { + "WINAPI": (0, "Windows keyword"), + "LIBXML_DLL_IMPORT": (0, "Special macro to flag external keywords"), + "__declspec": (3, "Windows keyword"), + "ATTRIBUTE_UNUSED": (0, "macro keyword"), +} + +class CLexer: + """A lexer for the C language, tokenize the input by reading and + analyzing it line by line""" + def __init__(self, input): + self.input = input + self.tokens = [] + self.line = "" + self.lineno = 0 + + def getline(self): + line = '' + while line == '': + line = self.input.readline() + if not line: + return None + self.lineno = self.lineno + 1 + line = string.lstrip(line) + line = string.rstrip(line) + if line == '': + continue + while line[-1] == '\\': + line = line[:-1] + n = self.input.readline() + self.lineno = self.lineno + 1 + n = string.lstrip(n) + n = string.rstrip(n) + if not n: + break + else: + line = line + n + return line + + def getlineno(self): + return self.lineno + + def push(self, token): + self.tokens.insert(0, token); + + def debug(self): + print "Last token: ", self.last + print "Token queue: ", self.tokens + print "Line %d end: " % (self.lineno), self.line + + def token(self): + while self.tokens == []: + if self.line == "": + line = self.getline() + else: + line = self.line + self.line = "" + if line == None: + return None + + if line[0] == '#': + self.tokens = map((lambda x: ('preproc', x)), + string.split(line)) + break; + l = len(line) + if line[0] == '"' or line[0] == "'": + end = line[0] + line = line[1:] + found = 0 + tok = "" + while found == 0: + i = 0 + l = len(line) + while i < l: + if line[i] == end: + self.line = line[i+1:] + line = line[:i] + l = i + found = 1 + break + if line[i] == '\\': + i = i + 1 + i = i + 1 + tok = tok + line + if found == 0: + line = self.getline() + if line == None: + return None + self.last = ('string', tok) + return self.last + + if l >= 2 and line[0] == '/' and line[1] == '*': + line = line[2:] + found = 0 + tok = "" + while found == 0: + i = 0 + l = len(line) + while i < l: + if line[i] == '*' and i+1 < l and line[i+1] == '/': + self.line = line[i+2:] + line = line[:i-1] + l = i + found = 1 + break + i = i + 1 + if tok != "": + tok = tok + "\n" + tok = tok + line + if found == 0: + line = self.getline() + if line == None: + return None + self.last = ('comment', tok) + return self.last + if l >= 2 and line[0] == '/' and line[1] == '/': + line = line[2:] + self.last = ('comment', line) + return self.last + i = 0 + while i < l: + if line[i] == '/' and i+1 < l and line[i+1] == '/': + self.line = line[i:] + line = line[:i] + break + if line[i] == '/' and i+1 < l and line[i+1] == '*': + self.line = line[i:] + line = line[:i] + break + if line[i] == '"' or line[i] == "'": + self.line = line[i:] + line = line[:i] + break + i = i + 1 + l = len(line) + i = 0 + while i < l: + if line[i] == ' ' or line[i] == '\t': + i = i + 1 + continue + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57): + s = i + while i < l: + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57) or string.find( + " \t(){}:;,+-*/%&!|[]=><", line[i]) == -1: + i = i + 1 + else: + break + self.tokens.append(('name', line[s:i])) + continue + if string.find("(){}:;,[]", line[i]) != -1: +# if line[i] == '(' or line[i] == ')' or line[i] == '{' or \ +# line[i] == '}' or line[i] == ':' or line[i] == ';' or \ +# line[i] == ',' or line[i] == '[' or line[i] == ']': + self.tokens.append(('sep', line[i])) + i = i + 1 + continue + if string.find("+-*><=/%&!|.", line[i]) != -1: +# if line[i] == '+' or line[i] == '-' or line[i] == '*' or \ +# line[i] == '>' or line[i] == '<' or line[i] == '=' or \ +# line[i] == '/' or line[i] == '%' or line[i] == '&' or \ +# line[i] == '!' or line[i] == '|' or line[i] == '.': + if line[i] == '.' and i + 2 < l and \ + line[i+1] == '.' and line[i+2] == '.': + self.tokens.append(('name', '...')) + i = i + 3 + continue + + j = i + 1 + if j < l and ( + string.find("+-*><=/%&!|", line[j]) != -1): +# line[j] == '+' or line[j] == '-' or line[j] == '*' or \ +# line[j] == '>' or line[j] == '<' or line[j] == '=' or \ +# line[j] == '/' or line[j] == '%' or line[j] == '&' or \ +# line[j] == '!' or line[j] == '|'): + self.tokens.append(('op', line[i:j+1])) + i = j + 1 + else: + self.tokens.append(('op', line[i])) + i = i + 1 + continue + s = i + while i < l: + o = ord(line[i]) + if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \ + (o >= 48 and o <= 57) or ( + string.find(" \t(){}:;,+-*/%&!|[]=><", line[i]) == -1): +# line[i] != ' ' and line[i] != '\t' and +# line[i] != '(' and line[i] != ')' and +# line[i] != '{' and line[i] != '}' and +# line[i] != ':' and line[i] != ';' and +# line[i] != ',' and line[i] != '+' and +# line[i] != '-' and line[i] != '*' and +# line[i] != '/' and line[i] != '%' and +# line[i] != '&' and line[i] != '!' and +# line[i] != '|' and line[i] != '[' and +# line[i] != ']' and line[i] != '=' and +# line[i] != '*' and line[i] != '>' and +# line[i] != '<'): + i = i + 1 + else: + break + self.tokens.append(('name', line[s:i])) + + tok = self.tokens[0] + self.tokens = self.tokens[1:] + self.last = tok + return tok + +class CParser: + """The C module parser""" + def __init__(self, filename, idx = None): + self.filename = filename + if len(filename) > 2 and filename[-2:] == '.h': + self.is_header = 1 + else: + self.is_header = 0 + self.input = open(filename) + self.lexer = CLexer(self.input) + if idx == None: + self.index = index() + else: + self.index = idx + self.top_comment = "" + self.last_comment = "" + self.comment = None + + def lineno(self): + return self.lexer.getlineno() + + def error(self, msg, token=-1): + print "Parse Error: " + msg + if token != -1: + print "Got token ", token + self.lexer.debug() + sys.exit(1) + + def debug(self, msg, token=-1): + print "Debug: " + msg + if token != -1: + print "Got token ", token + self.lexer.debug() + + def parseComment(self, token): + if self.top_comment == "": + self.top_comment = token[1] + if self.comment == None or token[1][0] == '*': + self.comment = token[1]; + else: + self.comment = self.comment + token[1] + token = self.lexer.token() + return token + + # + # Parse a comment block associate to a macro + # + def parseMacroComment(self, name, quiet = 0): + if name[0:2] == '__': + quiet = 1 + + args = [] + desc = "" + + if self.comment == None: + if not quiet: + print "Missing comment for macro %s" % (name) + return((args, desc)) + if self.comment[0] != '*': + if not quiet: + print "Missing * in macro comment for %s" % (name) + return((args, desc)) + lines = string.split(self.comment, '\n') + if lines[0] == '*': + del lines[0] + if lines[0] != "* %s:" % (name): + if not quiet: + print "Misformatted macro comment for %s" % (name) + print " Expecting '* %s:' got '%s'" % (name, lines[0]) + return((args, desc)) + del lines[0] + while lines[0] == '*': + del lines[0] + while len(lines) > 0 and lines[0][0:3] == '* @': + l = lines[0][3:] + try: + (arg, desc) = string.split(l, ':', 1) + desc=string.strip(desc) + arg=string.strip(arg) + except: + if not quiet: + print "Misformatted macro comment for %s" % (name) + print " problem with '%s'" % (lines[0]) + del lines[0] + continue + del lines[0] + l = string.strip(lines[0]) + while len(l) > 2 and l[0:3] != '* @': + while l[0] == '*': + l = l[1:] + desc = desc + ' ' + string.strip(l) + del lines[0] + if len(lines) == 0: + break + l = lines[0] + args.append((arg, desc)) + while len(lines) > 0 and lines[0] == '*': + del lines[0] + desc = "" + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = string.strip(l) + desc = desc + " " + l + del lines[0] + + desc = string.strip(desc) + + if quiet == 0: + if desc == "": + print "Macro comment for %s lack description of the macro" % (name) + + return((args, desc)) + + # + # Parse a comment block and merge the informations found in the + # parameters descriptions, finally returns a block as complete + # as possible + # + def mergeFunctionComment(self, name, description, quiet = 0): + if name == 'main': + quiet = 1 + if name[0:2] == '__': + quiet = 1 + + (ret, args) = description + desc = "" + retdesc = "" + + if self.comment == None: + if not quiet: + print "Missing comment for function %s" % (name) + return(((ret[0], retdesc), args, desc)) + if self.comment[0] != '*': + if not quiet: + print "Missing * in function comment for %s" % (name) + return(((ret[0], retdesc), args, desc)) + lines = string.split(self.comment, '\n') + if lines[0] == '*': + del lines[0] + if lines[0] != "* %s:" % (name): + if not quiet: + print "Misformatted function comment for %s" % (name) + print " Expecting '* %s:' got '%s'" % (name, lines[0]) + return(((ret[0], retdesc), args, desc)) + del lines[0] + while lines[0] == '*': + del lines[0] + nbargs = len(args) + while len(lines) > 0 and lines[0][0:3] == '* @': + l = lines[0][3:] + try: + (arg, desc) = string.split(l, ':', 1) + desc=string.strip(desc) + arg=string.strip(arg) + except: + if not quiet: + print "Misformatted function comment for %s" % (name) + print " problem with '%s'" % (lines[0]) + del lines[0] + continue + del lines[0] + l = string.strip(lines[0]) + while len(l) > 2 and l[0:3] != '* @': + while l[0] == '*': + l = l[1:] + desc = desc + ' ' + string.strip(l) + del lines[0] + if len(lines) == 0: + break + l = lines[0] + i = 0 + while i < nbargs: + if args[i][1] == arg: + args[i] = (args[i][0], arg, desc) + break; + i = i + 1 + if i >= nbargs: + if not quiet: + print "Uname to find arg %s from function comment for %s" % ( + arg, name) + while len(lines) > 0 and lines[0] == '*': + del lines[0] + desc = "" + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = string.strip(l) + if len(l) >= 6 and l[0:6] == "return" or l[0:6] == "Return": + try: + l = string.split(l, ' ', 1)[1] + except: + l = "" + retdesc = string.strip(l) + del lines[0] + while len(lines) > 0: + l = lines[0] + while len(l) > 0 and l[0] == '*': + l = l[1:] + l = string.strip(l) + retdesc = retdesc + " " + l + del lines[0] + else: + desc = desc + " " + l + del lines[0] + + retdesc = string.strip(retdesc) + desc = string.strip(desc) + + if quiet == 0: + # + # report missing comments + # + i = 0 + while i < nbargs: + if args[i][2] == None and args[i][0] != "void" and args[i][1] != None: + print "Function comment for %s lack description of arg %s" % (name, args[i][1]) + i = i + 1 + if retdesc == "" and ret[0] != "void": + print "Function comment for %s lack description of return value" % (name) + if desc == "": + print "Function comment for %s lack description of the function" % (name) + + + return(((ret[0], retdesc), args, desc)) + + def parsePreproc(self, token): + name = token[1] + if name == "#include": + token = self.lexer.token() + if token == None: + return None + if token[0] == 'preproc': + self.index.add(token[1], self.filename, not self.is_header, + "include") + return self.lexer.token() + return token + if name == "#define": + token = self.lexer.token() + if token == None: + return None + if token[0] == 'preproc': + # TODO macros with arguments + name = token[1] + lst = [] + token = self.lexer.token() + while token != None and token[0] == 'preproc' and \ + token[1][0] != '#': + lst.append(token[1]) + token = self.lexer.token() + try: + name = string.split(name, '(') [0] + except: + pass + info = self.parseMacroComment(name, not self.is_header) + self.index.add(name, self.filename, not self.is_header, + "macro", info) + return token + token = self.lexer.token() + while token != None and token[0] == 'preproc' and \ + token[1][0] != '#': + token = self.lexer.token() + return token + + # + # token acquisition on top of the lexer, it handle internally + # preprocessor and comments since they are logically not part of + # the program structure. + # + def token(self): + global ignored_words + + token = self.lexer.token() + while token != None: + if token[0] == 'comment': + token = self.parseComment(token) + continue + elif token[0] == 'preproc': + token = self.parsePreproc(token) + continue + elif token[0] == "name" and ignored_words.has_key(token[1]): + (n, info) = ignored_words[token[1]] + i = 0 + while i < n: + token = self.lexer.token() + i = i + 1 + token = self.lexer.token() + continue + else: + #print "=> ", token + return token + return None + + # + # Parse a typedef, it records the type and its name. + # + def parseTypedef(self, token): + if token == None: + return None + token = self.parseType(token) + if token == None: + self.error("parsing typedef") + return None + base_type = self.type + type = base_type + #self.debug("end typedef type", token) + while token != None: + if token[0] == "name": + name = token[1] + signature = self.signature + if signature != None: + d = self.mergeFunctionComment(name, + ((type, None), signature), 1) + self.index.add(name, self.filename, not self.is_header, + "functype", d) + else: + if base_type == "struct": + self.index.add(name, self.filename, not self.is_header, + "struct", type) + base_type = "struct " + name + else: + self.index.add(name, self.filename, not self.is_header, + "typedef", type) + token = self.token() + else: + self.error("parsing typedef: expecting a name") + return token + #self.debug("end typedef", token) + if token != None and token[0] == 'sep' and token[1] == ',': + type = base_type + token = self.token() + while token != None and token[0] == "op": + type = type + token[1] + token = self.token() + elif token != None and token[0] == 'sep' and token[1] == ';': + break; + elif token != None and token[0] == 'name': + type = base_type + continue; + else: + self.error("parsing typedef: expecting ';'", token) + return token + token = self.token() + return token + + # + # Parse a C code block, used for functions it parse till + # the balancing } included + # + def parseBlock(self, token): + while token != None: + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseBlock(token) + elif token[0] == "sep" and token[1] == "}": + self.comment = None + token = self.token() + return token + else: + token = self.token() + return token + + # + # Parse a C struct definition till the balancing } + # + def parseStruct(self, token): + fields = [] + #self.debug("start parseStruct", token) + while token != None: + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + self.struct_fields = fields + #self.debug("end parseStruct", token) + #print fields + token = self.token() + return token + else: + base_type = self.type + #self.debug("before parseType", token) + token = self.parseType(token) + #self.debug("after parseType", token) + if token != None and token[0] == "name": + fname = token[1] + token = self.token() + if token[0] == "sep" and token[1] == ";": + self.comment = None + token = self.token() + fields.append((self.type, fname, self.comment)) + self.comment = None + else: + self.error("parseStruct: expecting ;", token) + elif token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + if token != None and token[0] == "name": + token = self.token() + if token != None and token[0] == "sep" and token[1] == ";": + token = self.token() + else: + self.error("parseStruct: expecting ;", token) + else: + self.error("parseStruct: name", token) + token = self.token() + self.type = base_type; + self.struct_fields = fields + #self.debug("end parseStruct", token) + #print fields + return token + + # + # Parse a C enum block, parse till the balancing } + # + def parseEnumBlock(self, token): + self.enums = [] + name = None + self.comment = None + comment = "" + value = "" + while token != None: + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + if name != None: + if self.comment != None: + comment = self.comment + self.comment = None + self.enums.append((name, value, comment)) + token = self.token() + return token + elif token[0] == "name": + if name != None: + if self.comment != None: + comment = string.strip(self.comment) + self.comment = None + self.enums.append((name, value, comment)) + name = token[1] + comment = "" + value = "" + token = self.token() + if token[0] == "op" and token[1][0] == "=": + if len(token[1]) > 1: + value = token[1][1:] + token = self.token() + while token[0] != "sep" or (token[1] != ',' and + token[1] != '}'): + value = value + token[1] + token = self.token() + if token[0] == "sep" and token[1] == ",": + token = self.token() + else: + token = self.token() + return token + + # + # Parse a C definition block, used for structs it parse till + # the balancing } + # + def parseTypeBlock(self, token): + while token != None: + if token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseTypeBlock(token) + elif token[0] == "sep" and token[1] == "}": + token = self.token() + return token + else: + token = self.token() + return token + + # + # Parse a type: the fact that the type name can either occur after + # the definition or within the definition makes it a little harder + # if inside, the name token is pushed back before returning + # + def parseType(self, token): + self.type = "" + self.struct_fields = [] + self.signature = None + if token == None: + return token + + while token[0] == "name" and ( + token[1] == "const" or token[1] == "unsigned"): + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + token = self.token() + + if token[0] == "name" and (token[1] == "long" or token[1] == "short"): + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + if token[0] == "name" and token[1] == "int": + if self.type == "": + self.type = tmp[1] + else: + self.type = self.type + " " + tmp[1] + + elif token[0] == "name" and token[1] == "struct": + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + token = self.token() + nametok = None + if token[0] == "name": + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseStruct(token) + elif token != None and token[0] == "op" and token[1] == "*": + self.type = self.type + " " + nametok[1] + " *" + token = self.token() + while token != None and token[0] == "op" and token[1] == "*": + self.type = self.type + " *" + token = self.token() + if token[0] == "name": + nametok = token + token = self.token() + else: + self.error("struct : expecting name", token) + return token + elif token != None and token[0] == "name" and nametok != None: + self.type = self.type + " " + nametok[1] + return token + + if nametok != None: + self.lexer.push(token) + token = nametok + return token + + elif token[0] == "name" and token[1] == "enum": + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + self.enums = [] + token = self.token() + if token != None and token[0] == "sep" and token[1] == "{": + token = self.token() + token = self.parseEnumBlock(token) + else: + self.error("parsing enum: expecting '{'", token) + enum_type = None + if token != None and token[0] != "name": + self.lexer.push(token) + token = ("name", "enum") + else: + enum_type = token[1] + for enum in self.enums: + self.index.add(enum[0], self.filename, + not self.is_header, "enum", + (enum[1], enum[2], enum_type)) + return token + + elif token[0] == "name": + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + else: + self.error("parsing type %s: expecting a name" % (self.type), + token) + return token + token = self.token() + while token != None and (token[0] == "op" or + token[0] == "name" and token[1] == "const"): + self.type = self.type + " " + token[1] + token = self.token() + + # + # if there is a parenthesis here, this means a function type + # + if token != None and token[0] == "sep" and token[1] == '(': + self.type = self.type + token[1] + token = self.token() + while token != None and token[0] == "op" and token[1] == '*': + self.type = self.type + token[1] + token = self.token() + if token == None or token[0] != "name" : + self.error("parsing function type, name expected", token); + return token + self.type = self.type + token[1] + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == ')': + self.type = self.type + token[1] + token = self.token() + if token != None and token[0] == "sep" and token[1] == '(': + token = self.token() + type = self.type; + token = self.parseSignature(token); + self.type = type; + else: + self.error("parsing function type, '(' expected", token); + return token + else: + self.error("parsing function type, ')' expected", token); + return token + self.lexer.push(token) + token = nametok + return token + + # + # do some lookahead for arrays + # + if token != None and token[0] == "name": + nametok = token + token = self.token() + if token != None and token[0] == "sep" and token[1] == '[': + self.type = self.type + nametok[1] + while token != None and token[0] == "sep" and token[1] == '[': + self.type = self.type + token[1] + token = self.token() + while token != None and token[0] != 'sep' and \ + token[1] != ']' and token[1] != ';': + self.type = self.type + token[1] + token = self.token() + if token != None and token[0] == 'sep' and token[1] == ']': + self.type = self.type + token[1] + token = self.token() + else: + self.error("parsing array type, ']' expected", token); + return token + elif token != None and token[0] == "sep" and token[1] == ':': + # remove :12 in case it's a limited int size + token = self.token() + token = self.token() + self.lexer.push(token) + token = nametok + + return token + + # + # Parse a signature: '(' has been parsed and we scan the type definition + # up to the ')' included + def parseSignature(self, token): + signature = [] + if token != None and token[0] == "sep" and token[1] == ')': + self.signature = [] + token = self.token() + return token + while token != None: + token = self.parseType(token) + if token != None and token[0] == "name": + signature.append((self.type, token[1], None)) + token = self.token() + elif token != None and token[0] == "sep" and token[1] == ',': + token = self.token() + continue + elif token != None and token[0] == "sep" and token[1] == ')': + # only the type was provided + if self.type == "...": + signature.append((self.type, "...", None)) + else: + signature.append((self.type, None, None)) + if token != None and token[0] == "sep": + if token[1] == ',': + token = self.token() + continue + elif token[1] == ')': + token = self.token() + break + self.signature = signature + return token + + # + # Parse a global definition, be it a type, variable or function + # the extern "C" blocks are a bit nasty and require it to recurse. + # + def parseGlobal(self, token): + static = 0 + if token[1] == 'extern': + token = self.token() + if token == None: + return token + if token[0] == 'string': + if token[1] == 'C': + token = self.token() + if token == None: + return token + if token[0] == 'sep' and token[1] == "{": + token = self.token() +# print 'Entering extern "C line ', self.lineno() + while token != None and (token[0] != 'sep' or + token[1] != "}"): + if token[0] == 'name': + token = self.parseGlobal(token) + else: + self.error( + "token %s %s unexpected at the top level" % ( + token[0], token[1])) + token = self.parseGlobal(token) +# print 'Exiting extern "C" line', self.lineno() + token = self.token() + return token + else: + return token + elif token[1] == 'static': + static = 1 + token = self.token() + if token == None or token[0] != 'name': + return token + + if token[1] == 'typedef': + token = self.token() + return self.parseTypedef(token) + else: + token = self.parseType(token) + type_orig = self.type + if token == None or token[0] != "name": + return token + type = type_orig + self.name = token[1] + token = self.token() + while token != None and (token[0] == "sep" or token[0] == "op"): + if token[0] == "sep": + if token[1] == "[": + type = type + token[1] + token = self.token() + while token != None and (token[0] != "sep" or \ + token[1] != ";"): + type = type + token[1] + token = self.token() + + if token != None and token[0] == "op" and token[1] == "=": + # + # Skip the initialization of the variable + # + token = self.token() + if token[0] == 'sep' and token[1] == '{': + token = self.token() + token = self.parseBlock(token) + else: + self.comment = None + while token != None and (token[0] != "sep" or \ + (token[1] != ';' and token[1] != ',')): + token = self.token() + self.comment = None + if token == None or token[0] != "sep" or (token[1] != ';' and + token[1] != ','): + self.error("missing ';' or ',' after value") + + if token != None and token[0] == "sep": + if token[1] == ";": + self.comment = None + token = self.token() + if type == "struct": + self.index.add(self.name, self.filename, + not self.is_header, "struct", self.struct_fields) + else: + self.index.add(self.name, self.filename, + not self.is_header, "variable", type) + break + elif token[1] == "(": + token = self.token() + token = self.parseSignature(token) + if token == None: + return None + if token[0] == "sep" and token[1] == ";": + d = self.mergeFunctionComment(self.name, + ((type, None), self.signature), 1) + self.index.add(self.name, self.filename, static, + "function", d) + token = self.token() + if token[0] == "sep" and token[1] == "{": + d = self.mergeFunctionComment(self.name, + ((type, None), self.signature), static) + self.index.add(self.name, self.filename, static, + "function", d) + token = self.token() + token = self.parseBlock(token); + elif token[1] == ',': + self.comment = None + self.index.add(self.name, self.filename, static, + "variable", type) + type = type_orig + token = self.token() + while token != None and token[0] == "sep": + type = type + token[1] + token = self.token() + if token != None and token[0] == "name": + self.name = token[1] + token = self.token() + else: + break + + return token + + def parse(self): + print "Parsing %s" % (self.filename) + token = self.token() + while token != None: + if token[0] == 'name': + token = self.parseGlobal(token) + else: + self.error("token %s %s unexpected at the top level" % ( + token[0], token[1])) + token = self.parseGlobal(token) + return + return self.index + + +class docBuilder: + """A documentation builder""" + def __init__(self, name, directories=['.'], excludes=[]): + self.name = name + self.directories = directories + self.excludes = excludes + ignored_files.keys() + self.modules = {} + self.headers = {} + self.idx = index() + + def analyze(self): + print "Project %s : %d headers, %d modules" % (self.name, len(self.headers.keys()), len(self.modules.keys())) + self.idx.analyze() + + def scanHeaders(self): + for header in self.headers.keys(): + parser = CParser(header) + idx = parser.parse() + self.headers[header] = idx; + self.idx.merge(idx) + + def scanModules(self): + for module in self.modules.keys(): + parser = CParser(module) + idx = parser.parse() + # idx.analyze() + self.modules[module] = idx + self.idx.merge_public(idx) + + def scan(self): + for directory in self.directories: + files = glob.glob(directory + "/*.c") + for file in files: + skip = 0 + for excl in self.excludes: + if string.find(file, excl) != -1: + skip = 1; + break + if skip == 0: + self.modules[file] = None; + files = glob.glob(directory + "/*.h") + for file in files: + skip = 0 + for excl in self.excludes: + if string.find(file, excl) != -1: + skip = 1; + break + if skip == 0: + self.headers[file] = None; + self.scanHeaders() + self.scanModules() + + def modulename_file(self, file): + module = string.split(file, '/')[-1] + if module[-2:] == '.h': + module = module[:-2] + return module + + def serialize_enum(self, output, name): + id = self.idx.enums[name] + output.write(" \n") + + def serialize_macro(self, output, name): + id = self.idx.macros[name] + output.write(" \n" % (name, + self.modulename_file(id.module))) + if id.info != None: + try: + (args, desc) = id.info + if desc != None and desc != "": + output.write(" %s\n" % (escape(desc))) + for arg in args: + (name, desc) = arg + if desc != None and desc != "": + output.write(" \n" % ( + name, escape(desc))) + else: + output.write(" \n" % (name)) + except: + pass + output.write(" \n") + + def serialize_typedef(self, output, name): + id = self.idx.typedefs[name] + if id.info[0:7] == 'struct ': + 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)) + output.write(" \n") + else: + output.write("/>\n"); + else : + output.write(" \n" % ( + name, self.modulename_file(id.module), id.info)) + + def serialize_function(self, output, name): + id = self.idx.functions[name] + output.write(" <%s name='%s' file='%s'>\n" % (id.type, name, + self.modulename_file(id.module))) + try: + (ret, params, desc) = id.info + output.write(" %s\n" % (escape(desc))) + if ret[0] != None: + if ret[0] == "void": + output.write(" \n") + else: + output.write(" \n" % ( + ret[0], escape(ret[1]))) + for param in params: + if param[0] == 'void': + continue + if param[2] == None: + output.write(" \n" % (param[1], param[0])) + else: + output.write(" \n" % (param[1], param[0], escape(param[2]))) + except: + print "Failed to save function %s info: " % name, `id.info` + output.write(" \n" % (id.type)) + + def serialize_exports(self, output, file): + module = self.modulename_file(file) + output.write(" \n" % (module)) + dict = self.headers[file] + ids = dict.functions.keys() + dict.variables.keys() + \ + dict.macros.keys() + dict.typedefs.keys() + \ + dict.structs.keys() + dict.enums.keys() + ids.sort() + for id in ids: + output.write(" \n" % (id)) + output.write(" \n") + + + def serialize(self, filename = None): + if filename == None: + filename = "%s-api.xml" % self.name + print "Saving XML description %s" % (filename) + output = open(filename, "w") + output.write('\n') + output.write("\n" % self.name) + output.write(" \n") + for file in self.headers.keys(): + self.serialize_exports(output, file) + output.write(" \n") + output.write(" \n") + macros = self.idx.macros.keys() + macros.sort() + for macro in macros: + self.serialize_macro(output, macro) + enums = self.idx.enums.keys() + enums.sort() + for enum in enums: + self.serialize_enum(output, enum) + typedefs = self.idx.typedefs.keys() + typedefs.sort() + for typedef in typedefs: + self.serialize_typedef(output, typedef) + functions = self.idx.functions.keys() + functions.sort() + for function in functions: + self.serialize_function(output, function) + output.write(" \n") + output.write("\n") + output.close() + + +def rebuild(): + builder = None + if glob.glob("../parser.c") != [] : + print "Rebuilding API description for libxml2" + builder = docBuilder("libxml2", ["..", "../include/libxml"], + ["xmlwin32version.h", "tst.c"]) + elif glob.glob("../libxslt/transform.c") != [] : + print "Rebuilding API description for libxslt" + builder = docBuilder("libxslt", ["../libxslt"], + ["win32config.h", "tst.c"]) + else: + print "rebuild() failed, unable to guess the module" + return None + builder.scan() + builder.analyze() + builder.serialize() + return builder + +# +# for debugging the parser +# +def parse(filename): + parser = CParser(filename) + idx = parser.parse() + return idx + +if __name__ == "__main__": + rebuild() diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml index dd68decc..9daca49d 100644 --- a/doc/libxml2-api.xml +++ b/doc/libxml2-api.xml @@ -1,851 +1,1755 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + - - - - - + + - + + + + + - - - - - - - + + - + + + + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + - - - - + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + - - - - - - - - - - - - - - + - + + + + + + + + + - - - - - - - - - - - - - - + - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -856,6 +1760,7 @@ + @@ -871,6 +1776,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -910,8 +1852,8 @@ - + @@ -944,639 +1886,81 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1600,7 +1984,7 @@ Macro to check that the number of args passed to an XPath function matches. - + Macro to return from the function if an XPath error was detected. @@ -1610,88 +1994,18 @@ Macro to check that the value on top of the XPath stack is of a given type. - + Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure - + - DEBUG_MEMORY replaces the allocator with a collect and debug shell to the libc allocator. DEBUG_MEMORY should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. + DEBUG_MEMORY replaces the allocator with a collect and debug shell to the libc allocator. DEBUG_MEMORY should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define DEBUG_MEMORY_LOCATION Whether the memory debugging is configured in - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document. @@ -1711,43 +2025,42 @@ The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors. - Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ... - + Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ... + - Macro to check the following production in the XML spec: [3] S ::= (x20 | x9 | xD | xA)+ - + Macro to check the following production in the XML spec: [3] S ::= (#x20 | #x9 | #xD | #xA)+ + - Macro to check the following production in the XML spec: [2] Char ::= x9 | xA | xD | [x20-xD7FF] | [xE000-xFFFD] | [x10000-x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - + Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. + - Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ... - + Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ... + - Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ... - + Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ... + - Macro to check the following production in the XML spec: [89] Extender ::= x00B7 | x02D0 | x02D1 | x0387 | x0640 | x0E46 | x0EC6 | x3005 | [x3031-x3035] | [x309D-x309E] | [x30FC-x30FE] - + Macro to check the following production in the XML spec: [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE] + - Macro to check the following production in the XML spec: [86] Ideographic ::= [x4E00-x9FA5] | x3007 | [x3021-x3029] - + Macro to check the following production in the XML spec: [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] + - Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic - + Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic + - Macro to check the following production in the XML spec: [13] PubidChar ::= x20 | xD | xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] - + Macro to check the following production in the XML spec: [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] + - Whether the automata interfaces are compiled in Whether the Canonicalization support is configured in @@ -1780,10 +2093,8 @@ Whether iconv support is available - Whether the regular expressions interfaces are compiled in - Whether the Schemas validation interfaces are compiled in Macro to check that the libxml version in use is compatible with the version the software has been compiled against @@ -1792,7 +2103,6 @@ Whether the thread support is configured in - Whether the Unicode related interfaces are compiled in the version number: 1.2.3 value is 1002003 @@ -1809,115 +2119,29 @@ Whether XPointer is configured in - - Skips to the next '>' char. - + Skips to the next '<' char. - - - - - - - - - - - - - - - + Skips the end of line chars. - + - - - - Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML 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. - - - - - - defined if the trio support should not be configured in - defined if the trio support need to be configured in - - - - - - - - - - - - - - - - - - The namespace for the XML Catalogs elements. The specific XML Catalog Processing Instuction name. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue. @@ -1927,164 +2151,18 @@ Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Macro to extract the content pointer of a node. - Macro to extract the line number of an element node. This will work only if line numbering is activated by calling xmlLineNumbersDefault(1) before parsing. - - - - - A namespace declaration node. Identifiers can be longer, but this will be more costly at runtime. - - - - - - - - - - - - - - - - - - - - - @@ -2092,73 +2170,47 @@ + 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. @@ -2171,444 +2223,1554 @@ Whether general entities need to be substituted. - - - - - This is the namespace for the special xml: prefix predefined in the XML Namespace specification. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Macro to raise an XPath error and return. - + Macro to raise an XPath error and return 0. - + + + + + Macro for compatibility naming layer with libxml1. + + + Macro for compatibility naming layer with libxml1. + + + Check if an XPath error was raised. Returns true if an error has been raised, false otherwise. + + + + Empties a node-set. + + + + Get the context node of an XPath context. Returns the context node. + + + + Get the document of an XPath context. Returns the context document. + + + + Get the error code of an XPath context. Returns the context error. + + + + Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set. + + + + Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set. + + + + Implements a functionality similar to the DOM NodeList.item(). Returns the xmlNodePtr at the given @index in @ns or NULL if @index is out of range (0 to length-1) + + + + + Pushes the boolean @val on the context stack. + + + + + Pushes an empty node-set on the context stack. + + + + Pushes an empty string on the stack. + + + + Pushes user data on the context stack. + + + + + Pushes false on the context stack. + + + + Pushes the node-set @ns on the context stack. + + + + + Pushes the double @val on the context stack. + + + + + Pushes the string @str on the context stack. + + + + + Pushes true on the context stack. + + + + Raises an XPATH_INVALID_ARITY error. + + + + Raises an error. + + + + + Raises an XPATH_INVALID_TYPE error. + + + + Checks if the current value on the XPath stack is an external object. Returns true if the current object on the stack is an external object. + + + + Check if the current value on the XPath stack is a node set or an XSLT value tree. Returns true if the current object on the stack is a node-set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out. + + + + + + + + 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. + + + + + + Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. - - - + + + An attribute definition has been parsed - - - - - - - + + + + + + + An attribute definition has been parsed. - - - - - - - - + + + + + + + + Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. - - - - + + + + called when a pcdata block has been parsed - - - + + + Called when a pcdata block has been parsed. - - - - + + + + receiving some chars from the parser. - - - + + + Receiving some chars from the parser. - - - - + + + + Check that the current element namespace is the same as the one read upon parsing. - - - - - - - + + + A comment has been parsed. - - + + A comment has been parsed. - - - + + + Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - - + + + - Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, size should be >= 4 The value of filename is used for fetching external entities and error/warning reports. - - - - - - - + Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports. + + + + + + + - - Default handler for SGML DocBook, builds the DOM tree - Initialize the default SAX handler - Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out. - - - - - - + + + + + + Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed. - + - Parse a Chunk of memory - - - - - + + + + + parse an SGML in-memory document and build a tree. - - - + + + parse an SGML document (and build a tree if using the standard SAX interface). - - + + parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - - + + + - - - - - - - parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - - + + + + + parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - - + + + + + An element definition has been parsed - - - - + + + + An element definition has been parsed. - - - - - + + + + + called when the document end has been detected. - + Called when the document end has been detected. - - + + called when the end of an element has been detected. - - + + Called when the end of an element has been detected. - - - + + + An entity definition has been parsed - - - - - - + + + + + + An entity definition has been parsed. - - - - - - - + + + + + + + Display and format an error messages, callback. - - - - + + + + Callback on external subset declaration. - - - - + + + + Callback on external subset declaration. - - - - - + + + + + Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors. - - - - + + + + A callback for the xmlNanoFTPGet command. - - - - + + + + A callback for the xmlNanoFTPList command. Note that only one of year and day:minute are specified. - - - - - - - - - - - - - + + + + + + + + + + + + + - Return the column number of the current parsing point. - - + Provide the column number of the current parsing point. + + Get an entity by name - - - + + + Get an entity by name. - - - + + + - Return the line number of the current parsing point. - - + Provide the line number of the current parsing point. + + Get the current element namespace. - - + + Get a parameter entity by name - - - + + + Get a parameter entity by name. - - - + + + - Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" - - + Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" + + - Return the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd - - - - - - + Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd + + An old global namespace has been parsed. - - - + + + Does this document has an external subset - - + + Does this document has an external subset? - - + + Does this document has an internal subset - - + + Does this document has an internal subset. - - + + The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag. - - - - + + + + Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - - + + + - Create a parser context for using the HTML parser in push mode To allow content encoding detection, size should be >= 4 The value of filename is used for fetching external entities and error/warning reports. - - - - - - - + Create a parser context for using the HTML parser in push mode To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports. + + + + + + + + + + Substitute the HTML entities by their value DEPRECATED !!!! + + + + + + - - Default handler for HTML, builds the DOM tree - Initialize the default SAX handler @@ -2616,69 +3778,64 @@ Dump an HTML document. - - - - + + + + Dump an HTML document. Formating return/spaces are added. - - - + + + Dump an HTML document to an open FILE. - - - + + + Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory. - - - + + + - - - Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out. - - - - - - + + + + + + - - - Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed. - - + Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed. + + - Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed. - - + Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed. + + Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed. - + Encoding definition lookup in the Meta tags - - + + Set and return the previous value for handling HTML omitted tags. - - + + Initialize the htmlStartCloseIndex for fast lookup of closing tags names. This is not reentrant. Call xmlInitParser() once before processing in case of use in multithreaded programs. @@ -2686,1049 +3843,1071 @@ The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child - - - + + + Determine if a given attribute is a boolean attribute. - - + + Check if an attribute is of content type Script - - + + Creates a new HTML document - - - + + + - Creates a new HTML document without a DTD node if URI and ExternalID are NULL - - - + Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL + + + Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added. - - - - + + + + Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added. - - - + + + - Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding - - - - - - + Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding + + + + + + Dump an HTML node, recursive behaviour,children are printed too. - - - - - + + + + + + + + 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]+ ';' - - + parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' + + Parse a Chunk of memory - - - - - + + + + + parse an HTML in-memory document and build a tree. - - - + + + parse an HTML document (and build a tree if using the standard SAX interface). - - + + - parse an HTML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue + parse an HTML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue - + - parse an HTML ENTITY references [68] EntityRef ::= '&' Name ';' - - - + parse an HTML ENTITY references [68] EntityRef ::= '&' Name ';' + + + parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - - + + + - - - - - - - Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree. - - - - - + + + + + parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - - + + + + + - Dump an HTML document to a file. If filename is "-" the stdout file is used. - - - + Dump an HTML document to a file. If @filename is "-" the stdout file is used. + + + Dump an HTML document to a file using a given encoding and formatting returns/spaces are added. - - - - + + + + Dump an HTML document to a file using a given encoding. - - - - - + + + + + Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated. - - - + + + Lookup the HTML tag in the ElementTable - - + + receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters - - - + + + Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters. - - - - + + + + Set or reset (if NULL) the default handler for generic errors - + Initialize the default DocBook SAX handler - + Initialize the default HTML SAX handler - + Initialize the default XML SAX handler - - + + Pops the top parser input from the input stack - - + + Pushes a new parser input on top of the input stack - - - + + + Callback on internal subset declaration. - - - - + + + + Callback on internal subset declaration. - - - - - + + + + + Is this document tagged standalone ? - - + + Is this document tagged standalone? - - + + Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out. - - - - - + + + + + + + + + + + Pops the top element name from the name stack - - + + Pushes a new element name on top of the name stack - - - + + + A namespace has been parsed. - - - + + + Pops the top element node from the node stack - - + + Pushes a new element node on top of the node stack - - - + + + What to do when a notation declaration has been parsed. - - - - + + + + What to do when a notation declaration has been parsed. - - - - - + + + + + - - Global setting, DEPRECATED. - - - - - - - - - - A processing instruction has been parsed. - - - + + + A processing instruction has been parsed. - - - - + + + + - - - - - - called when an entity reference is detected. - - + + Called when an entity reference is detected. - - - + + + The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine - - - - + + + + Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine - - - - + + + + Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case. - - + + Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case. - - - + + + Set the current element namespace. - - + + - - called when the document start being processed. - + Called when the document start being processed. - - + + called when an opening tag has been processed. - - - + + + Called when an opening tag has been processed. - - - - + + + + - - - - What to do when an unparsed entity declaration is parsed - - - - - + + + + + What to do when an unparsed entity declaration is parsed. - - - - - - + + + + + + Pops the top XPath object from the value stack - - + + Pushes a new XPath object on top of the value stack - - - + + + - - Display and format a warning messages, callback. - - - - + + + + - - - - - + + This is the prototype for a extended link detection callback. + + + + + + + + + + + + + + + + + This is the prototype for a extended link set detection callback. + + + + + + + + + + + + Get the default xlink detection routine + + + Get the default xlink handler. + + + + Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don't try to do full checking of the link validity but tries to detect and return the appropriate link type. + + + + + + This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection. + + + + + + Set the default xlink detection routine + + + + + Set the default xlink handlers + + + + + This is the prototype for a simple link detection callback. + + + + + + + - Add an entry in the catalog, it may overwrite existing but different entries. - - - - - + + + + + + - Free up all the memory associated with catalogs + - - + + - Remove an entry from the catalog - - - + + + + - Do a complete resolution lookup of an External Identifier - - - - + + + + + - Try to lookup the system ID associated to a public ID in that catalog - - - + + + + - Try to lookup the catalog resource for a system ID - - - + + + + - Do a complete resolution lookup of an URI - - - + + + + - Register a new attribute declaration Note that tree becomes the ownership of the DTD - - - - - - - - - - + Register a new attribute declaration Note that @tree becomes the ownership of the DTD + + + + + + + + + + - Add a new node to parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case cur is freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. - - - + Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. + + + - Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (cur may be freed) - - - + Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed) + + + Register a new entity for this document. - - - - - - - + + + + + + + Register a new entity for this document DTD external subset. - - - - - - - + + + + + + + Register a new element declaration - - - - - - + + + + + + - Registers and alias alias for an encoding named name. Existing alias will be overwritten. - - - + Registers and alias @alias for an encoding named @name. Existing alias will be overwritten. + + + Register a new id declaration - - - - - + + + + + - Add a new node elem as the next sibling of cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. - - - + Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. + + + Register a new notation declaration - - - - - - + + + + + + - Add a new node elem as the previous sibling of cur merging adjacent TEXT nodes (elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. - - - + Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. + + + Register a new ref declaration - - - - - + + + + + - Add a new element elem to the list of siblings of cur merging adjacent TEXT nodes (elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context. - - - + Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context. + + + Create a buffered parser output - - + + Create a buffered parser input for progressive parsing - - + + - - - - - - - - Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point. - - + + - - + Initial state lookup + + Checks if an automata is determinist. - - + + - If to is NULL, this create first a new target state in the automata and then adds a an ALL transition from the from state to the target state. That transition is an epsilon transition allowed only when all transitions from the from node have been activated. - - - - - + If @to is NULL, this create first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated. + + + + + - If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by a succession of input of value token and whose number is between min and max - - - - - - - - + If @to is NULL, this create first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max + + + + + + + + - If to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the from state to the target state which will increment the counter provided - - - - - + If @to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided + + + + + Create a new counter - - - - + + + + - If to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the from state to the target state which will be allowed only if the counter is within the right range. - - - - - + If @to is NULL, this create first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range. + + + + + - - - - + If @to is NULL, this create first a new target state in the automata and then adds a an epsilon transition from the @from state to the target state + + + + - If to is NULL, this create first a new target state in the automata and then adds a transition from the from state to the target state activated by a succession of input of value token and whose number is between min and max, moreover that transistion can only be crossed once. - - - - - - - - + If @to is NULL, this create first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transistion can only be crossed once. + + + + + + + + Create a new disconnected state in the automata - - + + - If to is NULL, this create first a new target state in the automata and then adds a an epsilon transition from the from state to the target state - - - - - - + If @to is NULL, this create first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token + + + + + + - Makes that state a final state - - - + + + + + + Convenient way to turn bool into text + + - - - Add a string range to an XML buffer. if len == -1, the length of str is recomputed. - - - + + + - Add a string range to the beginning of an XML buffer. if len == -1, the length of str is recomputed. + Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed. - - - + + + - - Global setting, default allocation policy for buffers, default is XML_BUFFER_ALLOC_EXACT - - Append a zero terminated C string to an XML buffer. - - + + Append a zero terminated string to an XML buffer. - - + + Function to extract the content of a buffer - - + + routine to create an XML buffer. - + routine to create an XML buffer. - - + + - Dumps an XML buffer to a FILE *. - - - + Dumps an XML buffer to a FILE *. + + + empty a buffer. - + Frees an XML buffer. It frees both the content and the structure which encapsulate it. - + Grow the available space of an XML buffer. - - - + + + Function to get the length of a buffer - - + + - - Resize a buffer to accommodate minimum size of size. - - - + Resize a buffer to accommodate minimum size of @size. + + + Sets the allocation scheme for this buffer - - + + Remove the beginning of an XML buffer. - - - + + + routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer. - - + + routine which manage and grows an output buffer. This one add C chars at the end of the array. - - + + - routine which manage and grows an output buffer. This one writes a quoted or double quoted xmlChar string, checking first if it holds quote or double-quotes internally + routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally - - + + - Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form - - - + Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form + + + Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) - - - - - - - + + + + + + + Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) - - - - - - - - + + + + + + + + Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) - - - - - - - + + + + + + + Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) - - - - - - - - + + + + + + + + - - - - + + + + + - - Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog(); - - - - + + + + + - Add the new entry to the catalog list - - - + + + + - - Free up all the memory associated with catalogs + - Convert all the SGML catalog entries as XML ones - + + - Free up all the memory associated with catalogs + - + - Free up the memory associated to the catalog list + - + - Used to get the user preference w.r.t. to what catalogs should be accepted - + + - Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolvePublic() - - + + + - Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolveSystem() - - + + + - Check is a catalog is empty - - + + + - Do a complete resolution lookup of an External Identifier using a document's private catalog list - - - - + + + + + - Do a complete resolution lookup of an URI using a document's private catalog list - - - + + + + - - - Remove an entry from the catalog - - + + + - Do a complete resolution lookup of an External Identifier - - - + + + + - Try to lookup the system ID associated to a public ID - - + + + - Try to lookup the catalog resource for a system ID - - + + + - Do a complete resolution lookup of an URI - - + + + - Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it - - + + + - Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM - - + + + - Used to set the user preference w.r.t. to what catalogs should be accepted + - + - Generic front-end for encoding handler close function - - + + Front-end for the encoding handler input function, but handle only the very first line, i.e. limit itself to 45 chars. - - - - + + + + Generic front-end for the encoding handler input function - - - - + + + + - Generic front-end for the encoding handler output function a first call with in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence. - - - - + Generic front-end for the encoding handler output function a first call with @in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence. + + + + - - - Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out. - - - - - + + + + + Take a block of UTF-8 chars in and try to convert it to an other encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state. - - - - - + + + + + a strdup for char's to xmlChar's - - + + a strndup for char's to xmlChar's - - - + + + - function checks to see if path is a valid source (file, socket...) for XML. if stat is not available on the target machine, returns 1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, - - + function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine, + + - Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ - - + Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ + + - Checks utf for being valid utf-8. utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer utf-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value. - - + Checks @utf for being valid utf-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer utf-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value. + + check the compiled lib version against the include one. This can warn or immediately kill the application - + - - Macro for compatibility naming layer with libxml1. - Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases. @@ -3760,1060 +4939,1026 @@ -- Clear (release memory and reinitialize) node info sequence - + Clear (release owned resources) and reinitialize a parser context - + Convert all the SGML catalog entries as XML ones - - + + Build a copy of an attribute table. - - + + append the char value in the array - - - - + + + + append the char value in the array - - - + + + Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities. - - - + + + Do a copy of the dtd. - - + + Build a copy of an element content description. - - + + Build a copy of an element table. - - + + Build a copy of an entity table. - - + + Copy an enumeration attribute node (recursive). - - + + Do a copy of the namespace. - - + + Do a copy of an namespace list. - - + + Do a copy of the node. - - - + + + Do a recursive copy of the node list. - - + + Build a copy of a notation table. - - + + Do a copy of the attribute. - - - + + + Do a copy of an attribute list. - - - + + + Creates a parser context for an XML in-memory document. - - + + create and initialize an empty entities hash table. - + Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - - - + + + + create and initialize an enumeration attribute node. - - + + Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - + + Create a parser context for using the XML parser with an existing I/O stream - - - - - - - + + + + + + + Create the internal subset of a document - - - - - + + + + + Create a parser context for an XML in-memory document. - - - + + + - Create a parser context for using the XML parser in push mode. If buffer and size are non-NULL, the data is used to detect the encoding. The remaining characters will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, size should be >= 4 The value of filename is used for fetching external entities and error/warning reports. - - - - - - + Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining characters will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports. + + + + + + Simply creates an empty xmlURI - + - The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "xDxA" or a standalone literal xD, an XML processor must pass to the application the single character xA. This behavior can conveniently be produced by normalizing all line breaks to xA on input, before parsing.) - - - + The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.) + + + Dumps debug information for the attribute - - - + + + Dumps debug information for the attribute list - - - + + + Dumps debug information for the DTD - - + + Dumps debug information for the document, it's recursive - - + + Dumps debug information cncerning the document, not recursive - - + + Dumps debug information for all the entities in use by the document - - + + Dumps debug information for the element node, it is recursive - - - + + + Dumps debug information for the list of element node, it is recursive - - - + + + Dumps debug information for the element node, it is not recursive - - - + + + Dumps informations about the string, shorten it if necessary - - + + - This function is deprecated, we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' - - - - - - - + This function is deprecated, we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' + + + + + + + - - Global setting, default buffer size. Default value is BASE_BUFFER_SIZE - - - Default handler for XML, builds the DOM tree - Initialize the default SAX handler - - The default SAX Locator { getPublicId, getSystemId, getLineNumber, getColumnNumber} - - Unregisters an encoding alias alias - - + Unregisters an encoding alias @alias + + Guess the encoding of the entity using the first bytes of the entity content accordingly of the non-normative appendix F of the XML-1.0 recommendation. - - - + + + - - Global setting, indicate that the parser should work in validating mode. Disabled by default. - - Do a copy of the node to a given document. - - - - + + + + Dump an XML document to an open FILE. - - - + + + - Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called + Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called - - - - + + + + - Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called + Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called - - - - - + + + + + - Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). + Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). - - - + + + - Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). + Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). - - - - + + + + Dump an XML document to an open FILE. - - - - + + + + Get the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). - - + + - Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). - - - + + + - - This will dump the content of the attribute declaration as an XML DTD definition - - + + This will dump the content of the attribute table as an XML DTD definition - - + + This will dump the content of the element declaration as an XML DTD definition - - + + This will dump the content of the element table as an XML DTD definition - - + + This will dump the content of the entity table as an XML DTD definition - - + + This will dump the content of the entity table as an XML DTD definition - - + + This will dump the content the notation declaration as an XML DTD definition - - + + This will dump the content of the notation table as an XML DTD definition - - + + Dump an XML/HTML node, recursive behaviour, children are printed too. - - - + + + - - - - - - - - - - Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered. - - - + Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered. + + + Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated. - - - + + + Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated. - - - + + + - - - Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement. - - - - + + + + - - - External entity loaders types. - - - - + + + + Close an I/O channel - - + + input from FILE * - - + + - input from FILE *, supports compressed input if filename is " " then the standard input is used - - + input from FILE *, supports compressed input if @filename is " " then the standard input is used + + - Read len bytes to buffer from the I/O channel. - - - - + Read @len bytes to @buffer from the I/O channel. + + + + Search in the registered set the handler able to read/write that encoding. - - + + - - The variable holding the libxml free() implementation - Deallocate the memory used by an entities hash table. - + Free an automata - + Free the memory allocated to a Catalog - + Free up all the structures used by a document, tree included. - + Free a DTD structure. - + Free an element content structure. This is a recursive call ! - + Deallocate the memory used by an element hash table. - + Deallocate the memory used by an entities hash table. - + free an enumeration attribute node (recursive). - + Signature for a free() implementation. - - + + Deallocate the memory used by an ID hash table. - + Free up an input stream. - + xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct. - + Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first. - + Free a node and all its siblings, this is a recursive behaviour, all the children are freed too. - + Deallocate the memory used by an entities hash table. - + Free up the structures associated to a namespace - + Free up all the structures associated to the chained namespaces. - + Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed. - + Free up the memory used by a buffered parser input - + Free one attribute, all the content is freed too - + Free a property and all its siblings, all the children are freed too. - + + xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex. - + Deallocate the memory used by an Ref hash table. - + + + + Deallocate all the resources associated to the reader + + Free up the xmlURI struct - + + + + Quick display of a NodeSet + + + + + + + + + + - - Global setting: function used for generic error callbacks - - - Global setting passed to generic error callbacks - Signature of the function to use when there is an error and no parsing or validity context available . - - - - + + + + - Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance - + Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance + Search in the registered set the handler able to read/write that encoding. - - + + - The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xmlcharencoding Section 4.3.3 Character Encoding in Entities - - + The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities + + get the default compression mode used, ZLIB based. - + get the compression ratio for a document, ZLIB based - - + + - Do an entity lookup in the document entity hash table and returns the corresponding entity, otherwise a lookup is done in the predefined entities too. - - - + Do an entity lookup in the document entity hash table and + + + Search the DTD for the description of this attribute on this element. - - - - + + + + Search the DTD for the description of this element - - - + + + - Do an entity lookup in the DTD entity hash table and returns the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. - - - + Do an entity lookup in the DTD entity hash table and + + + Search the DTD for the description of this notation - - - + + + Search the DTD for the description of this qualified attribute on this element. - - - - - + + + + + Search the DTD for the description of this element - - - - + + + + Lookup an encoding name for the given alias. - - + + Get the default external entity resolver function for the application - + Read the current value of one feature of this parser instance - - - - + + + + - Copy at most *len feature names into the result array - - - + Copy at most *@len feature names into the @result array + + + xmlGetGlobalState() is called to retrieve the global state for a thread. - + Search the attribute declaring the given ID - - - + + + Get the internal subset of a document - - + + Search the last child of a node. - - + + Get line number of node. this requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1) - - + + Build a structure based Path for the given node - - + + Search all the namespace applying to a given element. - - - + + + - Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off. - - - - + Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. + + + + - Do an entity lookup in the internal and external subsets and returns the corresponding parameter entity, if found. - - - + Do an entity lookup in the internal and external subsets and + + + Check whether this name is an predefined entity. - - + + - Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off. - - - + Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. + + + Find the set of references for the supplied ID. - - - + + + xmlGetThreadId() find the current thread ID number - + - Read one UTF8 Char from utf - - - + Read one UTF8 Char from @utf + + + - - Global setting, indicate that the parser should provide warnings. Activated by default. - - - - Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. + Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. - - + + - Search for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off. - - - - + Search for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. + + + + - Search an attribute associated to a node This function also looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off. - - - + Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. + + + - Add the userdata to the hash table. This can later be retrieved by using the name. Duplicate names generate errors. - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors. + + + + - Add the userdata to the hash table. This can later be retrieved by using the (name, name2) tuple. Duplicate tuples generate errors. - - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors. + + + + + - Add the userdata to the hash table. This can later be retrieved by using the tuple (name, name2, name3). Duplicate entries generate errors. - - - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors. + + + + + + Callback to copy data from a hash. - - - + + + - Scan the hash table and applied f to each value. - - - + Scan the hash @table and applied @f to each value. + + + Create a new xmlHashTablePtr. - - + + Callback to free data from a hash. - - - + + + - Free the hash table and its contents. The userdata is deallocated with f if provided. + Free the hash @table and its contents. The userdata is deallocated with @f if provided. - - + + - Find the userdata specified by the name. - - - + Find the userdata specified by the @name. + + + - Find the userdata specified by the (name, name2) tuple. - - - - + Find the userdata specified by the (@name, @name2) tuple. + + + + - Find the userdata specified by the (name, name2, name3) tuple. - - - - - + Find the userdata specified by the (@name, @name2, @name3) tuple. + + + + + - Find the userdata specified by the name and remove it from the hash table. Existing userdata for this tuple will be removed and freed with f. - - - - + Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. + + + + - Find the userdata specified by the (name, name2) tuple and remove it from the hash table. Existing userdata for this tuple will be removed and freed with f. - - - - - + Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. + + + + + - Find the userdata specified by the (name, name2, name3) tuple and remove it from the hash table. Existing userdata for this tuple will be removed and freed with f. - - - - - - + Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f. + + + + + + - Scan the hash table and applied f to each value. + Scan the hash @table and applied @f to each value. - - - + + + - Scan the hash table and applied f to each value matching (name, name2, name3) tuple. If one of the names is null, the comparison is considered to match. + Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match. - - - - - - + + + + + + - Scan the hash table and applied f to each value. + Scan the hash @table and applied @f to each value. - - - + + + - Scan the hash table and applied f to each value matching (name, name2, name3) tuple. If one of the names is null, the comparison is considered to match. + Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match. - - - - - - + + + + + + Callback when scanning data in a hash with the simple scanner. - - - - + + + + Callback when scanning data in a hash with the full scanner. - - - - - - + + + + + + - Query the number of elements installed in the hash table. - - + Query the number of elements installed in the hash @table. + + - - - Add the userdata to the hash table. This can later be retrieved by using the name. Existing entry for this name will be removed and freed with f if found. - - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found. + + + + + - Add the userdata to the hash table. This can later be retrieved by using the (name, name2) tuple. Existing entry for this tuple will be removed and freed with f if found. - - - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found. + + + + + + - Add the userdata to the hash table. This can later be retrieved by using the tuple (name, name2, name3). Existing entry for this tuple will be removed and freed with f if found. - - - - - - - + Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found. + + + + + + + - - - Close an FTP I/O channel - - + + check if the URI matches an FTP one - - + + open an FTP I/O channel - - + + - Read len bytes to buffer from the I/O channel. - - - - + Read @len bytes to @buffer from the I/O channel. + + + + Close an HTTP I/O channel - - + + check if the URI matches an HTTP one - - + + open an HTTP I/O channel - - + + - Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine. - - - + Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine. + + + - Read len bytes to buffer from the I/O channel. - - - - + Read @len bytes to @buffer from the I/O channel. + + + + Load and parse a DTD - - - - + + + + - - Global setting, asking the serializer to indent the output tree by default Enabled by default - Initialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn't need to be called in normal processing. Initialize the memory layer. - + -- Initialize (set to initial state) node info sequence - + Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs. @@ -4822,20 +5967,20 @@ Initialize a parser context - + xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library. - Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup + xmlInitializeGlobalState() initialize a global state with all the default values of the library. - + Set up the predefined entities. @@ -4843,408 +5988,390 @@ Callback used in the I/O Input API to close the resource - - + + Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource. - - + + Callback used in the I/O Input API to open the resource - - + + Callback used in the I/O Input API to read the resource - - - - + + + + - Check whether the character is allowed by the production [85] BaseChar ::= ... long list see REC ... VI is your friend ! :1,$ s/\[x\([0-9A-Z]*\)-x\([0-9A-Z]*\)\]/ (((c) >= 0x\1) \&\& ((c) <= 0x\2)) ||/ and :1,$ s/x\([0-9A-Z]*\)/ ((c) == 0x\1) ||/ - - + Check whether the character is allowed by the production [85] BaseChar ::= ... long list see REC ... VI is your friend ! :1,$ s/\[#x\([0-9A-Z]*\)-#x\([0-9A-Z]*\)\]/ (((c) >= 0x\1) \&\& ((c) <= 0x\2)) ||/ and :1,$ s/#x\([0-9A-Z]*\)/ ((c) == 0x\1) ||/ + + - Check whether the character is allowed by the production [3] S ::= (x20 | x9 | xD | xA)+ Also available as a macro IS_BLANK() - - + Check whether the character is allowed by the production [3] S ::= (#x20 | #x9 | #xD | #xA)+ Also available as a macro IS_BLANK() + + Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node. - - + + - Check whether the character is allowed by the production [2] Char ::= x9 | xA | xD | [x20-xD7FF] | [xE000-xFFFD] | [x10000-x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. Also available as a macro IS_CHAR() - - + Check whether the character is allowed by the production [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. Also available as a macro IS_CHAR() + + Check whether the character is allowed by the production [87] CombiningChar ::= ... long list see REC ... - - + + Check whether the character is allowed by the production [88] Digit ::= ... long list see REC ... - - + + - Check whether the character is allowed by the production [89] Extender ::= x00B7 | x02D0 | x02D1 | x0387 | x0640 | x0E46 | x0EC6 | x3005 | [x3031-x3035] | [x309D-x309E] | [x30FC-x30FE] - - + Check whether the character is allowed by the production [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE] + + Determine whether an attribute is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically. - - - - + + + + - Check whether the character is allowed by the production [86] Ideographic ::= [x4E00-x9FA5] | x3007 | [x3021-x3029] - - + Check whether the character is allowed by the production [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] + + Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic - - + + xmlIsMainThread() check whether the current thread is the main thread. - + Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs - - - + + + - Check whether the character is allowed by the production [13] PubidChar ::= x20 | xD | xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] - - + Check whether the character is allowed by the production [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] + + Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase). - - - - + + + + - - - + Try to find if the document correspond to an XHTML DTD + + + Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating ignorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated. - - + + - - Global setting, indicate that the parser should keep all blanks nodes found in the content Activated by default, this is actually needed to have the parser conformant to the XML Recommendation, however the option is kept for some applications since this was libxml1 default behaviour. - Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default. - - + + - - Global setting, indicate that the parser should store the line number in the content field of elements in the DOM tree. Disabled by default since this may not be safe for old classes of applicaton. - - See Returns. - - + + - - Insert data in the ordered list at the end for this value - - - + + + Remove the all data in the list - + Move all the element from the old list in the new list - - - + + + Create a new list - - - + + + Callback function used to compare 2 data. - - - + + + Callback function used to free data from a list. - - + + Deletes the list and its associated data - + Duplicate the list - - + + Is the list empty ? - - + + Get the last element in the list - - + + Get the first element in the list - - + + Insert data in the ordered list at the beginning for this value - - - + + + include all the elements of the second list in the first one and clear the second list - - + + Removes the last element in the list - + Removes the first element in the list - + - add the new data at the end of the list - - - + + + add the new data at the beginning of the list - - - + + + Remove the all instance associated to data in the list - - - + + + Remove the first instance associated to data in the list - - - + + + Remove the last instance associated to data in the list - - - + + + Reverse the order of the elements in the list - + - Search the list in reverse order for an existing value of data - - - + Search the list in reverse order for an existing value of @data + + + Walk all the element of the list in reverse order and apply the walker function to it - - - + + + - Search the list for an existing value of data - - - + Search the list for an existing value of @data + + + Get the number of elements in the list - - + + Sort all the elements in the list - + Walk all the element of the first from first to last and apply the walker function to it - - - + + + Callback function used when walking a list with xmlListWalk(). - - - + + + - Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively. - - + + + - Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup - - + + + - Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup + - + - - Global setting, indicate that the parser should load DTD while not validating. Disabled by default. - Load an external entity, note that the use of this function for unparsed entities may generate problems TODO: a more generic External entity API must be designed - - - - + + + + - Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries. - - + + + - - xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library. - Count the children of node. - - + Count the children of @node. + + - Dump to output the type and name of node. + Dump to @output the type and name of @node. + + + + + + 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. - - - - Wrapper for the malloc() function used in the XML library. - - Signature for a malloc() implementation. - - + + a malloc() equivalent, with logging of the allocation info. - - - - + + + + show in-extenso the memory blocks allocated - + a free() equivalent, with error checking. - + - Return the memory access functions set currently in use - - - - - + Provides the memory access functions set currently in use + + + + + a malloc() equivalent, with logging of the allocation info. - - + + a realloc() equivalent, with logging of the allocation info. - - - + + + - Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ? - - - - - + Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ? + + + + + - show a show display of the memory allocated, and dump the nr last allocated areas which were not freed + show a show display of the memory allocated, and dump the @nr last allocated areas which were not freed - - + + - - Wrapper for the strdup() function, xmlStrdup() is usually preferred. - - a strdup() equivalent, with logging of the allocation info. - - - - + + + + - returns the amount of memory currently allocated - + Provides the amount of memory currently allocated + Dump in-extenso the memory blocks allocated to the file .memorylist @@ -5252,41 +6379,39 @@ a strdup() equivalent, with logging of the allocation info. - - + + - xmlMutexLock() is used to lock a libxml2 token. - + - xmlMutexUnlock() is used to unlock a libxml2 token. - + - parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender - - + parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender + + - parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)? - - + parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)? + + - TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName - - - + TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName + + + Check if there is a response from the FTP server after a command. - - + + Cleanup the FTP protocol layer. This cleanup proxy informations. @@ -5294,59 +6419,59 @@ Close the connection and both control and transport - - + + Close the data connection from the server - - + + Tries to open a control connection - - + + Tries to open a control connection to the given server/port - - - + + + Tries to change the remote directory - - - + + + Frees the context after closing the connection. - + Fetch the given file from the server. All data are passed back in the callbacks. The last callback has a size of 0 block. - - - - - + + + + + Try to open a data connection to the server. Currently only passive mode is supported. - - + + Get the response from the FTP server after a command. - - + + Initiate fetch of the given file from the server. - - - + + + Initialize the FTP protocol layer. Currently it just checks for proxy informations, and get the hostname @@ -5354,58 +6479,58 @@ Do a listing on the server. All files info are passed back in the callbacks. - - - - - + + + + + Allocate and initialize a new FTP context. - - + + Start to fetch the given ftp:// resource - - + + Setup the FTP proxy informations. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables. - - - - - + + + + + Send a QUIT command to the server - - + + - This function tries to read len bytes from the existing FTP connection and saves them in dest. This is a blocking call. - - - - + This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call. + + + + (Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A NULL URL cleans up proxy informations. - + Update an FTP context by parsing the URL and finding new path it indicates. If there is an error in the protocol, hostname, port or other information, the error is raised. It indicates a new connection has to be established. - - - + + + Get the authentication header of an HTTP context - - + + Cleanup the HTTP protocol layer. @@ -5414,1181 +6539,1190 @@ This function closes an HTTP context, it ends up the connection and free all data related to it. - + + + + 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. - - - - + + + + + + + Check if all the content was read + + + + Initialize the HTTP protocol layer. Currently it just checks for proxy informations - This function try to open a connection to the indicated resource via HTTP using the given method, adding the given extra headers and the input buffer for the request content. - - - - - - - + This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content. + + + + + + + - This function try to open a connection to the indicated resource via HTTP using the given method, adding the given extra headers and the input buffer for the request content. - - - - - - - - + This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content. + + + + + + + + This function try to open a connection to the indicated resource via HTTP GET. - - - + + + This function try to open a connection to the indicated resource via HTTP GET. - - - - + + + + - This function tries to read len bytes from the existing HTTP connection and saves them in dest. This is a blocking call. - - - - + This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call. + + + + Get the latest HTTP return code received - - + + This function saves the output of the HTTP transaction to a file It closes and free the context at the end - - - + + + (Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy informations. - + Create a new automata - + Creation of a new node containing a CDATA block. - - - - + + + + - create a new Catalog. - - + + + Create and registers an xmlCharEncodingHandler. - - - - + + + + Creation of a new character reference node. - - - + + + - Creation of a new child element, added at the end of parent children list. ns and content parameters are optional (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewTextChild() if entities support is not needed. - - - - - + Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewTextChild() if entities support is not needed. + + + + + Creation of a new node containing a comment. - - + + Creates a new XML document - - + + Creation of a new node containing a comment within a document. - - - + + + Creation of a new Fragment node. - - + + - Creation of a new node element within a document. ns and content are optional (NULL). NOTE: content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. - - - - - + Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. + + + + + - Creation of a new node element within a document. ns and content are optional (NULL). NOTE: content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. - - - - - + Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. + + + + + Create a new property carried by a document. - - - - + + + + - Creation of a new node element within a document. ns and content are optional (NULL). - - - - - + Creation of a new node element within a document. @ns and @content are optional (NULL). + + + + + Creation of a new text node within a document. - - - + + + Creation of a new text node with an extra content length parameter. The text node pertain to a given document. - - - - + + + + Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset(). - - - - - + + + + + Allocate an element content structure. - - - + + + Create a new input stream based on an xmlEntityPtr - - - + + + Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found. - - - - + + + + - Create a new input stream structure encapsulating the input into a stream suitable for the parser. - - - - + Create a new input stream structure encapsulating the @input into a stream suitable for the parser. + + + + Create a new input stream based on a file. - - - + + + Create a new input stream structure - - + + - + xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data. + - Creation of a new node element. ns is optional (NULL). - - - + Creation of a new node element. @ns is optional (NULL). + + + - Creation of a new node element. ns is optional (NULL). - - - + Creation of a new node element. @ns is optional (NULL). + + + Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. We use href==NULL in the case of an element creation where the namespace was not defined. - - - - + + + + Create a new property tagged with a namespace and carried by a node. - - - - - + + + + + Create a new property tagged with a namespace and carried by a node. - - - - - + + + + + Creation of a processing instruction element. - - - + + + Allocate and initialize a new parser context. - + Create a new property carried by a node. - - - - + + + + - + 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. - - - + + + Create a new input stream based on a memory buffer. - - - + + + Creation of a new text node. - - + + - Creation of a new child element, added at the end of parent children list. ns and content parameters are optional (NULL). If content is non NULL, a child TEXT node will be created containing the string content. - - - - - + Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If content is non NULL, a child TEXT node will be created containing the string content. + + + + + Creation of a new text node with an extra parameter for the content's length - - - + + + + + + Create an xmlTextReader structure fed with @input + + + + + Create an xmlTextReader structure fed with the resource at @URI + + Skip to the next char input char. - + A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution. - - - - + + + + - Append the extra substring to the node content. - - + + Append the extra substring to the node content. - - - + + + Dump an XML node, recursive behaviour,children are printed too. Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called - - - - - - + + + + + + Dump an XML node, recursive behaviour, children are printed too. Note that format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called - - - - - - + + + + + + Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use xmlDocumentGetBase() for this - - - + + + Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. - - + + Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor. - - + + Searches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor. - - + + Is this node a Text node ? - - + + - Returns the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling. - - - - + Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling. + + + + - Returns the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs - - - - + Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs + + + + - - Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute. - - + + Replace the content of a node. - - + + Replace the content of a node. - - - + + + Set the language of a node, i.e. the values of the xml:lang attribute. - - + + Set (or reset) the name of a node. - - + + - Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute. - - + + - 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 - - + 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 + + Normalize a Windows path to make an URL from it - - + + - - - - - - - flushes and close the output I/O channel and free up all the associated resources - - + + Create a buffered output for the progressive saving to a file descriptor - - - + + + Create a buffered output for the progressive saving to a FILE * buffered C I/O - - - + + + - Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file. - - - - + Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file. + + + + Create a buffered output for the progressive saving to an I/O handler - - - - - + + + + + flushes the output I/O channel - - + + - Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes. - - - - + + + + Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes. - - - + + + Callback used in the I/O Output API to close the resource - - + + Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource. - - + + Callback used in the I/O Output API to open the resource - - + + Callback used in the I/O Output API to write to the resource - - - - + + + + - parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character reference is processed by appending the referenced character to the attribute value - an entity reference is processed by recursively processing the replacement text of the entity - a whitespace character (x20, xD, xA, x9) is processed by appending x20 to the normalized value, except that only a single x20 is appended for a "xDxA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (x20) characters, and by replacing sequences of space (x20) characters by a single space (x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA. - - + parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character reference is processed by appending the referenced character to the attribute value - an entity reference is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA. + + + + + 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. - - - + 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. + + + - : parse the Attribute list def for an element [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53] AttDef ::= S Name S AttType S DefaultDecl + : parse the Attribute list def for an element [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53] AttDef ::= S Name S AttType S DefaultDecl - + - parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID attribute specified. [ VC: ID Attribute Default ] An ID attribute must have a declared default of IMPLIED or REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens. - - - + parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID attribute specified. [ VC: ID Attribute Default ] An ID attribute must have a declared default of #IMPLIED or #REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens. + + + - Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* - - - - - - - + Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* + + + + + + + - Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* - - - - - - - - + Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* + + + + + + + + - Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::= (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' + Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::= (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' - + parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups. - - + + - parse a CharData section. if we are within a CDATA section ']]>' marks an end of section. The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) + parse a CharData section. if we are within a CDATA section ']]>' marks an end of section. The right angle bracket (>) may be represented using the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) - - + + + + + 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. - - + + - parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char. - - + parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char. + + Parse a Chunk of memory - - - - - + + + + + - Skip an XML (SGML) comment <!-- .... --> The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->' + Skip an XML (SGML) comment <!-- .... --> The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->' - + - Parse a content: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* + Parse a content: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* - + - Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content - - - - - + Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content + + + + + Load and parse an external subset. - - - + + + - Parse an attribute default declaration [60] DefaultDecl ::= 'REQUIRED' | 'IMPLIED' | (('FIXED' S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an attribute has a default value declared with the FIXED keyword, instances of that attribute must match the default value. [ WFC: No < in Attribute Values ] handled in xmlParseAttValue() - - - + Parse an attribute default declaration [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value. [ WFC: No < in Attribute Values ] handled in xmlParseAttValue() + + + parse an XML in-memory document and build a tree. - - + + - parse a DOCTYPE declaration [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element. + parse a DOCTYPE declaration [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element. - + - parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? - - + parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? + + - parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag. [ VC: Element Valid ] An element is valid if there is a declaration matching elementdecl where the Name matches the element type and one of the following holds: - The declaration matches EMPTY and the element has no content. - The declaration matches children and the sequence of child elements belongs to the language generated by the regular expression in the content model, with optional white space (characters matching the nonterminal S) between each pair of child elements. - The declaration matches Mixed and the content consists of character data and child elements whose types match names in the content model. - The declaration matches ANY, and the types of any child elements have been declared. + parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag. [ VC: Element Valid ] An element is valid if there is a declaration matching elementdecl where the Name matches the element type and one of the following holds: - The declaration matches EMPTY and the element has no content. - The declaration matches children and the sequence of child elements belongs to the language generated by the regular expression in the content model, with optional white space (characters matching the nonterminal S) between each pair of child elements. - The declaration matches Mixed and the content consists of character data and child elements whose types match names in the content model. - The declaration matches ANY, and the types of any child elements have been declared. - + - parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,). - - - + parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,). + + + - parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children - - - - + parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children + + + + - parse an Element declaration. [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique Element Type Declaration ] No element type may be declared more than once - - + parse an Element declaration. [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique Element Type Declaration ] No element type may be declared more than once + + - parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [51] Mixed ::= '(' S? 'PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? 'PCDATA' S? ')' [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration. - - - + parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')' [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration. + + + - parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* - - + parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* + + - parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters. - - + parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters. + + - parse an end of tag [42] ETag ::= '</' Name S? '>' With namespace [NS 9] ETag ::= '</' QName S? '>' + parse an end of tag [42] ETag ::= '</' Name S? '>' With namespace [NS 9] ETag ::= '</' QName S? '>' - + - parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk - - + parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk + + - parse <!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation. + parse <!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation. - + - parse ENTITY references declarations [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 ENTITY references declarations [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 a value for ENTITY declarations [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'" - - - + parse a value for ENTITY declarations [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'" + + + - parse an Enumerated attribute type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' - - - + parse an Enumerated attribute type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' + + + - parse an Enumeration attribute type. [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration - - + parse an Enumeration attribute type. [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration + + - parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content - - + parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content + + - Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content - - - - - - - - + Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content + + + + + + + + - Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral [83] PublicID ::= 'PUBLIC' S PubidLiteral - - - - + Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral [83] PublicID ::= 'PUBLIC' S PubidLiteral + + + + - parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) * + parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) * - - - + + + parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. - - + + - parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.) + parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.) - + parse an XML in-memory block and build a tree. - - - + + + - parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S + parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S - + - parse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)* - - + parse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)* + + - xmlParseNamespace: parse specific PI '<?namespace ...' constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility + xmlParseNamespace: parse specific PI '<?namespace ...' constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility - + - parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (S Nmtoken)* - - + parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (S Nmtoken)* + + - parse a notation declaration [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID(). + parse a notation declaration [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID(). - + - parse an Notation attribute type. Note: the leading 'NOTATION' S part has already being parsed... [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared. - - + parse an Notation attribute type. Note: the leading 'NOTATION' S part has already being parsed... [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared. + + - parse PEReference declarations The entity content is handled directly by pushing it's content as a new input stream. [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 PEReference declarations The entity content is handled directly by pushing it's content as a new input stream. [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 Processing Instruction. [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The processing is transfered to SAX once parsed. + parse an XML Processing Instruction. [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The processing is transfered to SAX once parsed. - + - parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) - - + parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) + + - parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" - - + parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" + + - Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility - - + Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility + + - parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef + parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef - + - parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types. - - + parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types. + + - parse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>' [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' - - + parse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>' [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' + + + + + 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 ::= ('"' [^"]* '"') | ("'" [^']* "'") - - + parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") + + - 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? '?>' Question: Seems that EncodingDecl is mandatory ? Is that a typo ? - + - Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] - - + Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + + - 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 and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] + + + - parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? - - + parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? + + - parse the XML version value. [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+ - - + parse the XML version value. [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')+ + + - parse an XML declaration header [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' + parse an XML declaration header [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>' - + Insert node info record into the sorted sequence - - + + - - - - Global setting, asking the parser to print out debugging informations. while handling entities. Disabled by default - Display and format an error messages, gives file, line, position and extra parameters. - - - + + + - Find the parser node info struct for a given node - - - + + + xmlParserFindNodeInfoIndex : Find the index that the info record for the given node is or should be at in a sorted sequence - - - + + + lookup the directory for that file - - + + - [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. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xmlentproc i.e. - Included in literal in entity values - Included as Parameter Entity reference within DTDs + [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. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity reference within DTDs - + - TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] 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. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' | '&x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xmlentproc + TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] 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. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc - + - - Create a buffered parser input for the progressive parsing for the input from a file descriptor - - - + + + Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O - - - + + + Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == XML_CHAR_ENCODING_NONE - - - + + + Create a buffered parser input for the progressive parsing for the input from an I/O handler - - - - - + + + + + Create a buffered parser input for the progressive parsing for the input from a memory area. - - - - + + + + - Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw - - - + Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw + + + - Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode. - - - - + + + + Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8 - - - + + + Callback for freeing some parser input allocations. - - + + This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data - - - + + + - This function refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard already read data - - - + + + This function removes used input for the parser. - + - - - - - Displays current context within the input content for error tracking - + Displays the associated file and line informations for the current input - + Display and format an validity error messages, gives file, line, position and extra parameters. - - - + + + Display and format a validity warning messages, gives file, line, position and extra parameters. - - - + + + - - Constant string describing the internal version of the library - Display and format a warning messages, gives file, line, position and extra parameters. - - - + + + Set and return the previous value for enabling pedantic warnings. - - + + - - Global setting, indicate that the parser be pedantic Disabled by default. - xmlPopInput: the current input pointed by ctxt->input came to an end pop it and return the next char. - - + + - Prints the URI in the stream steam. + Prints the URI in the stream @steam. - - + + xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s). - - + + - xmlRMutexLock() is used to lock a libxml2 token_r. - + - xmlRMutexUnlock() is used to unlock a libxml2 token_r. - + - - Wrapper for the realloc() function used in the XML library. - - - Signature for a realloc() implementation. - - - + + + a realloc() equivalent, with logging of the allocation info. - - - - - + + + + + - This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on tree at the top of the given subtree. - - - + This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree. + + + parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a tree is built anyway - - + + parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, a tree is built anyway - - + + parse an XML in-memory block and build a tree. In the case the document is not Well Formed, a tree is built anyway - - - + + + - - - - - - - - + + + + + + - - Push one input token in the execution context - - - - + + + + Free the structures associated to a regular expression evaulation context. - + Free a regexp - + - - - - + Build a context used for progressive evaluation of a regexp. + + + + - Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and build an automata suitable for testing strings against that regular expression - - + + Check if the regular expression generate the value - - - + + + Check if the regular expression is determinist - - + + Print the content of the compiled regular expression - - + + - Register the char encoding handler, surprising, isn't it ? - + Registers the default compiled-in I/O handlers. @@ -6604,1335 +7738,1504 @@ Register a new set of I/O callback for handling parser input. - - - - - + + + + + Register a new set of I/O callback for handling output. - - - - - + + + + + Remove the given attribute from the ID table maintained internally. - - - + + + Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes - - + + Remove the given attribute from the Ref table maintained internally. - - - + + + - Unlink the old node from it's current context, prune the new one at the same place. If cur was already inserted in a document it is first unlinked from its existing context. - - - + Unlink the old node from it's current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context. + + + - - Macro for compatibility naming layer with libxml1. - - - - - Load and parse an external subset. - - - - + + + + parse an XML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - + + + + - parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk - - - + parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk + + + parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - + + + + - parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml - - - - - + parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml + + + + + parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. - - - - - + + + + + - parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml - - - - - - + parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml + + + + + + parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided - - - - + + + + A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines. - - - - - + + + + + - Dump an XML document to a file. Will use compression if compiled in and enabled. If filename is "-" the stdout file is used. - - - + Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. + + + Dump an XML document, converting it to the given encoding - - - - + + + + Dump an XML document to an I/O buffer. - - - - + + + + - Dump an XML document to a file. Will use compression if compiled in and enabled. If filename is "-" the stdout file is used. If format is set then the document will be indented on output. - - - - + Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. + + + + - - - - - + Dump an XML document to a file or an URL. + + + + + Dump an XML document to an I/O buffer. - - - - - + + + + + - - Global setting, asking the serializer to not output empty tags as <empty/> but <empty></empty>. those two forms are undistinguishable once parsed. Disabled by default - Save the URI as an escaped string - - + + + + + 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)* - - + 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. - - - - + 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. + + + + Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise. - - - - + + + + - Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance + Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance - + set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) - + set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) - - + + Set the function to call call back when a xml reference has been made - + Changes the defaultexternal entity resolver function for the application - + Change the current value of one feature of this parser instance - - - - + + + + - Function to reset the handler and the error context for out of context error messages. This simply means that handler will be called for subsequent error messages while not parsing nor validating. And ctx will be passed as first argument to handler One can simply force messages to be emitted to another FILE * than stderr by setting ctx to this file handle and handler to NULL. + Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. - - + + update all nodes in the list to point to the right document - - + + Associate a namespace to a node, a posteriori. - - + + Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked. - - - - - + + + + + Set (or reset) an attribute carried by a node. - - - - + + + + update all nodes under the tree to point to the right document - - + + Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be - - - + + + Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline. - - - - + + + + Implements the XML shell function "base" dumps the current XML base of the node - - - - - + + + + + Implements the XML shell function "cat" dumps the serialization node content (XML or HTML). - - - - - + + + + + This is a generic signature for the XML shell functions. - - - - - + + + + + - - Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content). - - - - - + + + + + - Implements the XML shell function "du" show the structure of the subtree under node tree If tree is null, the command works on the current node. - - - - - + Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node. + + + + + Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory) - - - - - + + + + + Implements the XML shell function "load" loads a new document specified by the filename - - - - - + + + + + Print node to the output FILE - + Print the xpath error to libxml default error channel - - + + Prints result to the output FILE - + Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands. - - - - - + + + + + This is a generic signature for the XML shell input function. - - + + Implements the XML shell function "save" Write the current document to the filename, or it's original name - - - - - + + + + + Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD. - - - - - + + + + + - Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the node specified - - - - - + Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified + + + + + skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point. - - + + This will dump the content of the element content definition Intended just for the debug routine - - - - + + + + - parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName - - - - + parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName + + + + - parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName - - - + parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName + + + Deprecated, unsafe, use xmlSnprintfElementContent - - - + + + Blocks further parser processing - + Check if both string are equal of have same content Should be a bit more readable and faster than xmlStrEqual() - - - + + + a strcasecmp for xmlChar's - - - + + + a case-ignoring strstr for xmlChar's - - - + + + a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'. - - - + + + a strchr for xmlChar's - - - + + + a strcmp for xmlChar's - - - + + + a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'. - - + + Signature for an strdup() implementation. - - + + The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. - - - - + + + + - Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' - - - - - - - + Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' + + + + + + + Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs. - - - + + + Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs. - - - - + + + + length of a xmlChar's string - - + + a strncasecmp for xmlChar's - - - - + + + + - a strncat for array of xmlChar's, it will extend cur with the len first bytes of add. - - - - + a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. + + + + a strncmp for xmlChar's - - - - + + + + a strndup for array of xmlChar's - - - + + + a strstr for xmlChar's - - - + + + Extract a substring of a given string - - - - + + + + Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis. - - + + - - Global setting, indicate that the parser should not generate entity references but replace them with the actual content of the entity Disabled by default, this should be activated when using XPath since the XPath data model requires entities replacement and the XPath engine does not handle entities references transparently. - change the input functions when discovering the character encoding of a given entity. - - - + + + change the input functions when discovering the character encoding of a given entity. - - - + + + Concat the given string at the end of the existing node content - - - + + + Merge two text nodes into one - - - + + + + + + Provides the number of attributes of the current node + + + + + The base URI of the node. + + + + + The depth of the node in the tree. + + + + + Whether the node has attributes. + + + + + Whether the node can have a text value. + + + + + + + + + + Check if the current node is empty + + + + + The local name of the node. + + + + + The qualified name of the node, equal to Prefix :LocalName. + + + + + The URI defining the namespace associated with the node. + + + + + Get the node type of the current node Reference: http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html + + + + + A shorthand reference to the namespace associated with the node. + + + + + + + + + + Moves the position of the current instance to the next node in the stream, exposing its properties. + + + + + + + + + + The xml:lang scope within which the node resides. + + - - The string used to do one-level indent. By default is equal to " " (two spaces) - Check whether the character is part of AlphabeticPresentationForms UCS Block - - + + Check whether the character is part of Arabic UCS Block - - + + Check whether the character is part of ArabicPresentationForms-A UCS Block - - + + Check whether the character is part of ArabicPresentationForms-B UCS Block - - + + Check whether the character is part of Armenian UCS Block - - + + Check whether the character is part of Arrows UCS Block - - + + Check whether the character is part of BasicLatin UCS Block - - + + Check whether the character is part of Bengali UCS Block - - + + Check whether the caracter is part of the UCS Block - - - + + + Check whether the character is part of BlockElements UCS Block - - + + Check whether the character is part of Bopomofo UCS Block - - + + Check whether the character is part of BopomofoExtended UCS Block - - + + Check whether the character is part of BoxDrawing UCS Block - - + + Check whether the character is part of BraillePatterns UCS Block - - + + Check whether the character is part of ByzantineMusicalSymbols UCS Block - - + + Check whether the character is part of CJKCompatibility UCS Block - - + + Check whether the character is part of CJKCompatibilityForms UCS Block - - + + Check whether the character is part of CJKCompatibilityIdeographs UCS Block - - + + Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block - - + + Check whether the character is part of CJKRadicalsSupplement UCS Block - - + + Check whether the character is part of CJKSymbolsandPunctuation UCS Block - - + + Check whether the character is part of CJKUnifiedIdeographs UCS Block - - + + Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block - - + + Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block - - + + Check whether the caracter is part of the UCS Category - - - + + + Check whether the character is part of C UCS Category - - + + Check whether the character is part of Cc UCS Category - - + + Check whether the character is part of Cf UCS Category - - + + Check whether the character is part of Co UCS Category - - + + Check whether the character is part of Cs UCS Category - - + + Check whether the character is part of L UCS Category - - + + Check whether the character is part of Ll UCS Category - - + + Check whether the character is part of Lm UCS Category - - + + Check whether the character is part of Lo UCS Category - - + + Check whether the character is part of Lt UCS Category - - + + Check whether the character is part of Lu UCS Category - - + + Check whether the character is part of M UCS Category - - + + Check whether the character is part of Mc UCS Category - - + + Check whether the character is part of Me UCS Category - - + + Check whether the character is part of Mn UCS Category - - + + Check whether the character is part of N UCS Category - - + + Check whether the character is part of Nd UCS Category - - + + Check whether the character is part of Nl UCS Category - - + + Check whether the character is part of No UCS Category - - + + Check whether the character is part of P UCS Category - - + + Check whether the character is part of Pc UCS Category - - + + Check whether the character is part of Pd UCS Category - - + + Check whether the character is part of Pe UCS Category - - + + Check whether the character is part of Pf UCS Category - - + + Check whether the character is part of Pi UCS Category - - + + Check whether the character is part of Po UCS Category - - + + Check whether the character is part of Ps UCS Category - - + + Check whether the character is part of S UCS Category - - + + Check whether the character is part of Sc UCS Category - - + + Check whether the character is part of Sk UCS Category - - + + Check whether the character is part of Sm UCS Category - - + + Check whether the character is part of So UCS Category - - + + Check whether the character is part of Z UCS Category - - + + Check whether the character is part of Zl UCS Category - - + + Check whether the character is part of Zp UCS Category - - + + Check whether the character is part of Zs UCS Category - - + + Check whether the character is part of Cherokee UCS Block - - + + Check whether the character is part of CombiningDiacriticalMarks UCS Block - - + + Check whether the character is part of CombiningHalfMarks UCS Block - - + + Check whether the character is part of CombiningMarksforSymbols UCS Block - - + + Check whether the character is part of ControlPictures UCS Block - - + + Check whether the character is part of CurrencySymbols UCS Block - - + + Check whether the character is part of Cyrillic UCS Block - - + + Check whether the character is part of Deseret UCS Block - - + + Check whether the character is part of Devanagari UCS Block - - + + Check whether the character is part of Dingbats UCS Block - - + + Check whether the character is part of EnclosedAlphanumerics UCS Block - - + + Check whether the character is part of EnclosedCJKLettersandMonths UCS Block - - + + Check whether the character is part of Ethiopic UCS Block - - + + Check whether the character is part of GeneralPunctuation UCS Block - - + + Check whether the character is part of GeometricShapes UCS Block - - + + Check whether the character is part of Georgian UCS Block - - + + Check whether the character is part of Gothic UCS Block - - + + Check whether the character is part of Greek UCS Block - - + + Check whether the character is part of GreekExtended UCS Block - - + + Check whether the character is part of Gujarati UCS Block - - + + Check whether the character is part of Gurmukhi UCS Block - - + + Check whether the character is part of HalfwidthandFullwidthForms UCS Block - - + + Check whether the character is part of HangulCompatibilityJamo UCS Block - - + + Check whether the character is part of HangulJamo UCS Block - - + + Check whether the character is part of HangulSyllables UCS Block - - + + Check whether the character is part of Hebrew UCS Block - - + + Check whether the character is part of HighPrivateUseSurrogates UCS Block - - + + Check whether the character is part of HighSurrogates UCS Block - - + + Check whether the character is part of Hiragana UCS Block - - + + Check whether the character is part of IPAExtensions UCS Block - - + + Check whether the character is part of IdeographicDescriptionCharacters UCS Block - - + + Check whether the character is part of Kanbun UCS Block - - + + Check whether the character is part of KangxiRadicals UCS Block - - + + Check whether the character is part of Kannada UCS Block - - + + Check whether the character is part of Katakana UCS Block - - + + Check whether the character is part of Khmer UCS Block - - + + Check whether the character is part of Lao UCS Block - - + + Check whether the character is part of Latin-1Supplement UCS Block - - + + Check whether the character is part of LatinExtended-A UCS Block - - + + Check whether the character is part of LatinExtendedAdditional UCS Block - - + + Check whether the character is part of LatinExtended-B UCS Block - - + + Check whether the character is part of LetterlikeSymbols UCS Block - - + + Check whether the character is part of LowSurrogates UCS Block - - + + Check whether the character is part of Malayalam UCS Block - - + + Check whether the character is part of MathematicalAlphanumericSymbols UCS Block - - + + Check whether the character is part of MathematicalOperators UCS Block - - + + Check whether the character is part of MiscellaneousSymbols UCS Block - - + + Check whether the character is part of MiscellaneousTechnical UCS Block - - + + Check whether the character is part of Mongolian UCS Block - - + + Check whether the character is part of MusicalSymbols UCS Block - - + + Check whether the character is part of Myanmar UCS Block - - + + Check whether the character is part of NumberForms UCS Block - - + + Check whether the character is part of Ogham UCS Block - - + + Check whether the character is part of OldItalic UCS Block - - + + Check whether the character is part of OpticalCharacterRecognition UCS Block - - + + Check whether the character is part of Oriya UCS Block - - + + Check whether the character is part of PrivateUse UCS Block - - + + Check whether the character is part of Runic UCS Block - - + + Check whether the character is part of Sinhala UCS Block - - + + Check whether the character is part of SmallFormVariants UCS Block - - + + Check whether the character is part of SpacingModifierLetters UCS Block - - + + Check whether the character is part of Specials UCS Block - - + + Check whether the character is part of SuperscriptsandSubscripts UCS Block - - + + Check whether the character is part of Syriac UCS Block - - + + Check whether the character is part of Tags UCS Block - - + + Check whether the character is part of Tamil UCS Block - - + + Check whether the character is part of Telugu UCS Block - - + + Check whether the character is part of Thaana UCS Block - - + + Check whether the character is part of Thai UCS Block - - + + Check whether the character is part of Tibetan UCS Block - - + + Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block - - + + Check whether the character is part of YiRadicals UCS Block - - + + Check whether the character is part of YiSyllables UCS Block - - + + - Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure. - - + + This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list. - - - + + + - - Unescaping routine, does not do validity checks ! Output is direct unsigned char translation of XX values (no encoding) - - - - + Unescaping routine, does not do validity checks ! Output is direct unsigned char translation of %XX values (no encoding) + + + + compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string. - - + + a function to provide relative location of a UTF8 char - - - + + + a strndup for array of UTF8's - - - + + + a function to provide the equivalent of fetching a character from a string array - - - + + + storage size of an UTF8 string - - - + + + - Note: positions are given in units of UTF-8 chars - - - - + Note: positions are given in units of UTF-8 chars + + + + Unlink a node from it's current context, the node is not freed - + xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library. @@ -7940,536 +9243,514 @@ Remove an attribute carried by a node. - - - - + + + + Remove an attribute carried by a node. - - - + + + + + + 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 - - - + + + - - Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (x20) characters, and by replacing sequences of space (x20) characters by single space (x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly - - - - - - + Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly + + + + + + - - Build/extend a list of potential children allowed by the content tree - - - - - + Build/extend a list of potential children allowed by the content tree + + + + + - This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using prev and next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed. - - - - - + This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node->prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node->next, ... to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed. + + + + + - Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (x20) characters, and by replacing sequences of space (x20) characters by single space (x20) character. - - - - - + Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. + + + + + - - - 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 - - - - + 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 + + + + - 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. - - - + 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. + + + - 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. - - - + 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. + + + - 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 - - - + 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 + + + - Try to validate the document against the dtd instance basically it does check all the definitions in the DtD. - - - - + Try to validate the document against the dtd instance basically it does check all the definitions in the DtD. + + + + - Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations. - - - + Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations. + + + Try to validate the subtree under an element - - - - + + + + Try to validate a single element definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: One ID per Element Type ] - [ VC: No Duplicate Types ] - [ VC: Unique Element Type Declaration ] - - - - + + + + Validate that the given value match Name production - - + + Validate that the given value match Names production - - + + - Validate that the given value match Nmtoken production [ VC: Name Token ] - - + Validate that the given value match Nmtoken production [ VC: Name Token ] + + - Validate that the given value match Nmtokens production [ VC: Name Token ] - - + Validate that the given value match Nmtokens production [ VC: Name Token ] + + Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: - it seems that no validity constraint exists on notation declarations But this function get called anyway ... - - - - + + + + Validate that the given name match a notation declaration. - [ VC: Notation Declared ] - - - - + + + + - Try to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately - - - - - - + Try to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately + + + + + + - Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately - - - - + Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately + + + + - Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately - - - - - - - + Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately + + + + + + + Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element - - - + + + Callback called when a validity error is found. This is a message oriented function similar to an *printf function. - - - - + + + + Callback called when a validity warning is found. This is a message oriented function similar to an *printf function. - - - - + + + + - Implement the XInclude substitution on the XML document doc - - + Implement the XInclude substitution on the XML document @doc + + Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function. - + - An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal. - - - + + + - Implement the boolean() XPath function boolean boolean(object) he boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero - - + + Converts a boolean to its number value - - + + Converts a boolean to its string value. - - + + Converts a node-set to its boolean value - - + + Converts a node-set to its number value - - + + Converts a node-set to its string value. - - + + Converts a node to its number value - - + + Converts a node to its string value. - - + + Converts a number to its boolean value - - + + Converts a number to its string value. - - + + Converts a string to its boolean value - - + + Converts a string to its number value - - + + Converts an XPath object to its boolean value - - + + Converts an XPath object to its number value - - + + Converts an existing object to its string() equivalent - - + + Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer. - - + + - - Check if an XPath error was raised. - - Compare two nodes w.r.t document order - - - + + + - - - Implement the compare operation on XPath objects: arg1 <arg2 (1, 1, ... arg1 <= arg2 (1, 0, ... arg1 >arg2 (0, 1, ... arg1 >= arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number. - - - - + Implement the compare operation on XPath objects: @arg1 < @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 > @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number. + + + + Compile an XPath expression - - + + Evaluate the Precompiled XPath expression in the given context. - - - + + + Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments. - - + + Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false. - - + + - - Converts an existing object to its boolean() equivalent - - + + A conversion function is associated to a type and used to cast the new type to primitive values. - - - + + + Converts an existing object to its number() equivalent - - + + Converts an existing object to its string() equivalent - - + + Implement the count() XPath function number count(node-set) - - + + Dumps the tree of the compiled XPath expression. - - - + + + Dump the content of the object for debugging purposes - - - + + + Implements the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set) - - - + + + - Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) nodes is sorted by document order, then exslSetsDistinctSorted is called with the sorted node-set - - + Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set + + Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) - - + + - Implement the div operation on XPath objects arg1 / arg2: The numeric operators convert their operands to numbers as if by calling the number function. + Implement the div operation on XPath objects @arg1 / @arg2: The numeric operators convert their operands to numbers as if by calling the number function. - + + + + + + + - - Empties a node-set. - - - Implement the equal operation on XPath objects content: arg1 == arg2 - - + Implement the equal operation on XPath objects content: @arg1 == @arg2 + + - Evaluate the XPath Location Path in the given context. - - - + + + Parse and evaluate an XPath expression in the given context, then push the result on the context stack - + Evaluate the XPath expression in the given context. - - - + + + An XPath evaluation function, the parameters are on the XPath context stack. - - - + + + Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function. - - - + + + Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function. - - - + + + Implement the false() XPath function boolean false() - - + + Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer. - - + + - Free up the memory allocated by comp + Free up the memory allocated by @comp - + Free up an xmlXPathContext - + Free the NodeSet compound (not the actual nodes !). - + - Free up the xmlXPathObjectPtr obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject(). + Free up the xmlXPathObjectPtr @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject(). - + Free up an xmlXPathObjectPtr object. - + Free up an xmlXPathParserContext - + Prototype for callbacks used to plug function lookup in the XPath engine. - - - - + + + + - - An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack. - - - + + + Search in the Function array of the context for the given function. - - - + + + Search in the Function array of the context for the given function. - - - - + + + + - - Get the context node of an XPath context. - - - - Get the document of an XPath context. - - - - Get the error code of an XPath context. - - Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set) - - - + + + Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of characters matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list. - - + + Initialize the XPath environment @@ -8477,768 +9758,731 @@ Implements the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set) - - - + + + Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/ - - + + Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/ - - + + - Is the name given a NodeType one. [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node' - - + Is the name given a NodeType one. [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node' + + Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang attribute on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang - - + + Implement the last() XPath function number last() The last function returns the number of nodes in the context node list. - - + + - Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) nodes1 and nodes2 are sorted by document order, then exslSetsLeadingSorted is called. - - - + Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called. + + + Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) - - - + + + Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node. - - + + - Implement the mod operation on XPath objects: arg1 / arg2 The numeric operators convert their operands to numbers as if by calling the number function. + Implement the mod operation on XPath objects: @arg1 / @arg2 The numeric operators convert their operands to numbers as if by calling the number function. - + Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function. - + Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node. - - + + - Create a new xmlXPathObjectPtr of type boolean and of value val - - + Create a new xmlXPathObjectPtr of type boolean and of value @val + + - Create a new xmlXPathObjectPtr of type string and of value val - - + Create a new xmlXPathObjectPtr of type string and of value @val + + Create a new xmlXPathContext - - + + - Create a new xmlXPathObjectPtr of type double and of value val - - + Create a new xmlXPathObjectPtr of type double and of value @val + + - Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node val - - + Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node @val + + - Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset val - - + Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset @val + + Create a new xmlXPathParserContext - - - + + + - Create a new xmlXPathObjectPtr of type string and of value val - - + Create a new xmlXPathObjectPtr of type string and of value @val + + - Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root val - - + Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root @val + + Traversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis - - - + + + Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis. - - - + + + Traversal function for the "attribute" direction TODO: support DTD inherited default attributes - - - + + + Traversal function for the "child" direction The child axis contains the children of the context node in document order. - - - + + + Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on. - - - + + + Traversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis - - - + + + Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes; the nodes are ordered in document order - - - + + + Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order. - - - + + + - Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list. - - - + Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list. + + + Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one. - - - + + + Traversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes; the nodes are ordered in reverse document order - - - + + + Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on. - - - + + + Traversal function for the "self" direction The self axis contains just the context node itself - - - + + + - Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) nodes is sorted by document order, then exslSetsNodeLeadingSorted is called. - - - + Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called. + + + Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) - - - + + + add a new xmlNodePtr to an existing NodeSet - - + + add a new namespace node to an existing NodeSet - - - + + + add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set. - - + + - checks whether cur contains val - - - + checks whether @cur contains @val + + + - Create a new xmlNodeSetPtr of type double and of value val - - + Create a new xmlNodeSetPtr of type double and of value @val + + Removes an xmlNodePtr from an existing NodeSet - - + + Namespace node in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node need to be freed - + - - Implement a functionality similar to the DOM NodeList.length. - - - - Checks whether ns is empty or not. - - - - Implements a functionality similar to the DOM NodeList.item(). - - - - Merges two nodesets, all nodes from val2 are added to val1 if val1 is NULL, a new set is created and copied from val2 - - - + Merges two nodesets, all nodes from @val2 are added to @val1 if @val1 is NULL, a new set is created and copied from @val2 + + + Removes an entry from an existing NodeSet list. - - + + Sort the node set in document order - + - Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) nodes is sorted by document order, then xmlXPathNodeTrailingSorted is called. - - - + Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted is called. + + + Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) - - - + + + Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node. - - + + - Implement the equal operation on XPath objects content: arg1 == arg2 - - + Implement the equal operation on XPath objects content: @arg1 == @arg2 + + Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise. - - + + Search in the namespace declaration array of the context for the given namespace name associated to the given prefix - - - + + + Implement the number() XPath function number number(object?) - - + + - allocate a new copy of a given object - - + + - - - parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender - - + parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender + + - parse an XML name [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* - - + parse an XML name [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* + + - - - Pops a boolean from the stack, handling conversion if needed. Check error with xmlXPathCheckError. - - + Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError. + + - Pops an external object from the stack, handling conversion if needed. Check error with xmlXPathCheckError. - - + Pops an external object from the stack, handling conversion if needed. Check error with #xmlXPathCheckError. + + - Pops a node-set from the stack, handling conversion if needed. Check error with xmlXPathCheckError. - - + Pops a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError. + + - Pops a number from the stack, handling conversion if needed. Check error with xmlXPathCheckError. - - + Pops a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError. + + - Pops a string from the stack, handling conversion if needed. Check error with xmlXPathCheckError. - - + Pops a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError. + + Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last position will be equal to last(). - - + + Registers all default XPath functions in this context - + - Register a new function. If f is NULL it unregisters the function - - - - + Register a new function. If @f is NULL it unregisters the function + + + + Registers an external mechanism to do function lookup. - - - + + + - Register a new function. If f is NULL it unregisters the function - - - - - + Register a new function. If @f is NULL it unregisters the function + + + + + - Register a new namespace. If ns_uri is NULL it unregisters the namespace - - - - + Register a new namespace. If @ns_uri is NULL it unregisters the namespace + + + + - Register a new variable value. If value is NULL it unregisters the variable - - - - + Register a new variable value. If @value is NULL it unregisters the variable + + + + register an external mechanism to do variable lookup - - - + + + - Register a new variable value. If value is NULL it unregisters the variable - - - - - + Register a new variable value. If @value is NULL it unregisters the variable + + + + + Cleanup the XPath context data associated to registered functions - + Cleanup the XPath context data associated to registered variables - + Cleanup the XPath context data associated to registered variables - + - - Pushes the boolean val on the context stack. - - - - - Pushes an empty node-set on the context stack. - - - - Pushes an empty string on the stack. - - - - Pushes user data on the context stack. - - - - - Pushes false on the context stack. - - - - Pushes the node-set ns on the context stack. - - - - - Pushes the double val on the context stack. - - - - - Pushes the string str on the context stack. - - - - - Pushes true on the context stack. - - Initialize the context to the root of the document - + Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is even is returned. - - + + - - Raises an XPATH_INVALID_ARITY error. - - - - Raises an error. - - - - - Raises an XPATH_INVALID_TYPE error. - - - - Checks if the current value on the XPath stack is an external object. - - - - Check if the current value on the XPath stack is a node set or an XSLT value tree. - - Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false. - - + + - [30a] Float ::= Number ('e' Digits?)? [30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number. - - + [30a] Float ::= Number ('e' Digits?)? [30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number. + + - Implement the string() XPath function string string(object?) he string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member. + Implement the string() XPath function string string(object?) he string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member. - - + + Implement the string-length() XPath function number string-length(string?) The string-length returns the number of characters in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node. - - + + Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function. - + Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01. - - + + Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before("1999/04/01","/") returns 1999. - - + + - Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns "" + Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns "" - - + + Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set. - - + + - Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) nodes1 and nodes2 are sorted by document order, then xmlXPathTrailingSorted is called. - - - + Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called. + + + Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) - - - + + + Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate("--aaa--","abc-","ABC") - - + + Implement the true() XPath function boolean true() - - + + - - Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function. - + - Search in the Variable array of the context for the given variable value. - - - + + + Prototype for callbacks used to plug variable lookup in the XPath engine. - - - - + + + + Search in the Variable array of the context for the given variable value. - - - - + + + + - Wraps a string into an XPath object. - - + + - Wraps the val data into an XPath object. - - + Wraps the @val data into an XPath object. + + - Wrap the Nodeset val in a new xmlXPathObjectPtr - - + Wrap the Nodeset @val in a new xmlXPathObjectPtr + + - Wraps the val string into an XPath object. - - + Wraps the @val string into an XPath object. + + Formats an error message. - - - - + + + + + + + + + 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. - - - + + + - [8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set + [8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set - + Free the LocationSet compound (not the actual ranges !). - + + + + 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. + add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set @val is freed. - - + + - Create a new xmlLocationSetPtr of type double and of value val - - + Create a new xmlLocationSetPtr of type double and of value @val + + Removes an xmlXPathObjectPtr from an existing LocationSet - - + + - Merges two rangesets, all ranges from val2 are added to val1 - - - + Merges two rangesets, all ranges from @val2 are added to @val1 + + + Removes an entry from an existing LocationSet list. - - + + Create a new xmlXPathObjectPtr of type range using a single nodes - - + + Create a new XPointer context - - - - + + + + - Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from set - - + Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from @set + + - Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes start and end - - - + Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes @start and @end + + + Create a new xmlXPathObjectPtr of type range - - - - - + + + + + Create a new xmlXPathObjectPtr of type range from a not to an object - - - + + + Create a new xmlXPathObjectPtr of type range from a node to a point - - - + + + Create a new xmlXPathObjectPtr of type range using 2 nodes - - - + + + Create a new xmlXPathObjectPtr of type range from a point to a node - - - + + + Create a new xmlXPathObjectPtr of type range using 2 Points - - - + + + + + + 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 - - + Wrap the LocationSet @val in a new xmlXPathObjectPtr + + diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 2a463204..29ad8621 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -139,10 +139,17 @@ struct _xmlSchemaAttributeGroup { /** - * Schemas type definition. + * XML_SCHEMAS_TYPE_MIXED: + * + * the element content type is mixed */ #define XML_SCHEMAS_TYPE_MIXED 1 << 0 +/** + * _xmlSchemaType: + * + * Schemas type definition. + */ struct _xmlSchemaType { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaType *next;/* the next type if in a sequence ... */ @@ -166,17 +173,53 @@ struct _xmlSchemaType { }; /** + * xmlSchemaElement: * An element definition. * * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of * structures must be kept similar */ +/** + * XML_SCHEMAS_ELEM_NILLABLE: + * + * the element is nillable + */ #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 +/** + * XML_SCHEMAS_ELEM_GLOBAL: + * + * the element is global + */ #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 +/** + * XML_SCHEMAS_ELEM_DEFAULT: + * + * the element has a default value + */ #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 +/** + * XML_SCHEMAS_ELEM_FIXED: + * + * the element has a fixed value + */ #define XML_SCHEMAS_ELEM_FIXED 1 << 3 +/** + * XML_SCHEMAS_ELEM_ABSTRACT: + * + * the element is abstract + */ #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 +/** + * XML_SCHEMAS_ELEM_TOPLEVEL: + * + * the element is top level + */ #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 +/** + * XML_SCHEMAS_ELEM_REF: + * + * the element is a reference to a type + */ #define XML_SCHEMAS_ELEM_REF 1 << 6 typedef struct _xmlSchemaElement xmlSchemaElement; @@ -208,15 +251,34 @@ struct _xmlSchemaElement { xmlSchemaContentType contentType; }; -/** - * An facet definition. +/* + * XML_SCHEMAS_FACET_UNKNOWN: * + * unknown facet handling */ #define XML_SCHEMAS_FACET_UNKNOWN 0 +/* + * XML_SCHEMAS_FACET_PRESERVE: + * + * preserve the type of the facet + */ #define XML_SCHEMAS_FACET_PRESERVE 1 +/* + * XML_SCHEMAS_FACET_REPLACE: + * + * replace the type of the facet + */ #define XML_SCHEMAS_FACET_REPLACE 2 +/* + * XML_SCHEMAS_FACET_COLLAPSE: + * + * collapse the types of the facet + */ #define XML_SCHEMAS_FACET_COLLAPSE 3 +/** + * A facet definition. + */ struct _xmlSchemaFacet { xmlSchemaTypeType type; /* The kind of type */ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ @@ -243,10 +305,22 @@ struct _xmlSchemaNotation { }; /** - * A Schemas definition + * XML_SCHEMAS_QUALIF_ELEM: + * + * the shemas requires qualified elements */ #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 +/** + * XML_SCHEMAS_QUALIF_ATTR: + * + * the shemas requires qualified attributes + */ #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 +/** + * _xmlSchema: + * + * A Schemas definition + */ struct _xmlSchema { xmlChar *name; /* schema name */ xmlChar *targetNamespace; /* the target namespace */ diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 1eb714a4..93d57e31 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -240,7 +240,7 @@ struct _xmlElementContent { struct _xmlElementContent *c1; /* first child */ struct _xmlElementContent *c2; /* second child */ struct _xmlElementContent *parent; /* parent */ - const xmlChar *prefix; /* Element name */ + const xmlChar *prefix; /* Namespace prefix */ }; /** diff --git a/libxml.spec.in b/libxml.spec.in index b33664d0..c8e051be 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -115,7 +115,7 @@ rm -fr %{buildroot} %doc %{_mandir}/man1/xml2-config.1* %doc AUTHORS ChangeLog NEWS README Copyright TODO %doc doc/*.html doc/html doc/*.gif doc/*.png -%doc doc/tutorial +%doc doc/tutorial doc/libxml2-api.xml %{_libdir}/lib*.so %{_libdir}/*a diff --git a/nanohttp.c b/nanohttp.c index c07587e9..614fab75 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -1422,6 +1422,8 @@ xmlNanoHTTPAuthHeader(void *ctx) { * xmlNanoHTTPContentLength: * @ctx: the HTTP context * + * Provides the specified content length from the HTTP header. + * * Return the specified content length from the HTTP header. Note that * a value of -1 indicates that the content length element was not included in * the response header. @@ -1439,6 +1441,8 @@ xmlNanoHTTPContentLength( void * ctx ) { * @ptr: pointer to set to the content buffer. * @len: integer pointer to hold the length of the content * + * Check if all the content was read + * * Returns 0 if all the content was read and available, returns * -1 if received content length was less than specified or an error * occurred. diff --git a/parser.c b/parser.c index a38245e9..66908264 100644 --- a/parser.c +++ b/parser.c @@ -4364,6 +4364,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { /** * xmlParseElementMixedContentDecl: * @ctxt: an XML parser context + * @inputchk: the input used for the current entity, needed for boundary checks * * parse the declaration for a Mixed Element content * The leading '(' and spaces have been skipped in xmlParseElementContentDecl @@ -4491,6 +4492,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, xmlParserInputPtr inputch /** * xmlParseElementChildrenContentDecl: * @ctxt: an XML parser context + * @inputchk: the input used for the current entity, needed for boundary checks * * parse the declaration for a Mixed Element content * The leading '(' and spaces have been skipped in xmlParseElementContentDecl diff --git a/parserInternals.c b/parserInternals.c index b4e7d11c..65551441 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -2712,8 +2712,8 @@ xmlCheckLanguageID(const xmlChar *lang) { /** * xmlDecodeEntities: * @ctxt: the parser context - * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF * @len: the len to decode (in bytes !), -1 for no size limit + * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF * @end: an end marker xmlChar, 0 if none * @end2: an end marker xmlChar, 0 if none * @end3: an end marker xmlChar, 0 if none diff --git a/python/libxml2class.txt b/python/libxml2class.txt index 9ade3f96..f94976a7 100644 --- a/python/libxml2class.txt +++ b/python/libxml2class.txt @@ -38,6 +38,7 @@ newCatalog() parseCatalogFile() # functions from module debugXML +boolToText() debugDumpString() shellPrintXPathError() @@ -151,13 +152,6 @@ validateNamesValue() validateNmtokenValue() validateNmtokensValue() -# functions from module wincecompat -close() -getenv() -read() -strerror() -write() - # functions from module xmlIO checkFilename() cleanupInputCallbacks() @@ -171,9 +165,16 @@ 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() @@ -394,6 +395,9 @@ Class xmlNode(xmlCore) unsetNsProp() unsetProp() + # functions from module tree.c + newReconciliedNs() + # functions from module valid isID() isRef() @@ -421,6 +425,9 @@ Class xmlNode(xmlCore) xpathNextPrecedingSibling() xpathNextSelf() + # functions from module xpointer.c + xpointerAdvanceNode() + Class xmlDoc(xmlNode) @@ -441,6 +448,9 @@ Class xmlDoc(xmlNode) htmlSaveFileFormat() htmlSetMetaEncoding() + # functions from module HTMLtree.c + htmlNodeDumpOutput() + # functions from module debugXML debugDumpDocument() debugDumpDocumentHead() @@ -456,6 +466,9 @@ Class xmlDoc(xmlNode) encodeSpecialChars() parameterEntity() + # functions from module parserInternals.c + upgradeOldNs() + # functions from module tree copyDoc() createIntSubset() @@ -623,6 +636,15 @@ Class xpathParserContext() xpathTrueFunction() xpathValueFlipSign() xpatherror() + + # functions from module xpointer.c + xpointerEndPointFunction() + xpointerHereFunction() + xpointerOriginFunction() + xpointerRangeFunction() + xpointerRangeInsideFunction() + xpointerStartPointFunction() + xpointerStringRangeFunction() Class parserCtxt() # accessors doc() @@ -641,6 +663,9 @@ Class parserCtxt() htmlParseDocument() htmlParseElement() + # functions from module HTMLparser.c + htmlDecodeEntities() + # functions from module parser clearParserCtxt() freeParserCtxt() @@ -648,8 +673,13 @@ Class parserCtxt() parseChunk() parseDocument() parseExtParsedEnt() + setupParserForBuffer() stopParser() + # functions from module parser.c + parseAttValueComplex() + parseCharDataComplex() + # functions from module parserInternals decodeEntities() namespaceParseNCName() @@ -713,6 +743,9 @@ Class xmlDtd(xmlNode) dtdQAttrDesc() dtdQElementDesc() + # functions from module valid.c + scanAttributeDecl() + Class xmlNs(xmlNode) diff --git a/tree.c b/tree.c index 60ae9311..c3d30450 100644 --- a/tree.c +++ b/tree.c @@ -899,8 +899,9 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { * @list: a Node list * @inLine: should we replace entity contents or show their external form * - * Returns the string equivalent to the text contained in the Node list + * Build the string equivalent to the text contained in the Node list * made of TEXTs and ENTITY_REFs + * * Returns a pointer to the string copy, the caller must free it with xmlFree(). */ xmlChar * @@ -977,7 +978,7 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) * @list: a Node list * @inLine: should we replace entity contents or show their external form * - * Returns the string equivalent to the text contained in the Node list + * Builds the string equivalent to the text contained in the Node list * made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() * this function doesn't do any character encoding handling. * @@ -7470,6 +7471,8 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding, * @encoding: the name of the encoding to use or NULL. * @format: should formatting spaces be added. * + * Dump an XML document to a file or an URL. + * * Returns the number of bytes written or -1 in case of error. */ int diff --git a/valid.c b/valid.c index 7f18a6f1..421a29aa 100644 --- a/valid.c +++ b/valid.c @@ -3825,6 +3825,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, * @ctxt: the validation context * @doc: a document instance * @elem: an element instance + * @prefix: the namespace prefix * @ns: an namespace declaration instance * @value: the attribute value (without entities processing) * diff --git a/xmlIO.c b/xmlIO.c index 0add8237..8bd9f9ca 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -246,7 +246,7 @@ xmlCleanupOutputCallbacks(void) ************************************************************************/ /** - * xmlCheckFilename + * xmlCheckFilename: * @path: the path to check * * function checks to see if @path is a valid source @@ -461,6 +461,8 @@ xmlFileWrite (void * context, const char * buffer, int len) { * @context: the I/O context * * Close an I/O channel + * + * Returns 0 or -1 in case of error */ int xmlFileClose (void * context) { @@ -1033,7 +1035,7 @@ xmlIOHTTPOpen (const char *filename) { } /** - * xmlIOHTTPOpenW + * xmlIOHTTPOpenW: * @post_uri: The destination URI for the document * @compression: The compression desired for the document. * @@ -1176,6 +1178,8 @@ xmlIOHTTPWrite( void * context, const char * buffer, int len ) { * @context: the I/O context * * Close an HTTP I/O channel + * + * Returns 0 */ int xmlIOHTTPClose (void * context) { @@ -1396,6 +1400,8 @@ xmlIOFTPRead(void * context, char * buffer, int len) { * @context: the I/O context * * Close an FTP I/O channel + * + * Returns 0 */ int xmlIOFTPClose (void * context) { @@ -1524,7 +1530,7 @@ xmlRegisterDefaultOutputCallbacks #ifdef LIBXML_HTTP_ENABLED /** - * xmlRegisterHTTPPostCallbacks + * xmlRegisterHTTPPostCallbacks: * * By default, libxml submits HTTP output requests using the "PUT" method. * Calling this method changes the HTTP output method to use the "POST" diff --git a/xmlmemory.c b/xmlmemory.c index ba3965cf..55276686 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -427,7 +427,7 @@ xmlMemoryStrdup(const char *str) { /** * xmlMemUsed: * - * returns the amount of memory currently allocated + * Provides the amount of memory currently allocated * * Returns an int representing the amount of memory allocated. */ @@ -754,12 +754,12 @@ xmlMemSetup(xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc, /** * xmlMemGet: - * @freeFunc: the free() function in use - * @mallocFunc: the malloc() function in use - * @reallocFunc: the realloc() function in use - * @strdupFunc: the strdup() function in use + * @freeFunc: place to save the free() function in use + * @mallocFunc: place to save the malloc() function in use + * @reallocFunc: place to save the realloc() function in use + * @strdupFunc: place to save the strdup() function in use * - * Return the memory access functions set currently in use + * Provides the memory access functions set currently in use * * Returns 0 on success */ diff --git a/xmlreader.c b/xmlreader.c index 19857e7f..9768492b 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -482,7 +482,7 @@ xmlFreeTextReader(xmlTextReaderPtr reader) { * xmlTextReaderAttributeCount: * @reader: the xmlTextReaderPtr used * - * Returns the number of attributes of the current node + * Provides the number of attributes of the current node * * Returns 0 i no attributes, -1 in case of error or the attribute count */ diff --git a/xmlregexp.c b/xmlregexp.c index d902a117..129c1269 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -3961,6 +3961,8 @@ xmlFreeAutomata(xmlAutomataPtr am) { * xmlAutomataGetInitState: * @am: an automata * + * Initial state lookup + * * Returns the initial state of the automata */ xmlAutomataStatePtr @@ -4028,7 +4030,8 @@ xmlAutomataNewTransition(xmlAutomataPtr am, xmlAutomataStatePtr from, * @to: the target point of the transition or NULL * @token: the input string associated to that transition * @min: the minimum successive occurences of token - * @min: the maximum successive occurences of token + * @max: the maximum successive occurences of token + * @data: data associated to the transition * * If @to is NULL, this create first a new target state in the automata * and then adds a transition from the @from state to the target state @@ -4077,7 +4080,8 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, * @to: the target point of the transition or NULL * @token: the input string associated to that transition * @min: the minimum successive occurences of token - * @min: the maximum successive occurences of token + * @max: the maximum successive occurences of token + * @data: data associated to the transition * * If @to is NULL, this create first a new target state in the automata * and then adds a transition from the @from state to the target state @@ -4153,7 +4157,7 @@ xmlAutomataNewState(xmlAutomataPtr am) { } /** - * xmlAutomataNewTransition: + * xmlAutomataNewEpsilon: * @am: an automata * @from: the starting point of the transition * @to: the target point of the transition or NULL @@ -4180,6 +4184,7 @@ xmlAutomataNewEpsilon(xmlAutomataPtr am, xmlAutomataStatePtr from, * @am: an automata * @from: the starting point of the transition * @to: the target point of the transition or NULL + * @lax: allow to transition if not all all transitions have been activated * * If @to is NULL, this create first a new target state in the automata * and then adds a an ALL transition from the @from state to the diff --git a/xmlschemas.c b/xmlschemas.c index 2312bfa4..9bafb2dc 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -5401,7 +5401,7 @@ xmlSchemaFreeValidCtxt(xmlSchemaValidCtxtPtr ctxt) { * @ctxt: a schema validation context * @err: the error function * @warn: the warning function - * @ctxt: the functions context + * @ctx: the functions context * * Set the error and warning callback informations */