00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 1999 The Apache Software Foundation. All rights 00006 * reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright 00016 * notice, this list of conditions and the following disclaimer in 00017 * the documentation and/or other materials provided with the 00018 * distribution. 00019 * 00020 * 3. The end-user documentation included with the redistribution, 00021 * if any, must include the following acknowledgment: 00022 * "This product includes software developed by the 00023 * Apache Software Foundation (http://www.apache.org/)." 00024 * Alternately, this acknowledgment may appear in the software itself, 00025 * if and wherever such third-party acknowledgments normally appear. 00026 * 00027 * 4. The names "Xalan" and "Apache Software Foundation" must 00028 * not be used to endorse or promote products derived from this 00029 * software without prior written permission. For written 00030 * permission, please contact apache@apache.org. 00031 * 00032 * 5. Products derived from this software may not be called "Apache", 00033 * nor may "Apache" appear in their name, without prior written 00034 * permission of the Apache Software Foundation. 00035 * 00036 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 00037 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00038 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00039 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 00040 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00041 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00042 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 00043 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00045 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00046 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00047 * SUCH DAMAGE. 00048 * ==================================================================== 00049 * 00050 * This software consists of voluntary contributions made by many 00051 * individuals on behalf of the Apache Software Foundation and was 00052 * originally based on software copyright (c) 1999, International 00053 * Business Machines, Inc., http://www.ibm.com. For more 00054 * information on the Apache Software Foundation, please see 00055 * <http://www.apache.org/>. 00056 */ 00057 #if !defined(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680) 00058 #define XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680 00059 00060 00061 00062 #include <XercesParserLiaison/XercesParserLiaisonDefinitions.hpp> 00063 00064 00065 00066 #include <map> 00067 00068 00069 00070 #if XERCES_VERSION_MAJOR >= 2 00071 #include <xercesc/dom/deprecated/DOM_Element.hpp> 00072 #else 00073 #include <xercesc/dom/DOM_Element.hpp> 00074 #endif 00075 00076 00077 00078 #include <XalanDOM/XalanElement.hpp> 00079 00080 00081 00082 #include <PlatformSupport/DOMStringHelper.hpp> 00083 00084 00085 00086 #include <XercesParserLiaison/XercesDOM_NodeHack.hpp> 00087 #include <XercesParserLiaison/XercesNamedNodeMapBridge.hpp> 00088 #include <XercesParserLiaison/XercesNodeListBridge.hpp> 00089 00090 00091 00092 class XercesBridgeNavigator; 00093 00094 00095 00096 class XALAN_XERCESPARSERLIAISON_EXPORT XercesElementBridge : public XalanElement 00097 { 00098 public: 00099 00100 XercesElementBridge( 00101 const DOM_Element& theXercesElement, 00102 const XercesBridgeNavigator& theNavigator); 00103 00104 virtual 00105 ~XercesElementBridge(); 00106 00107 00111 virtual const XalanDOMString& 00112 getNodeName() const; 00113 00117 virtual const XalanDOMString& 00118 getNodeValue() const; 00119 00123 virtual NodeType 00124 getNodeType() const; 00125 00135 virtual XalanNode* 00136 getParentNode() const; 00137 00151 virtual const XalanNodeList* 00152 getChildNodes() const; 00153 00159 virtual XalanNode* 00160 getFirstChild() const; 00161 00167 virtual XalanNode* 00168 getLastChild() const; 00169 00175 virtual XalanNode* 00176 getPreviousSibling() const; 00177 00183 virtual XalanNode* 00184 getNextSibling() const; 00185 00190 virtual const XalanNamedNodeMap* 00191 getAttributes() const; 00192 00202 virtual XalanDocument* 00203 getOwnerDocument() const; 00204 00205 //@} 00207 //@{ 00208 00227 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) 00228 virtual XalanNode* 00229 #else 00230 virtual XercesElementBridge* 00231 #endif 00232 cloneNode(bool deep) const; 00233 00234 //@} 00236 //@{ 00237 00254 virtual XalanNode* 00255 insertBefore( 00256 XalanNode* newChild, 00257 XalanNode* refChild); 00258 00272 virtual XalanNode* 00273 replaceChild( 00274 XalanNode* newChild, 00275 XalanNode* oldChild); 00276 00284 virtual XalanNode* 00285 removeChild(XalanNode* oldChild); 00286 00298 virtual XalanNode* 00299 appendChild(XalanNode* newChild); 00300 00301 //@} 00303 //@{ 00304 00312 virtual bool 00313 hasChildNodes() const; 00314 00315 00316 //@} 00318 //@{ 00319 00320 00334 virtual void 00335 setNodeValue(const XalanDOMString& nodeValue); 00336 00337 //@} 00339 //@{ 00340 00357 virtual void 00358 normalize(); 00359 00373 virtual bool 00374 isSupported( 00375 const XalanDOMString& feature, 00376 const XalanDOMString& version) const; 00377 00391 virtual const XalanDOMString& 00392 getNamespaceURI() const; 00393 00398 virtual const XalanDOMString& 00399 getPrefix() const; 00400 00408 virtual const XalanDOMString& 00409 getLocalName() const; 00410 00440 virtual void 00441 setPrefix(const XalanDOMString& prefix); 00442 00443 virtual bool 00444 isIndexed() const; 00445 00446 virtual unsigned long 00447 getIndex() const; 00448 00449 //@} 00450 00451 // These interfaces are inherited from XalanElement... 00452 00461 virtual const XalanDOMString& 00462 getTagName() const; 00463 00471 virtual const XalanDOMString& 00472 getAttribute(const XalanDOMString& name) const; 00473 00481 virtual XalanAttr* 00482 getAttributeNode(const XalanDOMString& name) const; 00483 00494 virtual XalanNodeList* 00495 getElementsByTagName(const XalanDOMString& name) const; 00496 00497 //@} 00499 //@{ 00500 00522 virtual void 00523 setAttribute( 00524 const XalanDOMString& name, 00525 const XalanDOMString& value); 00526 00546 virtual XalanAttr* 00547 setAttributeNode(XalanAttr* newAttr); 00548 00549 //@} 00551 //@{ 00552 00568 virtual XalanAttr* 00569 removeAttributeNode(XalanAttr* oldAttr); 00570 00583 virtual void 00584 removeAttribute(const XalanDOMString& name); 00585 00586 //@} 00588 //@{ 00589 00600 virtual const XalanDOMString& 00601 getAttributeNS( 00602 const XalanDOMString& namespaceURI, 00603 const XalanDOMString& localName) const; 00604 00645 virtual void 00646 setAttributeNS( 00647 const XalanDOMString& namespaceURI, 00648 const XalanDOMString& qualifiedName, 00649 const XalanDOMString& value); 00650 00665 virtual void 00666 removeAttributeNS( 00667 const XalanDOMString& namespaceURI, 00668 const XalanDOMString& localName); 00669 00680 virtual XalanAttr* 00681 getAttributeNodeNS( 00682 const XalanDOMString& namespaceURI, 00683 const XalanDOMString& localName) const; 00684 00704 virtual XalanAttr* 00705 setAttributeNodeNS(XalanAttr* newAttr); 00706 00722 virtual XalanNodeList* 00723 getElementsByTagNameNS( 00724 const XalanDOMString& namespaceURI, 00725 const XalanDOMString& localName) const; 00726 00732 DOM_Element 00733 getXercesNode() const 00734 { 00735 return m_xercesNode; 00736 } 00737 00738 //@} 00739 00740 private: 00741 00742 // Not implemented... 00743 XercesElementBridge(const XercesElementBridge& theSource); 00744 00745 XalanNode& 00746 operator=(const XalanNode& theSource); 00747 00748 bool 00749 operator==(const XercesElementBridge& theRHS) const; 00750 00751 // Data members... 00752 XercesDOM_ElementHack m_xercesNode; 00753 00754 const XercesBridgeNavigator& m_navigator; 00755 00756 XercesNodeListBridge m_children; 00757 00758 XercesNamedNodeMapBridge m_attributes; 00759 }; 00760 00761 00762 00763 #endif // !defined(XERCESELEMENTBRIDGE_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.4 |
|