18#if !defined(XALANSOURCETREEDOCUMENT_HEADER_GUARD_1357924680)
19#define XALANSOURCETREEDOCUMENT_HEADER_GUARD_1357924680
56namespace XERCES_CPP_NAMESPACE
68typedef xercesc::Attributes AttributesType;
69typedef xercesc::AttributeList AttributeListType;
74class XalanSourceTreeAttr;
106 enum { eDefaultAttributeAllocatorBlockSize = 100,
107 eDefaultAttributeNSAllocatorBlockSize = 50,
108 eDefaultCommentAllocatorBlockSize = 10,
109 eDefaultElementAllocatorBlockSize = 100,
110 eDefaultElementNSAllocatorBlockSize = 100,
111 eDefaultPIAllocatorBlockSize = 10,
112 eDefaultTextAllocatorBlockSize = 100,
113 eDefaultTextIWSAllocatorBlockSize = 100,
114 eDefaultNamesStringPoolBlockSize = XalanDOMStringPool::eDefaultBlockSize,
115 eDefaultNamesStringPoolBucketCount = XalanDOMStringPool::eDefaultBucketCount,
116 eDefaultNamesStringPoolBucketSize = XalanDOMStringPool::eDefaultBucketSize,
117 eDefaultValuesStringPoolBlockSize = XalanDOMStringPool::eDefaultBlockSize,
118 eDefaultValuesStringPoolBucketCount = 997,
119 eDefaultValuesStringPoolBucketSize = XalanDOMStringPool::eDefaultBucketSize };
141 MemoryManager& theManager,
142 bool fPoolAllText = s_poolAllTextNodes,
143 block_size_type theNamesStringPoolBlockSize = eDefaultNamesStringPoolBlockSize,
144 bucket_count_type theNamesStringPoolBucketCount = eDefaultNamesStringPoolBucketCount,
145 bucket_size_type theNamesStringPoolBucketSize = eDefaultNamesStringPoolBucketSize,
146 block_size_type theValuesStringPoolBlockSize = eDefaultValuesStringPoolBlockSize,
147 bucket_count_type theValuesStringPoolBucketCount = eDefaultValuesStringPoolBucketCount,
148 bucket_size_type theValuesStringPoolBucketSize = eDefaultValuesStringPoolBucketSize);
153 MemoryManager& theManager,
154 bool fPoolAllText = s_poolAllTextNodes,
155 block_size_type theNamesStringPoolBlockSize = eDefaultNamesStringPoolBlockSize,
156 bucket_count_type theNamesStringPoolBucketCount = eDefaultNamesStringPoolBucketCount,
157 bucket_size_type theNamesStringPoolBucketSize = eDefaultNamesStringPoolBucketSize,
158 block_size_type theValuesStringPoolBlockSize = eDefaultValuesStringPoolBlockSize,
159 bucket_count_type theValuesStringPoolBucketCount = eDefaultValuesStringPoolBucketCount,
160 bucket_size_type theValuesStringPoolBucketSize = eDefaultValuesStringPoolBucketSize);
177 MemoryManager& theManager,
186 bool fPoolAllText = s_poolAllTextNodes);
252 return s_poolAllTextNodes;
258 s_poolAllTextNodes = fPool;
264 const XalanDOMChar* name,
269 bool fAddXMLNamespaceAttribute =
false);
273 const XalanDOMChar* uri,
274 const XalanDOMChar* localname,
275 const XalanDOMChar* qname,
280 bool fAddXMLNamespaceAttribute =
false);
284 const XalanDOMChar* tagName,
290 bool fAddXMLNamespaceAttribute =
false);
294 const XalanDOMChar* name,
299 bool fAddXMLNamespaceAttribute =
false);
303 const XalanDOMChar* data,
311 const XalanDOMChar* target,
312 const XalanDOMChar* data,
319 const XalanDOMChar* chars,
327 const XalanDOMChar* chars,
335 const XalanDOMChar* name,
336 const XalanDOMChar* publicId,
337 const XalanDOMChar* systemId,
338 const XalanDOMChar* notationName);
358 return m_stringBuffer.getMemoryManager();
364 const XalanDOMChar* theName,
365 const XalanDOMChar* theValue,
371 const XalanDOMChar* theName,
372 const XalanDOMChar* theValue,
379 size_t theStartIndex,
381 bool fCreateNamespaces,
386 const XalanDOMChar* theTagName,
388 XalanSize_t theAttributeCount,
398 size_t theStartIndex,
400 bool fCreateNamespaces);
407 bool fAddXMLNamespaceAttribute);
411 const XalanDOMChar* chars,
415 getNamespaceForPrefix(
416 const XalanDOMChar* theName,
420 const XalanDOMChar** theLocalName = 0);
461 AttributesArrayAllocatorType m_attributesVector;
463 IndexType m_nextIndexValue;
465 const bool m_poolAllText;
467 ElementByIDMapType m_elementsByID;
469 UnparsedEntityURIMapType m_unparsedEntityURIs;
477 static bool s_poolAllTextNodes;
#define XALAN_CPP_NAMESPACE
#define XALAN_XALANSOURCETREE_EXPORT
This class defines an interface for classes that resolve namespace prefixes to their URIs.
XalanDOMStringHashTable::bucket_size_type bucket_size_type
AllocatorType::size_type block_size_type
Xalan implementation of a hashtable.
ArenaAllocatorType::size_type size_type
XalanSourceTreeAttributeAllocator::size_type allocator_size_type
virtual XalanNode * getFirstChild() const
Gets the first child of this node.
XalanSourceTreeText * createTextIWSNode(const XalanDOMChar *chars, XalanDOMString::size_type length, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0)
XalanDOMStringPool::bucket_size_type bucket_size_type
virtual const XalanDOMString & getNodeValue() const
Gets the value of this node, depending on its type.
XalanSourceTreeText * createTextNode(const XalanDOMChar *chars, XalanDOMString::size_type length, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0)
XalanDOMStringPool::bucket_count_type bucket_count_type
virtual const XalanDOMString & getPrefix() const
Get the namespace prefix of this node, or null if it is unspecified.
void unparsedEntityDeclaration(const XalanDOMChar *name, const XalanDOMChar *publicId, const XalanDOMChar *systemId, const XalanDOMChar *notationName)
XalanArrayAllocator< XalanSourceTreeAttr * > AttributesArrayAllocatorType
virtual XalanNode * getPreviousSibling() const
Gets the node immediately preceding this node.
virtual IndexType getIndex() const
Get the node's index.
virtual XalanDocument * getOwnerDocument() const
Gets the Document object associated with this node.
virtual XalanNode * getNextSibling() const
Gets the node immediately following this node.
void appendChildNode(XalanSourceTreeElement *theChild)
XalanSourceTreeDocument(MemoryManager &theManager, bool fPoolAllText=s_poolAllTextNodes, block_size_type theNamesStringPoolBlockSize=eDefaultNamesStringPoolBlockSize, bucket_count_type theNamesStringPoolBucketCount=eDefaultNamesStringPoolBucketCount, bucket_size_type theNamesStringPoolBucketSize=eDefaultNamesStringPoolBucketSize, block_size_type theValuesStringPoolBlockSize=eDefaultValuesStringPoolBlockSize, bucket_count_type theValuesStringPoolBucketCount=eDefaultValuesStringPoolBucketCount, bucket_size_type theValuesStringPoolBucketSize=eDefaultValuesStringPoolBucketSize)
Constructor for XalanSourceTreeDocument.
static bool getPoolAllTextNodes()
XalanSourceTreeElement * createElementNode(const XalanDOMChar *tagName, const AttributeListType &attrs, const PrefixResolver &thePrefixResolver, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, bool fAddXMLNamespaceAttribute=false)
XalanSourceTreeComment * createCommentNode(const XalanDOMChar *data, XalanDOMString::size_type length, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0)
XalanSourceTreeProcessingInstruction * createProcessingInstructionNode(const XalanDOMChar *target, const XalanDOMChar *data, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0)
XalanMap< XalanDOMString, XalanDOMString > UnparsedEntityURIMapType
virtual const XalanDOMString & getNodeName() const
Gets the name of this node, depending on its type.
XalanSourceTreeDocument(MemoryManager &theManager, allocator_size_type theAttributeBlockSize, allocator_size_type theAttributeNSBlockSize, allocator_size_type theCommentBlockSize, allocator_size_type theElementBlockSize, allocator_size_type theElementNSBlockSize, allocator_size_type thePIBlockSize, allocator_size_type theTextBlockSize, allocator_size_type theTextIWSBlockSize, bool fPoolAllText=s_poolAllTextNodes)
Constructor for XalanSourceTreeDocument.
virtual XalanElement * getElementById(const XalanDOMString &elementId) const
Returns the Element whose ID is given by elementId.
XalanSourceTreeElement * createElementNode(const XalanDOMChar *uri, const XalanDOMChar *localname, const XalanDOMChar *qname, const AttributesType &attrs, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, bool fAddXMLNamespaceAttribute=false)
static XalanSourceTreeDocument * create(MemoryManager &theManager, bool fPoolAllText=s_poolAllTextNodes, block_size_type theNamesStringPoolBlockSize=eDefaultNamesStringPoolBlockSize, bucket_count_type theNamesStringPoolBucketCount=eDefaultNamesStringPoolBucketCount, bucket_size_type theNamesStringPoolBucketSize=eDefaultNamesStringPoolBucketSize, block_size_type theValuesStringPoolBlockSize=eDefaultValuesStringPoolBlockSize, bucket_count_type theValuesStringPoolBucketCount=eDefaultValuesStringPoolBucketCount, bucket_size_type theValuesStringPoolBucketSize=eDefaultValuesStringPoolBucketSize)
virtual bool isIndexed() const
Determine if the document is node-order indexed.
static void setPoolAllTextNodes(bool fPool)
static void initialize(MemoryManager &theManager)
Perform static initialization.
void appendChildNode(XalanSourceTreeProcessingInstruction *theChild)
XalanDOMStringPool::block_size_type block_size_type
virtual const XalanNamedNodeMap * getAttributes() const
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
const XalanDOMString & getUnparsedEntityURI(const XalanDOMString &theName) const
virtual ~XalanSourceTreeDocument()
virtual XalanNode * getLastChild() const
Gets the last child of this node.
static void terminate()
Perform static shut down.
virtual NodeType getNodeType() const
An enum value representing the type of the underlying object.
virtual const XalanNodeList * getChildNodes() const
Gets a NodeList that contains all children of this node.
virtual const XalanDOMString & getNamespaceURI() const
Get the namespace URI of this node, or null if it is unspecified.
XalanMap< const XalanDOMChar *, XalanSourceTreeElement * > ElementByIDMapType
void appendChildNode(XalanSourceTreeComment *theChild)
XalanSourceTreeElement * createElementNode(const XalanDOMChar *name, const AttributesType &attrs, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, bool fAddXMLNamespaceAttribute=false)
XalanSourceTreeElement * createElementNode(const XalanDOMChar *name, const AttributeListType &attrs, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, bool fAddXMLNamespaceAttribute=false)
virtual XalanElement * getDocumentElement() const
Return a reference to the root element of the document.
virtual XalanNode * getParentNode() const
Gets the parent of this node.
virtual const XalanDOMString & getLocalName() const
Returns the local part of the qualified name of this node.
xercesc::Attributes AttributesType
xercesc::AttributeList AttributeListType
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)