|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CDataSet: public CInterface { public: CDataSet(); virtual ~CDataSet(); public: virtual void SetIdHandler(const XIdHandler &pIdHandler) = 0; virtual void AddKey( const CString &strNamespaceUri, const CString &strLocalName, const XKeyHandler &pKeyHandler) = 0; virtual void AddDocument(const XDocument &pDocument) = 0; virtual void RemoveDocument(const XDocument &pDocument) = 0; virtual bool GetElementId( const XNode &pNode, CString &strId) = 0; virtual XNode GetElementById( const XDocument &pDocument, const CString &strId) = 0; virtual int GetRelativePosition( const XNode &pNode1, const XNode &pNode2) = 0; virtual bool MatchKey( const XNode &pNode, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue) = 0; virtual XNodeSet Select( const XDocument &pDocument, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue) = 0; };
The abstract interface for handling XML element identifiers and XSLT keys, tracing open XML documents, and comparing relative positions of nodes.
CIdHandler, CKeyHandler, Dom::INode, Dom::IDocument
Constructor/Destructor Summary | |
CDataSet
();
����������Constructs the data set. |
|
~CDataSet
();
����������Destroys the data set. |
Function Summary | |
void
|
SetIdHandler
(const XIdHandler &pIdHandler);
����������Sets the identifier handler for this data set. |
void
|
AddKey
(const CString &strNamespaceUri, const CString &strLocalName, const XKeyHandler &pKeyHandler);
����������Adds the named key handler to the list of key handlers associated with this data set. |
void
|
AddDocument
(const XDocument &pDocument);
����������Adds the document to the list of open XML documents associated with this data set. |
void
|
RemoveDocument
(const XDocument &pDocument);
����������Removes the document from the list of open XML documents associated with this data set. |
bool
|
GetElementId
(const XNode &pNode, CString &strId);
����������Returns the element identifier of the given node. |
XNode
|
GetElementById
(const XDocument &pDocument, const CString &strId);
����������Looks up a node with the given element identifier in the given document. |
int
|
GetRelativePosition
(const XNode &pNode1, const XNode &pNode2);
����������Returns the relative position of two nodes. |
bool
|
MatchKey
(const XNode &pNode, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue);
����������Matches the given node against the given named key. |
XNodeSet
|
Select
(const XDocument &pDocument, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue);
����������Selects all nodes of the given document that have the given value of the given key. |
Constructor/Destructor Detail |
CDataSet();
Constructs the data set.
virtual ~CDataSet();
Destroys the data set.
Function Detail |
virtual void SetIdHandler(const XIdHandler &pIdHandler) = 0;
Sets the identifier handler for this data set.
pIdHandler
- the identifier handlervirtual void AddKey( const CString &strNamespaceUri, const CString &strLocalName, const XKeyHandler &pKeyHandler) = 0;
Adds the named key handler to the list of key handlers associated with this data set.
strNamespaceUri
- the namespace URI of the key handlerstrLocalName
- the local name of the key handlerpKeyHandler
- the key handlervirtual void AddDocument(const XDocument &pDocument) = 0;
Adds the document to the list of open XML documents associated with this data set.
pDocument
- the documentvirtual void RemoveDocument(const XDocument &pDocument) = 0;
Removes the document from the list of open XML documents associated with this data set.
pDocument
- the document to removevirtual bool GetElementId( const XNode &pNode, CString &strId) = 0;
Returns the element identifier of the given node.
pNode
- the nodestrId
- on return, the element identifier
if the given node is an element and the identifier is available;
unspecified otherwisetrue
if the given node is an element
and the identifier is available;
false
otherwisevirtual XNode GetElementById( const XDocument &pDocument, const CString &strId) = 0;
Looks up a node with the given element identifier in the given document.
pDocument
- the documentstrId
- the element identifier to look upNULL
if
there is no such nodevirtual int GetRelativePosition( const XNode &pNode1, const XNode &pNode2) = 0;
Returns the relative position of two nodes.
The XSLT engine defines global order for all nodes of all open documents in the data set. Within every single document this global order is equivalent to the document order defined by XPath.
The relative position of two nodes is a negative integer if the first node precedes the second node, a positive integer if the first node follows the second node, and zero if two nodes are equal.
pNode1
- the first nodepNode2
- the second nodevirtual bool MatchKey( const XNode &pNode, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue) = 0;
Matches the given node against the given named key.
pNode
- the node to matchstrNamespaceUri
- the namespace URI of the keystrLocalName
- the local name of the keystrValue
- the key valuetrue
if the given node has the
given value of the given key;
false
otherwisevirtual XNodeSet Select( const XDocument &pDocument, const CString &strNamespaceUri, const CString &strLocalName, const CString &strValue) = 0;
Selects all nodes of the given document that have the given value of the given key.
pDocument
- the documentstrNamespaceUri
- the namespace URI of the keystrLocalName
- the local name of the keystrValue
- the key value
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |