http://swpat.ffii.org/
Action against software patents
http://www.gnome.org/
Gnome2 Logo
http://www.w3.org/Status
W3C Logo
http://www.redhat.com/
Red Hat Logo
http://xmlsoft.org/
Made with Libxml2 Logo
Module xmlregexp from libxml2
API Menu
../index.html
Main Menu
../docs.html
Developer Menu
../examples/index.html
Code Examples
index.html
API Menu
libxml-parser.html
Parser API
libxml-tree.html
Tree API
libxml-xmlreader.html
Reader API
../guidelines.html
XML Guidelines
../ChangeLog.html
ChangeLog
API Indexes
../APIchunk0.html
Alphabetic
../APIconstructors.html
Constructors
../APIfunctions.html
Functions/Types
../APIfiles.html
Modules
../APIsymbols.html
Symbols
Related links
http://mail.gnome.org/archives/xml/
Mail archive
http://xmlsoft.org/XSLT/
XSLT libxslt
http://phd.cs.unibo.it/gdome2/
DOM gdome2
http://www.aleksey.com/xmlsec/
XML-DSig xmlsec
ftp://xmlsoft.org/
FTP
http://www.zlatkovic.com/projects/libxml/
Windows binaries
http://www.blastwave.org/packages.php/libxml2
Solaris binaries
http://www.explain.com.au/oss/libxml2xslt.html
MacOsX binaries
http://libxmlplusplus.sourceforge.net/
C++ bindings
http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4
PHP bindings
http://sourceforge.net/projects/libxml2-pas/
Pascal bindings
http://rubyforge.org/projects/xml-tools/
Ruby bindings
http://tclxml.sourceforge.net/
Tcl bindings
http://bugzilla.gnome.org/buglist.cgi?product=libxml2
Bug Tracker
libxml-xmlreader.html
Prev
libxml-xmlreader.html
xmlreader
index.html
Up
index.html
API documentation
../index.html
Home
../index.html
The XML C parser and toolkit of Gnome
libxml-xmlsave.html
xmlsave
libxml-xmlsave.html
Next
basic API for libxml regular expressions handling used for XML Schemas and validation.
Table of Contents
Structure
#xmlRegExecCtxt
xmlRegExecCtxt
struct _xmlRegExecCtxt
The content of this structure is not made public by the API.
Typedef
libxml-xmlregexp.html#xmlRegExecCtxt
xmlRegExecCtxt
*
xmlRegExecCtxtPtr
Structure
#xmlRegexp
xmlRegexp
struct _xmlRegexp
The content of this structure is not made public by the API.
Typedef
libxml-xmlregexp.html#xmlRegexp
xmlRegexp
*
xmlRegexpPtr
Function type:
#xmlRegExecCallbacks
xmlRegExecCallbacks
void
#xmlRegExecCallbacks
xmlRegExecCallbacks
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* token,
void * transdata,
void * inputdata)
int
#xmlRegExecErrInfo
xmlRegExecErrInfo
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
** string,
int * nbval,
int * nbneg,
libxml-xmlstring.html#xmlChar
xmlChar
** values,
int * terminal)
int
#xmlRegExecNextValues
xmlRegExecNextValues
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
int * nbval,
int * nbneg,
libxml-xmlstring.html#xmlChar
xmlChar
** values,
int * terminal)
int
#xmlRegExecPushString
xmlRegExecPushString
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value,
void * data)
int
#xmlRegExecPushString2
xmlRegExecPushString2
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value2,
void * data)
void
#xmlRegFreeExecCtxt
xmlRegFreeExecCtxt
(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec)
void
#xmlRegFreeRegexp
xmlRegFreeRegexp
(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
regexp)
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
#xmlRegNewExecCtxt
xmlRegNewExecCtxt
(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp,
libxml-xmlregexp.html#xmlRegExecCallbacks
xmlRegExecCallbacks
callback,
void * data)
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
#xmlRegexpCompile
xmlRegexpCompile
(const
libxml-xmlstring.html#xmlChar
xmlChar
* regexp)
int
#xmlRegexpExec
xmlRegexpExec
(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp,
const
libxml-xmlstring.html#xmlChar
xmlChar
* content)
int
#xmlRegexpIsDeterminist
xmlRegexpIsDeterminist
(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp)
void
#xmlRegexpPrint
xmlRegexpPrint
(FILE * output,
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
regexp)
Description
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
void	xmlRegExecCallbacks		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* token,
void * transdata,
void * inputdata)
exec
:
token
:
transdata
:
inputdata
:
Function: xmlRegExecErrInfo
int	xmlRegExecErrInfo		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
** string,
int * nbval,
int * nbneg,
libxml-xmlstring.html#xmlChar
xmlChar
** values,
int * terminal)
Extract error informations from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values
exec
:
a regexp execution context generating an error
string
:
return value for the error string
nbval
:
pointer to the number of accepted values IN/OUT
nbneg
:
return number of negative transitions
values
:
pointer to the array of acceptable values
terminal
:
return value if this was a terminal state
Returns
:
will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.
Function: xmlRegExecNextValues
int	xmlRegExecNextValues		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
int * nbval,
int * nbneg,
libxml-xmlstring.html#xmlChar
xmlChar
** values,
int * terminal)
Extract informations from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values
exec
:
a regexp execution context
nbval
:
pointer to the number of accepted values IN/OUT
nbneg
:
return number of negative transitions
values
:
pointer to the array of acceptable values
terminal
:
return value if this was a terminal state
Returns
:
will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.
Function: xmlRegExecPushString
int	xmlRegExecPushString		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value,
void * data)
Push one input token in the execution context
exec
:
a regexp execution context or NULL to indicate the end
value
:
a string token input
data
:
data associated to the token to reuse in callbacks
Returns
:
1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.
Function: xmlRegExecPushString2
int	xmlRegExecPushString2		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value2,
void * data)
Push one input token in the execution context
exec
:
a regexp execution context or NULL to indicate the end
value
:
the first string token input
value2
:
the second string token input
data
:
data associated to the token to reuse in callbacks
Returns
:
1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.
Function: xmlRegFreeExecCtxt
void	xmlRegFreeExecCtxt		(
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
exec)
Free the structures associated to a regular expression evaulation context.
exec
:
a regular expression evaulation context
Function: xmlRegFreeRegexp
void	xmlRegFreeRegexp		(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
regexp)
Free a regexp
regexp
:
the regexp
Function: xmlRegNewExecCtxt
libxml-xmlregexp.html#xmlRegExecCtxtPtr
xmlRegExecCtxtPtr
xmlRegNewExecCtxt	(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp,
libxml-xmlregexp.html#xmlRegExecCallbacks
xmlRegExecCallbacks
callback,
void * data)
Build a context used for progressive evaluation of a regexp.
comp
:
a precompiled regular expression
callback
:
a callback function used for handling progresses in the automata matching phase
data
:
the context data associated to the callback in this context
Returns
:
the new context
Function: xmlRegexpCompile
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
xmlRegexpCompile	(const
libxml-xmlstring.html#xmlChar
xmlChar
* regexp)
Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression
regexp
:
a regular expression string
Returns
:
the compiled expression or NULL in case of error
Function: xmlRegexpExec
int	xmlRegexpExec			(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp,
const
libxml-xmlstring.html#xmlChar
xmlChar
* content)
Check if the regular expression generates the value
comp
:
the compiled regular expression
content
:
the value to check against the regular expression
Returns
:
1 if it matches, 0 if not and a negative value in case of error
Function: xmlRegexpIsDeterminist
int	xmlRegexpIsDeterminist		(
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
comp)
Check if the regular expression is determinist
comp
:
the compiled regular expression
Returns
:
1 if it yes, 0 if not and a negative value in case of error
Function: xmlRegexpPrint
void	xmlRegexpPrint			(FILE * output,
libxml-xmlregexp.html#xmlRegexpPtr
xmlRegexpPtr
regexp)
Print the content of the compiled regular expression
output
:
the file for the output debug
regexp
:
the compiled regexp
../bugs.html
Daniel Veillard
