2003-12-02 22:32:15 +00:00
/*
* Summary : pattern expression handling
* Description : allows to compile and test pattern expressions for nodes
* either in a tree or based on a parser state .
*
* Copy : See Copyright for the status of this software .
*
* Author : Daniel Veillard
*/
# ifndef __XML_PATTERN_H__
# define __XML_PATTERN_H__
# include <libxml/xmlversion.h>
# include <libxml/tree.h>
# include <libxml/dict.h>
2004-06-27 12:08:10 +00:00
# ifdef LIBXML_PATTERN_ENABLED
2003-12-02 22:32:15 +00:00
# ifdef __cplusplus
extern " C " {
# endif
/**
* xmlPattern :
*
* A compiled ( XPath based ) pattern to select nodes
*/
typedef struct _xmlPattern xmlPattern ;
typedef xmlPattern * xmlPatternPtr ;
XMLPUBFUN void XMLCALL
xmlFreePattern ( xmlPatternPtr comp ) ;
XMLPUBFUN void XMLCALL
xmlFreePatternList ( xmlPatternPtr comp ) ;
XMLPUBFUN xmlPatternPtr XMLCALL
xmlPatterncompile ( const xmlChar * pattern ,
2003-12-05 14:57:46 +00:00
xmlDict * dict ,
2003-12-05 16:10:21 +00:00
int flags ,
const xmlChar * * namespaces ) ;
2003-12-02 22:32:15 +00:00
XMLPUBFUN int XMLCALL
xmlPatternMatch ( xmlPatternPtr comp ,
xmlNodePtr node ) ;
2005-01-30 18:42:55 +00:00
/* streaming interfaces */
typedef struct _xmlStreamCtxt xmlStreamCtxt ;
typedef xmlStreamCtxt * xmlStreamCtxtPtr ;
2005-02-16 00:22:29 +00:00
XMLPUBFUN int XMLCALL
xmlPatternStreamable ( xmlPatternPtr comp ) ;
XMLPUBFUN int XMLCALL
xmlPatternMaxDepth ( xmlPatternPtr comp ) ;
XMLPUBFUN int XMLCALL
xmlPatternFromRoot ( xmlPatternPtr comp ) ;
2005-01-30 18:42:55 +00:00
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
xmlPatternGetStreamCtxt ( xmlPatternPtr comp ) ;
XMLPUBFUN void XMLCALL
xmlFreeStreamCtxt ( xmlStreamCtxtPtr stream ) ;
XMLPUBFUN int XMLCALL
xmlStreamPush ( xmlStreamCtxtPtr stream ,
const xmlChar * name ,
const xmlChar * ns ) ;
XMLPUBFUN int XMLCALL
xmlStreamPop ( xmlStreamCtxtPtr stream ) ;
2003-12-02 22:32:15 +00:00
# ifdef __cplusplus
}
# endif
2004-06-27 12:08:10 +00:00
# endif /* LIBXML_PATTERN_ENABLED */
2003-12-02 22:32:15 +00:00
# endif /* __XML_PATTERN_H__ */