Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeElement.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
17 #define XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
28 
29 
30 
31 XALAN_CPP_NAMESPACE_BEGIN
32 
33 
34 
41 
42 
43 
45 {
46 public:
47 
61  MemoryManagerType& theManager,
62  const XalanDOMString& theTagName,
63  XalanSourceTreeDocument* theOwnerDocument,
64  XalanNode* theParentNode = 0,
65  XalanNode* thePreviousSibling = 0,
66  XalanNode* theNextSibling = 0,
67  IndexType theIndex = 0);
68 
69  virtual
71 
74  {
75  return m_memoryManager;
76  }
80  virtual const XalanDOMString&
81  getNodeName() const;
82 
86  virtual const XalanDOMString&
87  getNodeValue() const;
88 
92  virtual NodeType
93  getNodeType() const;
94 
104  virtual XalanNode*
105  getParentNode() const;
106 
120  virtual const XalanNodeList*
121  getChildNodes() const;
122 
128  virtual XalanNode*
129  getFirstChild() const;
130 
136  virtual XalanNode*
137  getLastChild() const;
138 
144  virtual XalanNode*
145  getPreviousSibling() const;
146 
152  virtual XalanNode*
153  getNextSibling() const;
154 
159  virtual const XalanNamedNodeMap*
160  getAttributes() const = 0;
161 
171  virtual XalanDocument*
172  getOwnerDocument() const;
173 
175 
177 
196 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
197  virtual XalanNode*
198 #else
199  virtual XalanSourceTreeElement*
200 #endif
201  cloneNode(bool deep) const = 0;
202 
204 
206 
223  virtual XalanNode*
224  insertBefore(
225  XalanNode* newChild,
226  XalanNode* refChild);
227 
241  virtual XalanNode*
242  replaceChild(
243  XalanNode* newChild,
244  XalanNode* oldChild);
245 
253  virtual XalanNode*
254  removeChild(XalanNode* oldChild);
255 
267  virtual XalanNode*
268  appendChild(XalanNode* newChild);
269 
271 
273 
281  virtual bool
282  hasChildNodes() const;
283 
284 
286 
288 
289 
303  virtual void
304  setNodeValue(const XalanDOMString& nodeValue);
305 
307 
309 
326  virtual void
327  normalize();
328 
342  virtual bool
343  isSupported(
344  const XalanDOMString& feature,
345  const XalanDOMString& version) const;
346 
360  virtual const XalanDOMString&
361  getNamespaceURI() const = 0;
362 
367  virtual const XalanDOMString&
368  getPrefix() const = 0;
369 
377  virtual const XalanDOMString&
378  getLocalName() const = 0;
379 
409  virtual void
410  setPrefix(const XalanDOMString& prefix);
411 
412  virtual bool
413  isIndexed() const;
414 
415  virtual IndexType
416  getIndex() const;
417 
419 
420  // These interfaces are inherited from XalanElement...
421 
430  virtual const XalanDOMString&
431  getTagName() const;
432 
440  virtual const XalanDOMString&
441  getAttribute(const XalanDOMString& name) const = 0;
442 
450  virtual XalanAttr*
451  getAttributeNode(const XalanDOMString& name) const = 0;
452 
463  virtual XalanNodeList*
464  getElementsByTagName(const XalanDOMString& name) const;
465 
467 
469 
491  virtual void
492  setAttribute(
493  const XalanDOMString& name,
494  const XalanDOMString& value);
495 
515  virtual XalanAttr*
516  setAttributeNode(XalanAttr* newAttr);
517 
519 
521 
537  virtual XalanAttr*
538  removeAttributeNode(XalanAttr* oldAttr);
539 
552  virtual void
553  removeAttribute(const XalanDOMString& name);
554 
556 
558 
569  virtual const XalanDOMString&
571  const XalanDOMString& namespaceURI,
572  const XalanDOMString& localName) const = 0;
573 
614  virtual void
616  const XalanDOMString& namespaceURI,
617  const XalanDOMString& qualifiedName,
618  const XalanDOMString& value);
619 
634  virtual void
636  const XalanDOMString& namespaceURI,
637  const XalanDOMString& localName);
638 
649  virtual XalanAttr*
651  const XalanDOMString& namespaceURI,
652  const XalanDOMString& localName) const = 0;
653 
673  virtual XalanAttr*
674  setAttributeNodeNS(XalanAttr* newAttr);
675 
691  virtual XalanNodeList*
693  const XalanDOMString& namespaceURI,
694  const XalanDOMString& localName) const;
695 
697 
698 
699  // public interfaces not inherited from XalanElement...
700 
702  getDocument() const
703  {
704  return m_ownerDocument;
705  }
706 
707  void
709  {
710  m_parentNode = theParent;
711  }
712 
713  void
714  setParent(XalanSourceTreeDocumentFragment* theParent);
715 
716  void
717  setPreviousSibling(XalanSourceTreeComment* thePreviousSibling);
718 
719  void
720  setPreviousSibling(XalanSourceTreeElement* thePreviousSibling);
721 
722  void
723  setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling);
724 
725  void
726  setPreviousSibling(XalanSourceTreeText* thePreviousSibling);
727 
728  void
729  appendSiblingNode(XalanSourceTreeComment* theSibling);
730 
731  void
732  appendSiblingNode(XalanSourceTreeElement* theSibling);
733 
734  void
735  appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling);
736 
737  void
738  appendSiblingNode(XalanSourceTreeText* theSibling);
739 
740  void
741  appendChildNode(XalanSourceTreeComment* theChild);
742 
743  void
744  appendChildNode(XalanSourceTreeElement* theChild);
745 
746  void
747  appendChildNode(XalanSourceTreeProcessingInstruction* theChild);
748 
749  void
750  appendChildNode(XalanSourceTreeText* theChild);
751 
752  void
753  setIndex(IndexType theIndex)
754  {
755  m_index = theIndex;
756  }
757 
763  void
765  {
766  m_firstChild = 0;
767  }
768 
769 protected:
770 
772  MemoryManagerType& theManager,
773  const XalanSourceTreeElement& theSource,
774  bool deep = false);
775 
777 
778  // Data members...
780 
781 private:
782 
783  // Not implemented...
785  operator=(const XalanSourceTreeElement& theSource);
786 
787  bool
788  operator==(const XalanSourceTreeElement& theRHS) const;
789 
790 
791  // Data members...
792  MemoryManagerType& m_memoryManager;
793 
794  XalanSourceTreeDocument* m_ownerDocument;
795 
796  XalanNode* m_parentNode;
797 
798  XalanNode* m_previousSibling;
799 
800  XalanNode* m_nextSibling;
801 
802  XalanNode* m_firstChild;
803 
804  IndexType m_index;
805 };
806 
807 
808 
809 XALAN_CPP_NAMESPACE_END
810 
811 
812 
813 #endif // !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeElement.hpp:753
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
Definition: XalanNode.hpp:44
Definition: XalanNodeList.hpp:42
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
virtual void setPrefix(const XalanDOMString &prefix)=0
Set the namespace prefix of this node.
virtual void normalize()=0
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes...
Definition: XalanAttr.hpp:38
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual void setNodeValue(const XalanDOMString &nodeValue)=0
Sets the value of the node.
MemoryManagerType & getMemoryManager()
Definition: XalanSourceTreeElement.hpp:73
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual XalanNode * insertBefore(XalanNode *newChild, XalanNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
Definition: XalanElement.hpp:42
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanDOMString & getTagName() const =0
The name of the element.
virtual const XalanDOMString & getAttribute(const XalanDOMString &name) const =0
Retrieves an attribute value by name.
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise...
virtual XalanElement * cloneNode(bool deep) const =0
Returns a duplicate of this node.
void setParent(XalanSourceTreeElement *theParent)
Definition: XalanSourceTreeElement.hpp:708
virtual void removeAttribute(const XalanDOMString &name)=0
Removes an attribute by name.
Definition: XalanSourceTreeDocumentFragment.hpp:49
void clearChildren()
Removes all of the children.
Definition: XalanSourceTreeElement.hpp:764
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:33
virtual void removeAttributeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName)=0
Removes an attribute by local name and namespace URI.
Definition: XalanNamedNodeMap.hpp:42
virtual void setAttribute(const XalanDOMString &name, const XalanDOMString &value)=0
Adds a new attribute.
virtual const XalanDOMString & getAttributeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves an attribute value by local name and namespace URI.
virtual XalanAttr * setAttributeNode(XalanAttr *newAttr)=0
Adds a new attribute.
Definition: XalanSourceTreeText.hpp:44
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual XalanNode * appendChild(XalanNode *newChild)=0
Adds the node newChild to the end of the list of children of this node.
const XalanDOMString & m_tagName
Definition: XalanSourceTreeElement.hpp:779
Definition: XalanDocument.hpp:51
virtual const XalanDOMString & getNodeName() const =0
virtual XalanNodeList * getElementsByTagNameNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Returns a NodeList of all the Elements with a given local name and namespace URI in the order in whic...
Definition: XalanSourceTreeAttr.hpp:50
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual XalanAttr * removeAttributeNode(XalanAttr *oldAttr)=0
Removes the specified attribute node.
virtual XalanAttr * getAttributeNode(const XalanDOMString &name) const =0
Retrieves an Attr node by name.
Definition: XalanDOMString.hpp:42
virtual XalanNode * replaceChild(XalanNode *newChild, XalanNode *oldChild)=0
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node...
virtual IndexType getIndex() const =0
Get the node's index.
virtual XalanNodeList * getElementsByTagName(const XalanDOMString &name) const =0
Returns a NodeList of all descendant elements with a given tag name, in the order in which they would...
XalanElement & operator=(const XalanElement &theSource)
unsigned long IndexType
Definition: XalanNode.hpp:70
static const XalanDOMString s_emptyString
Definition: XalanSourceTreeElement.hpp:776
Definition: XalanSourceTreeDocument.hpp:73
Definition: XalanSourceTreeElement.hpp:44
virtual XalanAttr * getAttributeNodeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves an Attr node by local name and namespace URI.
XalanSourceTreeDocument * getDocument() const
Definition: XalanSourceTreeElement.hpp:702
virtual void setAttributeNS(const XalanDOMString &namespaceURI, const XalanDOMString &qualifiedName, const XalanDOMString &value)=0
Adds a new attribute.
bool operator==(const XalanElement &theRHS) const
virtual XalanAttr * setAttributeNodeNS(XalanAttr *newAttr)=0
Adds a new attribute.
Definition: XalanSourceTreeProcessingInstruction.hpp:45
Definition: XalanSourceTreeComment.hpp:53
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
virtual bool isSupported(const XalanDOMString &feature, const XalanDOMString &version) const =0
Tests whether the DOM implementation implements a specific feature and that feature is supported by t...

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo