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 pattern 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-parserInternals.html
Prev
libxml-parserInternals.html
parserInternals
index.html
Up
index.html
API documentation
../index.html
Home
../index.html
The XML C parser and toolkit of Gnome
libxml-relaxng.html
relaxng
libxml-relaxng.html
Next
allows to compile and test pattern expressions for nodes either in a tree or based on a parser state.
Table of Contents
Structure
#xmlPattern
xmlPattern
struct _xmlPattern
The content of this structure is not made public by the API.
Enum
#xmlPatternFlags
xmlPatternFlags
Typedef
libxml-pattern.html#xmlPattern
xmlPattern
*
xmlPatternPtr
Structure
#xmlStreamCtxt
xmlStreamCtxt
struct _xmlStreamCtxt
The content of this structure is not made public by the API.
Typedef
libxml-pattern.html#xmlStreamCtxt
xmlStreamCtxt
*
xmlStreamCtxtPtr
void
#xmlFreePattern
xmlFreePattern
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
void
#xmlFreePatternList
xmlFreePatternList
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
void
#xmlFreeStreamCtxt
xmlFreeStreamCtxt
(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream)
int
#xmlPatternFromRoot
xmlPatternFromRoot
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
#xmlPatternGetStreamCtxt
xmlPatternGetStreamCtxt
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
int
#xmlPatternMatch
xmlPatternMatch
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
int
#xmlPatternMaxDepth
xmlPatternMaxDepth
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
int
#xmlPatternStreamable
xmlPatternStreamable
(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
#xmlPatterncompile
xmlPatterncompile
(const
libxml-xmlstring.html#xmlChar
xmlChar
* pattern,
libxml-dict.html#xmlDict
xmlDict
* dict,
libxml-pattern.html#xmlPatternFlags
xmlPatternFlags
flags,
const
libxml-xmlstring.html#xmlChar
xmlChar
** namespaces)
int
#xmlStreamPop
xmlStreamPop
(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream)
int
#xmlStreamPush
xmlStreamPush
(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ns)
int
#xmlStreamPushAttr
xmlStreamPushAttr
(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ns)
Description
Structure xmlPattern
Structure xmlPattern
struct _xmlPattern {
The content of this structure is not made public by the API.
}
Enum
xmlPatternFlags
Enum xmlPatternFlags {
XML_PATTERN_DEFAULT
= 0 : simple pattern match
XML_PATTERN_XPATH
= 1 : standard XPath pattern
XML_PATTERN_XSSEL
= 2 : XPath subset for schema selector
XML_PATTERN_XSFIELD
= 4 : XPath subset for schema field
}
Structure xmlStreamCtxt
Structure xmlStreamCtxt
struct _xmlStreamCtxt {
The content of this structure is not made public by the API.
}
Function: xmlFreePattern
void	xmlFreePattern			(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Free up the memory allocated by @comp
comp
:
an XSLT comp
Function: xmlFreePatternList
void	xmlFreePatternList		(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Free up the memory allocated by all the elements of @comp
comp
:
an XSLT comp list
Function: xmlFreeStreamCtxt
void	xmlFreeStreamCtxt		(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream)
Free the stream context
stream
:
the stream context
Function: xmlPatternFromRoot
int	xmlPatternFromRoot		(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Check if the pattern must be looked at from the root.
comp
:
the precompiled pattern
Returns
:
1 if true, 0 if false and -1 in case of error
Function: xmlPatternGetStreamCtxt
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
xmlPatternGetStreamCtxt	(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Get a streaming context for that pattern Use
libxml-pattern.html#xmlFreeStreamCtxt
xmlFreeStreamCtxt
to free the context.
comp
:
the precompiled pattern
Returns
:
a pointer to the context or NULL in case of failure
Function: xmlPatternMatch
int	xmlPatternMatch			(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp,
libxml-tree.html#xmlNodePtr
xmlNodePtr
node)
Test whether the node matches the pattern
comp
:
the precompiled pattern
node
:
a node
Returns
:
1 if it matches, 0 if it doesn't and -1 in case of failure
Function: xmlPatternMaxDepth
int	xmlPatternMaxDepth		(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Check the maximum depth reachable by a pattern
comp
:
the precompiled pattern
Returns
:
-2 if no limit (using //), otherwise the depth, and -1 in case of error
Function: xmlPatternStreamable
int	xmlPatternStreamable		(
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
comp)
Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.
comp
:
the precompiled pattern
Returns
:
1 if streamable, 0 if not and -1 in case of error.
Function: xmlPatterncompile
libxml-pattern.html#xmlPatternPtr
xmlPatternPtr
xmlPatterncompile	(const
libxml-xmlstring.html#xmlChar
xmlChar
* pattern,
libxml-dict.html#xmlDict
xmlDict
* dict,
libxml-pattern.html#xmlPatternFlags
xmlPatternFlags
flags,
const
libxml-xmlstring.html#xmlChar
xmlChar
** namespaces)
Compile a pattern.
pattern
:
the pattern to compile
dict
:
an optional dictionary for interned strings
flags
:
compilation flags, undefined yet
namespaces
:
the prefix definitions, array of [URI, prefix] or NULL
Returns
:
the compiled form of the pattern or NULL in case of error
Function: xmlStreamPop
int	xmlStreamPop			(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream)
push one level from the stream.
stream
:
the stream context
Returns
:
-1 in case of error, 0 otherwise.
Function: xmlStreamPush
int	xmlStreamPush			(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ns)
Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.
stream
:
the stream context
name
:
the current name
ns
:
the namespace name
Returns
:
-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.
Function: xmlStreamPushAttr
int	xmlStreamPushAttr		(
libxml-pattern.html#xmlStreamCtxtPtr
xmlStreamCtxtPtr
stream,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ns)
Push new
libxml-SAX.html#attribute
attribute
data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset.
stream
:
the stream context
name
:
the current name
ns
:
the namespace name
Returns
:
-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.
../bugs.html
Daniel Veillard
