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 = 0;
00042
00044 virtual bool isAtomicValue() const = 0;
00045
00047 virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00048
00050 virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const = 0;
00051
00054 virtual Sequence dmBaseURI(const DynamicContext* context) const = 0;
00055
00057 virtual const XMLCh* dmNodeKind() const = 0;
00058
00060 virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const = 0;
00061
00063 virtual const XMLCh* dmStringValue(const DynamicContext* context) const = 0;
00064
00068 virtual Sequence dmTypedValue(DynamicContext* context) const = 0;
00069
00072 virtual Sequence dmDocumentURI(const DynamicContext* context) const = 0;
00073
00075 virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const = 0;
00076
00078 virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const = 0;
00079
00082 virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00083
00085 virtual bool equals(const Node::Ptr &other) const = 0;
00086
00089 virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00090
00092 virtual Node::Ptr root(const DynamicContext* context) const = 0;
00093
00095 virtual Node::Ptr dmParent(const DynamicContext* context) const = 0;
00096
00098 virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const = 0;
00099
00101 virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const = 0;
00102
00104 virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const = 0;
00105
00111 virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const = 0;
00112
00114 virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const = 0;
00115
00117 virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const = 0;
00118
00119
00120 virtual const XMLCh* getTypeURI() const = 0;
00121
00122
00123 virtual const XMLCh* getTypeName() const = 0;
00124
00126 virtual void generateEvents(EventHandler *events, const DynamicContext *context,
00127 bool preserveNS = true, bool preserveType = true) 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