Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6xpathexpression.h
Go to the documentation of this file.
1 
10 #ifndef P6XPATHEXPRESSION_H__
11 #define P6XPATHEXPRESSION_H__ 1
12 
13 #include "p6err.h"
14 #include "p6domxml.h"
15 #include "p6xpathvariables.h"
16 #include "p6xmlcompile.h"
17 #include "p6datastream.h"
18 
19 namespace P6R {
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
35 const P6XPATHFLAGS P6XPATH_NOFLAGS = 0x00000000;
36 const P6XPATHFLAGS P6XPATH_TRACEON = 0x00000001;
37 
38 
47 interface p6IXpathExpression : public p6ICom
48 {
63  P6COMMETHOD initialize( P6XPATHFLAGS flags, p6IDataStream* pTraceResult ) = 0;
64 
79  P6COMMETHOD setDefaultCollation( const P6CHAR* pCollate ) = 0;
80 
100  P6UINT32 length,
101  p6IXMLCompile* pContext
102  ) = 0;
103 
122  P6COMMETHOD compileExpression( const P6WCHAR* pExpression,
123  P6UINT32 length,
124  p6IXMLCompile* pContext
125  ) = 0;
126 
141 
161  P6COMMETHOD setRegexLimits( P6UINT32 maxBackStack, P6UINT32 maxBackTracks ) = 0;
162 
181  P6COMMETHOD eval( p6IDOMXML* pXMLTree,
182  p6IXMLNode* pXMLNode,
183  p6IDOMNodeset* pNodeSet,
184  P6XPATH_RESULT* pResult
185  ) = 0;
186 
213  P6COMMETHOD evalBoolean( p6IDOMXML* pXMLTree,
214  p6IXMLNode* pXMLNode,
215  p6IDOMNodeset* pNodeSet,
216  P6BOOL* pbResult
217  ) = 0;
218 };
219 
220 // {509A1ECA-1C99-46b3-8FD4-A50F21F7267D}
221 #define IF_p6IXpathExpression {0x509a1eca,0x1c99,0x46b3,{0x8f,0xd4,0xa5,0xf,0x21,0xf7,0x26,0x7d}}
222 
223 // {88EE96C5-EF80-42a8-A52C-87876D02FC5B}
224 #define COMP_p6XpathExpression {0x88ee96c5,0xef80,0x42a8,{0xa5,0x2c,0x87,0x87,0x6d,0x2,0xfc,0x5b}}
225 
226 #ifdef __cplusplus
227 }
228 #endif
229 
230 } // namespace
231 
232 
233 #endif
234 
235 
236 
237 
238 
239 
240 
241 
unsigned int P6UINT32
Definition: p6types.h:40
P6R's interface of the DOM parser.
Definition: p6domxml.h:99
Standard error codes.
This interface provides the compilation time context of an XML document.
The return value form an XPath 2.0 expression evaluation.
Definition: p6domxml.h:50
virtual P6R::P6ERR eval(p6IDOMXML *pXMLTree, p6IXMLNode *pXMLNode, p6IDOMNodeset *pNodeSet, P6XPATH_RESULT *pResult)=0
Evaluate the compiled pattern or expression against the context defined by the following objects: (a)...
virtual P6R::P6ERR compileExpression(const P6WCHAR *pExpression, P6UINT32 length, p6IXMLCompile *pContext)=0
Compile a general XPath expression that would normally be used in XSLT into an XPath expression tree...
bool P6BOOL
Boolean type.
Definition: p6types.h:101
const P6XPATHFLAGS P6XPATH_NOFLAGS
virtual P6R::P6ERR setDefaultCollation(const P6CHAR *pCollate)=0
The XPath processor uses the default collation from the runtime enviroment.
p6IDataStream interface definitions
P6R's interface of the DOM parser.
virtual P6R::P6ERR initialize(P6XPATHFLAGS flags, p6IDataStream *pTraceResult)=0
Sets up the component to run properly.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:76
This interface is implmented by components that support receiving streamed data.
Definition: p6datastream.h:42
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR compileTemplateMatch(P6WCHAR *pPattern, P6UINT32 length, p6IXMLCompile *pContext)=0
Compile match attributes of XSLT templates which are patterns of the form: chapter/section//footnote ...
P6UINT32 P6XPATHFLAGS
P6XPATHFLAGS.
This interface supports the extensibility of the XPath languague.
const P6XPATHFLAGS P6XPATH_TRACEON
virtual P6R::P6ERR evalBoolean(p6IDOMXML *pXMLTree, p6IXMLNode *pXMLNode, p6IDOMNodeset *pNodeSet, P6BOOL *pbResult)=0
Evaluate the compiled pattern or expression against the context defined by the following objects: (a)...
This interface is implemented by the application making use of the p6xpathexpression component...
This interface is an enumerator over a set of nodes resulting from the evaluation of an XPath express...
Definition: p6domnodeset.h:28
This component represents an element in an XML or JSON document.
Definition: p6xmlnode.h:94
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR setVariableHandler(p6IXpathVariables *pObject)=0
The calling application uses this method to register a handler to look up external variable values...
This interface provides the compilation time context of an XML document.
Definition: p6xmlcompile.h:29
virtual P6R::P6ERR setRegexLimits(P6UINT32 maxBackStack, P6UINT32 maxBackTracks)=0
As default there are NO limits on the execution of regular expression in an XPath expression...
This component is used to parse a complex XPath 2.0 expression or pattern into an expression tree for...
char P6CHAR
Narrow character type.
Definition: p6types.h:71