18 #if !defined(XALANSOURCETREEDOCUMENT_HEADER_GUARD_1357924680)
19 #define XALANSOURCETREEDOCUMENT_HEADER_GUARD_1357924680
56 namespace XERCES_CPP_NAMESPACE
74 class XalanSourceTreeAttr;
97 initialize(MemoryManager& theManager);
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);
196 getNodeValue()
const;
202 getParentNode()
const;
205 getChildNodes()
const;
208 getFirstChild()
const;
211 getLastChild()
const;
214 getPreviousSibling()
const;
217 getNextSibling()
const;
220 getAttributes()
const;
223 getOwnerDocument()
const;
226 getNamespaceURI()
const;
232 getLocalName()
const;
241 getDocumentElement()
const;
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,
310 createProcessingInstructionNode(
311 const XalanDOMChar* target,
312 const XalanDOMChar* data,
319 const XalanDOMChar* chars,
327 const XalanDOMChar* chars,
334 unparsedEntityDeclaration(
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,
366 XalanSourceTreeElement* theOwnerElement,
367 const PrefixResolver& thePrefixResolver);
371 const XalanDOMChar* theName,
372 const XalanDOMChar* theValue,
373 XalanSourceTreeElement* theOwnerElement);
377 XalanSourceTreeAttr** theAttributeVector,
379 size_t theStartIndex,
380 XalanSourceTreeElement* theOwnerElement,
381 bool fCreateNamespaces,
382 const PrefixResolver* thePrefixResolver = 0);
384 XalanSourceTreeElement*
386 const XalanDOMChar* theTagName,
387 XalanSourceTreeAttr** theAttributeVector,
388 XalanSize_t theAttributeCount,
389 XalanNode* theParentNode,
390 XalanNode* thePreviousSibling,
391 XalanNode* theNextSibling,
392 const PrefixResolver& thePrefixResolver);
396 XalanSourceTreeAttr** theAttributeVector,
398 size_t theStartIndex,
399 XalanSourceTreeElement* theOwnerElement,
400 bool fCreateNamespaces);
405 XalanSourceTreeAttr** theAttributeVector,
406 XalanSourceTreeElement* theOwnerElement,
407 bool fAddXMLNamespaceAttribute);
409 const XalanDOMString&
411 const XalanDOMChar* chars,
414 const XalanDOMString*
415 getNamespaceForPrefix(
416 const XalanDOMChar* theName,
417 const PrefixResolver& thePrefixResolver,
418 XalanDOMString& thePrefix,
420 const XalanDOMChar** theLocalName = 0);
423 XalanSourceTreeDocument(
const XalanSourceTreeDocument& theSource);
425 XalanSourceTreeDocument&
426 operator=(
const XalanSourceTreeDocument& theRHS);
429 operator==(
const XalanSourceTreeDocument& theRHS)
const;
433 XalanNode* m_firstChild;
435 XalanSourceTreeElement* m_documentElement;
437 XalanSourceTreeAttributeAllocator m_attributeAllocator;
439 XalanSourceTreeAttributeNSAllocator m_attributeNSAllocator;
441 XalanSourceTreeCommentAllocator m_commentAllocator;
443 XalanSourceTreeElementAAllocator m_elementAAllocator;
445 XalanSourceTreeElementANSAllocator m_elementANSAllocator;
447 XalanSourceTreeElementNAAllocator m_elementNAAllocator;
449 XalanSourceTreeElementNANSAllocator m_elementNANSAllocator;
451 XalanSourceTreeProcessingInstructionAllocator m_piAllocator;
453 XalanSourceTreeTextAllocator m_textAllocator;
455 XalanSourceTreeTextIWSAllocator m_textIWSAllocator;
457 XalanDOMStringPool m_namesStringPool;
459 XalanDOMStringPool m_valuesStringPool;
461 AttributesArrayAllocatorType m_attributesVector;
463 IndexType m_nextIndexValue;
465 const bool m_poolAllText;
467 ElementByIDMapType m_elementsByID;
469 UnparsedEntityURIMapType m_unparsedEntityURIs;
471 XalanDOMStringAllocator m_nonPooledStrings;
473 XalanDOMString m_stringBuffer;
475 static const XalanDOMString& s_nameString;
477 static bool s_poolAllTextNodes;
486 #endif // !defined(XALANSOURCETREEDOCUMENT_HEADER_GUARD_1357924680)