00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680) 00017 #define XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680 00018 00019 00020 00021 #include <xalanc/XalanSourceTree/XalanSourceTreeDefinitions.hpp> 00022 00023 00024 00025 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00026 #include <xalanc/XalanDOM/XalanElement.hpp> 00027 #include <xalanc/XalanDOM/XalanNamedNodeMap.hpp> 00028 00029 00030 00031 XALAN_CPP_NAMESPACE_BEGIN 00032 00033 00034 00035 class XalanSourceTreeAttr; 00036 class XalanSourceTreeComment; 00037 class XalanSourceTreeDocument; 00038 class XalanSourceTreeDocumentFragment; 00039 class XalanSourceTreeProcessingInstruction; 00040 class XalanSourceTreeText; 00041 00042 00043 00044 class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeElement : public XalanElement 00045 { 00046 public: 00047 00060 XalanSourceTreeElement( 00061 const XalanDOMString& theTagName, 00062 XalanSourceTreeDocument* theOwnerDocument, 00063 XalanNode* theParentNode = 0, 00064 XalanNode* thePreviousSibling = 0, 00065 XalanNode* theNextSibling = 0, 00066 IndexType theIndex = 0); 00067 00068 virtual 00069 ~XalanSourceTreeElement(); 00070 00074 virtual const XalanDOMString& 00075 getNodeName() const; 00076 00080 virtual const XalanDOMString& 00081 getNodeValue() const; 00082 00086 virtual NodeType 00087 getNodeType() const; 00088 00098 virtual XalanNode* 00099 getParentNode() const; 00100 00114 virtual const XalanNodeList* 00115 getChildNodes() const; 00116 00122 virtual XalanNode* 00123 getFirstChild() const; 00124 00130 virtual XalanNode* 00131 getLastChild() const; 00132 00138 virtual XalanNode* 00139 getPreviousSibling() const; 00140 00146 virtual XalanNode* 00147 getNextSibling() const; 00148 00153 virtual const XalanNamedNodeMap* 00154 getAttributes() const = 0; 00155 00165 virtual XalanDocument* 00166 getOwnerDocument() const; 00167 00169 00171 00190 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) 00191 virtual XalanNode* 00192 #else 00193 virtual XalanSourceTreeElement* 00194 #endif 00195 cloneNode(bool deep) const = 0; 00196 00198 00200 00217 virtual XalanNode* 00218 insertBefore( 00219 XalanNode* newChild, 00220 XalanNode* refChild); 00221 00235 virtual XalanNode* 00236 replaceChild( 00237 XalanNode* newChild, 00238 XalanNode* oldChild); 00239 00247 virtual XalanNode* 00248 removeChild(XalanNode* oldChild); 00249 00261 virtual XalanNode* 00262 appendChild(XalanNode* newChild); 00263 00265 00267 00275 virtual bool 00276 hasChildNodes() const; 00277 00278 00280 00282 00283 00297 virtual void 00298 setNodeValue(const XalanDOMString& nodeValue); 00299 00301 00303 00320 virtual void 00321 normalize(); 00322 00336 virtual bool 00337 isSupported( 00338 const XalanDOMString& feature, 00339 const XalanDOMString& version) const; 00340 00354 virtual const XalanDOMString& 00355 getNamespaceURI() const = 0; 00356 00361 virtual const XalanDOMString& 00362 getPrefix() const = 0; 00363 00371 virtual const XalanDOMString& 00372 getLocalName() const = 0; 00373 00403 virtual void 00404 setPrefix(const XalanDOMString& prefix); 00405 00406 virtual bool 00407 isIndexed() const; 00408 00409 virtual IndexType 00410 getIndex() const; 00411 00413 00414 // These interfaces are inherited from XalanElement... 00415 00424 virtual const XalanDOMString& 00425 getTagName() const; 00426 00434 virtual const XalanDOMString& 00435 getAttribute(const XalanDOMString& name) const = 0; 00436 00444 virtual XalanAttr* 00445 getAttributeNode(const XalanDOMString& name) const = 0; 00446 00457 virtual XalanNodeList* 00458 getElementsByTagName(const XalanDOMString& name) const; 00459 00461 00463 00485 virtual void 00486 setAttribute( 00487 const XalanDOMString& name, 00488 const XalanDOMString& value); 00489 00509 virtual XalanAttr* 00510 setAttributeNode(XalanAttr* newAttr); 00511 00513 00515 00531 virtual XalanAttr* 00532 removeAttributeNode(XalanAttr* oldAttr); 00533 00546 virtual void 00547 removeAttribute(const XalanDOMString& name); 00548 00550 00552 00563 virtual const XalanDOMString& 00564 getAttributeNS( 00565 const XalanDOMString& namespaceURI, 00566 const XalanDOMString& localName) const = 0; 00567 00608 virtual void 00609 setAttributeNS( 00610 const XalanDOMString& namespaceURI, 00611 const XalanDOMString& qualifiedName, 00612 const XalanDOMString& value); 00613 00628 virtual void 00629 removeAttributeNS( 00630 const XalanDOMString& namespaceURI, 00631 const XalanDOMString& localName); 00632 00643 virtual XalanAttr* 00644 getAttributeNodeNS( 00645 const XalanDOMString& namespaceURI, 00646 const XalanDOMString& localName) const = 0; 00647 00667 virtual XalanAttr* 00668 setAttributeNodeNS(XalanAttr* newAttr); 00669 00685 virtual XalanNodeList* 00686 getElementsByTagNameNS( 00687 const XalanDOMString& namespaceURI, 00688 const XalanDOMString& localName) const; 00689 00691 00692 00693 // public interfaces not inherited from XalanElement... 00694 00695 XalanSourceTreeDocument* 00696 getDocument() const 00697 { 00698 return m_ownerDocument; 00699 } 00700 00701 void 00702 setParent(XalanSourceTreeElement* theParent) 00703 { 00704 m_parentNode = theParent; 00705 } 00706 00707 void 00708 setParent(XalanSourceTreeDocumentFragment* theParent); 00709 00710 void 00711 setPreviousSibling(XalanSourceTreeComment* thePreviousSibling); 00712 00713 void 00714 setPreviousSibling(XalanSourceTreeElement* thePreviousSibling); 00715 00716 void 00717 setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling); 00718 00719 void 00720 setPreviousSibling(XalanSourceTreeText* thePreviousSibling); 00721 00722 void 00723 appendSiblingNode(XalanSourceTreeComment* theSibling); 00724 00725 void 00726 appendSiblingNode(XalanSourceTreeElement* theSibling); 00727 00728 void 00729 appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling); 00730 00731 void 00732 appendSiblingNode(XalanSourceTreeText* theSibling); 00733 00734 void 00735 appendChildNode(XalanSourceTreeComment* theChild); 00736 00737 void 00738 appendChildNode(XalanSourceTreeElement* theChild); 00739 00740 void 00741 appendChildNode(XalanSourceTreeProcessingInstruction* theChild); 00742 00743 void 00744 appendChildNode(XalanSourceTreeText* theChild); 00745 00746 void 00747 setIndex(IndexType theIndex) 00748 { 00749 m_index = theIndex; 00750 } 00751 00757 void 00758 clearChildren() 00759 { 00760 m_firstChild = 0; 00761 } 00762 00763 protected: 00764 00765 XalanSourceTreeElement( 00766 const XalanSourceTreeElement& theSource, 00767 bool deep = false); 00768 00769 static const XalanDOMString s_emptyString; 00770 00771 // Data members... 00772 const XalanDOMString& m_tagName; 00773 00774 private: 00775 00776 // Not implemented... 00777 XalanSourceTreeElement& 00778 operator=(const XalanSourceTreeElement& theSource); 00779 00780 bool 00781 operator==(const XalanSourceTreeElement& theRHS) const; 00782 00783 00784 // Data members... 00785 XalanSourceTreeDocument* m_ownerDocument; 00786 00787 XalanNode* m_parentNode; 00788 00789 XalanNode* m_previousSibling; 00790 00791 XalanNode* m_nextSibling; 00792 00793 XalanNode* m_firstChild; 00794 00795 IndexType m_index; 00796 }; 00797 00798 00799 00800 XALAN_CPP_NAMESPACE_END 00801 00802 00803 00804 #endif // !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.8 |
|