|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CXpathContext: public CInterface { public: CXpathContext( CToolkitBase *pToolkitBase, CXpathNodeSet *pNodeSet); CXpathContext( CToolkitBase *pToolkitBase, Dom::INode *pNode, int nCount=1, int nPosition=1); ~CXpathContext(); public: Dom::XNode GetCurrent(); int GetPosition(); int GetCount(); void DeclarePrefix( const WCHAR *pszPrefix, const WCHAR *pszNamespaceUri); public: Xpath::CContext *GetContext(); }; typedef XInterface<CXpathContext> XXpathContext;
Encapsulates XPath contexts.
XPath contexts are used when XPath expressions
(
CXpathExpr
are evaluated.
As implemented, each context object provides
the context node, the context position, the context size,
and the namespace declaration set, all under control of
the application programmer. The function library is
fixed to the XPath core library, and the variable binding
set is assumed empty. Therefore, it is not allowed to use
functions not belonging to the XPath core
library in the XPath expressions represented by
CXpathExpr
objects; variables are not
allowed as well. (Note that this restriction applies
only to XPath expressions represented by
CXpathExpr
objects and not to other toolkit components, which use XPath.)
CToolkitBase, Dom::INode
Constructor/Destructor Summary | |
CXpathContext
(CToolkitBase *pToolkitBase, CXpathNodeSet *pNodeSet);
����������Constructs the XPath context from the node set. |
|
CXpathContext
(CToolkitBase *pToolkitBase, Dom::INode *pNode, int nCount=1, int nPosition=1);
����������Constructs the XPath context from the node. |
|
~CXpathContext
();
����������Destroys the XPath context. |
Function Summary | |
Dom::XNode
|
GetCurrent
();
����������Returns the context node. |
int
|
GetPosition
();
����������Returns the context position. |
int
|
GetCount
();
����������Returns the context size. |
void
|
DeclarePrefix
(const WCHAR *pszPrefix, const WCHAR *pszNamespaceUri);
����������Adds the pair of a prefix and a namespace URI to the namespace declaration set of this context. |
Xpath::CContext�*
|
GetContext
();
����������Returns the internal representation of XPath context encapsulated in this object. |
Constructor/Destructor Detail |
CXpathContext( CToolkitBase *pToolkitBase, CXpathNodeSet *pNodeSet);
Constructs the XPath context from the node set.
The context node, the context position, and the context size
are determined by the node set object passed as the parameter
to the constructor, being set to the current node, current position
and number of nodes of that node set respectively.
The namespace declaration set is initially
empty; namespace declarations may be added using
the
DeclarePrefix
method.
The function library is fixed the XPath core function library,
and the variable binding set is empty.
pToolkitBase
- the master toolkit basepNodeSet
- the context node setCXpathContext( CToolkitBase *pToolkitBase, Dom::INode *pNode, int nCount=1, int nPosition=1);
Constructs the XPath context from the node.
The context node, context position, and context size are
passed to the constructor as parameters.
The namespace declaration set is initially
empty; namespace declarations may be added using
the
DeclarePrefix
method.
The function library is fixed the XPath core function library,
and the variable binding set is empty.
The model of the context node must be XDM (that is, DOM nodes are not allowed).
pToolkitBase
- the master toolkit basepNode
- the context nodenCount
- the context sizenPosition
- the context position~CXpathContext();
Destroys the XPath context.
Function Detail |
Dom::XNode GetCurrent();
Returns the context node.
int GetPosition();
Returns the context position.
int GetCount();
Returns the context size.
void DeclarePrefix( const WCHAR *pszPrefix, const WCHAR *pszNamespaceUri);
Adds the pair of a prefix and a namespace URI to the namespace declaration set of this context.
pszPrefix
- the prefixpszNamespaceUri
- the namespace URIXpath::CContext *GetContext();
Returns the internal representation of XPath context encapsulated in this object.
This method is intended mainly for the toolkit internal use.
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |