00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _XQILLANODE_HPP
00023 #define _XQILLANODE_HPP
00024
00025 #include <xqilla/items/ATQNameOrDerived.hpp>
00026 #include <xqilla/items/ATBooleanOrDerived.hpp>
00027 #include <xqilla/ast/XQStep.hpp>
00028
00029 class DynamicContext;
00030 class XPath2MemoryManager;
00031 class Sequence;
00032 class Result;
00033 class NodeTest;
00034
00035 class XQILLA_API Node : public Item
00036 {
00037 public:
00038 typedef RefCountPointer<const Node> Ptr;
00039
00041 virtual bool isNode() const;
00042
00044 virtual bool isAtomicValue() const;
00045
00046 virtual bool isFunction() const;
00047
00048 virtual void typeToBuffer(DynamicContext *context, XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer &buffer) const;
00049
00051 virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00052
00054 virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const = 0;
00055
00058 virtual Sequence dmBaseURI(const DynamicContext* context) const = 0;
00059
00061 virtual const XMLCh* dmNodeKind() const = 0;
00062
00064 virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const = 0;
00065
00067 virtual const XMLCh* dmStringValue(const DynamicContext* context) const = 0;
00068
00072 virtual Sequence dmTypedValue(DynamicContext* context) const = 0;
00073
00076 virtual Sequence dmDocumentURI(const DynamicContext* context) const = 0;
00077
00079 virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const = 0;
00080
00082 virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const = 0;
00083
00086 virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00087
00089 virtual bool equals(const Node::Ptr &other) const = 0;
00090
00093 virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00094
00096 virtual Node::Ptr root(const DynamicContext* context) const = 0;
00097
00099 virtual Node::Ptr dmParent(const DynamicContext* context) const = 0;
00100
00102 virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const = 0;
00103
00105 virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const = 0;
00106
00108 virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const = 0;
00109
00115 virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const = 0;
00116
00118 virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const = 0;
00119
00121 virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const = 0;
00122
00123
00124 virtual const XMLCh* getTypeURI() const = 0;
00125
00126
00127 virtual const XMLCh* getTypeName() const = 0;
00128
00129 static const XMLCh document_string[];
00130 static const XMLCh element_string[];
00131 static const XMLCh attribute_string[];
00132 static const XMLCh text_string[];
00133 static const XMLCh processing_instruction_string[];
00134 static const XMLCh comment_string[];
00135 static const XMLCh namespace_string[];
00136 };
00137 #endif