From a464d9993e2acd5b8e1089b218ba74c6fcf215c5 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Mon, 5 Sep 2005 17:10:35 +0000 Subject: Load /usr/tmp/tmp.CMoFff/libxml2-2.6.21 into packages/libxml2/branches/upstream/current. --- doc/html/libxml-xmlregexp.html | 84 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 4 deletions(-) (limited to 'doc/html/libxml-xmlregexp.html') diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html index 4b6d888..761e105 100644 --- a/doc/html/libxml-xmlregexp.html +++ b/doc/html/libxml-xmlregexp.html @@ -10,13 +10,39 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlregexp from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlregexp from libxml2

API Menu
API Indexes
Related links

basic API for libxml regular expressions handling used for XML Schemas and validation.

Table of Contents

Structure xmlRegExecCtxt
struct _xmlRegExecCtxt + Module xmlregexp from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlregexp from libxml2

API Menu
API Indexes
Related links

basic API for libxml regular expressions handling used for XML Schemas and validation.

Table of Contents

Structure xmlExpCtxt
struct _xmlExpCtxt +The content of this structure is not made public by the API. +
Typedef xmlExpCtxt * xmlExpCtxtPtr
+
Structure xmlExpNode
struct _xmlExpNode +The content of this structure is not made public by the API. +
Typedef xmlExpNode * xmlExpNodePtr
+
Enum xmlExpNodeType
+
Structure xmlRegExecCtxt
struct _xmlRegExecCtxt The content of this structure is not made public by the API.
Typedef xmlRegExecCtxt * xmlRegExecCtxtPtr
 
Structure xmlRegexp
struct _xmlRegexp The content of this structure is not made public by the API.
Typedef xmlRegexp * xmlRegexpPtr
-
Function type: xmlRegExecCallbacks
+
int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt)
+
int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt)
+
void	xmlExpDump			(xmlBufferPtr buf, 
xmlExpNodePtr expr)
+
xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)
+
void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp)
+
void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)
+
int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** list,
int len)
+
int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** list,
int len)
+
int	xmlExpIsNillable		(xmlExpNodePtr exp)
+
int	xmlExpMaxToken			(xmlExpNodePtr expr)
+
xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
const xmlChar * name,
int len)
+
xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)
+
xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)
+
xmlExpNodePtr	xmlExpNewRange		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr subset,
int min,
int max)
+
xmlExpNodePtr	xmlExpNewSeq		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)
+
xmlExpNodePtr	xmlExpParse		(xmlExpCtxtPtr ctxt, 
const char * expr)
+
void	xmlExpRef			(xmlExpNodePtr exp)
+
xmlExpNodePtr	xmlExpStringDerive	(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar * str,
int len)
+
int	xmlExpSubsume			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)
+
Function type: xmlRegExecCallbacks
 void	xmlRegExecCallbacks		(xmlRegExecCtxtPtr exec, 
const xmlChar * token,
void * transdata,
void * inputdata)
int	xmlRegExecErrInfo		(xmlRegExecCtxtPtr exec, 
const xmlChar ** string,
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal)
@@ -31,11 +57,61 @@ void xmlRegExecCallbacks (int xmlRegexpIsDeterminist (xmlRegexpPtr comp)
void	xmlRegexpPrint			(FILE * output, 
xmlRegexpPtr regexp)

Description

-

Structure xmlRegExecCtxt

Structure xmlRegExecCtxt
struct _xmlRegExecCtxt { +

Structure xmlExpCtxt

Structure xmlExpCtxt
struct _xmlExpCtxt { +The content of this structure is not made public by the API. +}

Structure xmlExpNode

Structure xmlExpNode
struct _xmlExpNode { +The content of this structure is not made public by the API. +}

Enum xmlExpNodeType

Enum xmlExpNodeType {
+    XML_EXP_EMPTY = 0
+    XML_EXP_FORBID = 1
+    XML_EXP_ATOM = 2
+    XML_EXP_SEQ = 3
+    XML_EXP_OR = 4
+    XML_EXP_COUNT = 5
+}
+

Structure xmlRegExecCtxt

Structure xmlRegExecCtxt
struct _xmlRegExecCtxt { The content of this structure is not made public by the API. }

Structure xmlRegexp

Structure xmlRegexp
struct _xmlRegexp { The content of this structure is not made public by the API. -}

Function type: xmlRegExecCallbacks

Function type: xmlRegExecCallbacks
+}

Function: xmlExpCtxtNbCons

int	xmlExpCtxtNbCons		(xmlExpCtxtPtr ctxt)
+

Debugging facility provides the number of allocated nodes over lifetime

+
ctxt:an expression context
Returns:the number of nodes ever allocated or -1 in case of error

Function: xmlExpCtxtNbNodes

int	xmlExpCtxtNbNodes		(xmlExpCtxtPtr ctxt)
+

Debugging facility provides the number of allocated nodes at a that point

+
ctxt:an expression context
Returns:the number of nodes in use or -1 in case of error

Function: xmlExpDump

void	xmlExpDump			(xmlBufferPtr buf, 
xmlExpNodePtr expr)
+

Serialize the expression as compiled to the buffer

+
buf:a buffer to receive the output
expr:the compiled expression

Function: xmlExpExpDerive

xmlExpNodePtr	xmlExpExpDerive		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)
+

Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.

+
ctxt:the expressions context
exp:the englobing expression
sub:the subexpression
Returns:the resulting expression or NULL in case of internal error, the result must be freed

Function: xmlExpFree

void	xmlExpFree			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp)
+

Dereference the expression

+
ctxt:the expression context
exp:the expression

Function: xmlExpFreeCtxt

void	xmlExpFreeCtxt			(xmlExpCtxtPtr ctxt)
+

Free an expression context

+
ctxt:an expression context

Function: xmlExpGetLanguage

int	xmlExpGetLanguage		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** list,
int len)
+

Find all the strings used in @exp and store them in @list

+
ctxt:the expression context
exp:the expression
list:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpGetStart

int	xmlExpGetStart			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar ** list,
int len)
+

Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]

+
ctxt:the expression context
exp:the expression
list:where to store the tokens
len:the allocated lenght of @list
Returns:the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings

Function: xmlExpIsNillable

int	xmlExpIsNillable		(xmlExpNodePtr exp)
+

Finds if the expression is nillable, i.e. if it accepts the empty sequqnce

+
exp:the expression
Returns:1 if nillable, 0 if not and -1 in case of error

Function: xmlExpMaxToken

int	xmlExpMaxToken			(xmlExpNodePtr expr)
+

Indicate the maximum number of input a expression can accept

+
expr:a compiled expression
Returns:the maximum length or -1 in case of error

Function: xmlExpNewAtom

xmlExpNodePtr	xmlExpNewAtom		(xmlExpCtxtPtr ctxt, 
const xmlChar * name,
int len)
+

Get the atom associated to this name from that context

+
ctxt:the expression context
name:the atom name
len:the atom name lenght in byte (or -1);
Returns:the node or NULL in case of error

Function: xmlExpNewCtxt

xmlExpCtxtPtr	xmlExpNewCtxt		(int maxNodes, 
xmlDictPtr dict)
+

Creates a new context for manipulating expressions

+
maxNodes:the maximum number of nodes
dict:optional dictionnary to use internally
Returns:the context or NULL in case of error

Function: xmlExpNewOr

xmlExpNodePtr	xmlExpNewOr		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)
+

Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

+
ctxt:the expression context
left:left expression
right:right expression
Returns:the node or NULL in case of error

Function: xmlExpNewRange

xmlExpNodePtr	xmlExpNewRange		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr subset,
int min,
int max)
+

Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).

+
ctxt:the expression context
subset:the expression to be repeated
min:the lower bound for the repetition
max:the upper bound for the repetition, -1 means infinite
Returns:the node or NULL in case of error

Function: xmlExpNewSeq

xmlExpNodePtr	xmlExpNewSeq		(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr left,
xmlExpNodePtr right)
+

Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).

+
ctxt:the expression context
left:left expression
right:right expression
Returns:the node or NULL in case of error

Function: xmlExpParse

xmlExpNodePtr	xmlExpParse		(xmlExpCtxtPtr ctxt, 
const char * expr)
+

Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values

+
ctxt:the expressions context
expr:the 0 terminated string
Returns:a new expression or NULL in case of failure

Function: xmlExpRef

void	xmlExpRef			(xmlExpNodePtr exp)
+

Increase the reference count of the expression

+
exp:the expression

Function: xmlExpStringDerive

xmlExpNodePtr	xmlExpStringDerive	(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
const xmlChar * str,
int len)
+

Do one step of Brzozowski derivation of the expression @exp with respect to the input string

+
ctxt:the expression context
exp:the expression
str:the string
len:the string len in bytes if available
Returns:the resulting expression or NULL in case of internal error

Function: xmlExpSubsume

int	xmlExpSubsume			(xmlExpCtxtPtr ctxt, 
xmlExpNodePtr exp,
xmlExpNodePtr sub)
+

Check whether @exp accepts all the languages accexpted by @sub the input being a subexpression.

+
ctxt:the expressions context
exp:the englobing expression
sub:the subexpression
Returns:1 if true 0 if false and -1 in case of failure.

Function type: xmlRegExecCallbacks

Function type: xmlRegExecCallbacks
 void	xmlRegExecCallbacks		(xmlRegExecCtxtPtr exec, 
const xmlChar * token,
void * transdata,
void * inputdata)

exec:
token:
transdata:
inputdata:

Function: xmlRegExecErrInfo

int	xmlRegExecErrInfo		(xmlRegExecCtxtPtr exec, 
const xmlChar ** string,
int * nbval,
int * nbneg,
xmlChar ** values,
int * terminal)
-- cgit v1.2.3