00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 1999-2004 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 <xalanc/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 <xalanc/XalanDOM/XalanElement.hpp> 00079 00080 00081 00082 #include <xalanc/PlatformSupport/DOMStringHelper.hpp> 00083 00084 00085 00086 #include <xalanc/XercesParserLiaison/Deprecated/XercesDOM_NodeHack.hpp> 00087 #include <xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.hpp> 00088 #include <xalanc/XercesParserLiaison/Deprecated/XercesNodeListBridge.hpp> 00089 00090 00091 00092 XALAN_CPP_NAMESPACE_BEGIN 00093 00094 00095 00096 class XercesBridgeNavigator; 00097 00098 00104 class XALAN_XERCESPARSERLIAISON_EXPORT XercesElementBridge : public XalanElement 00105 { 00106 public: 00107 00108 typedef XERCES_CPP_NAMESPACE_QUALIFIER DOM_Element DOM_ElementType; 00109 00110 XercesElementBridge( 00111 const DOM_ElementType& theXercesElement, 00112 const XercesBridgeNavigator& theNavigator); 00113 00114 virtual 00115 ~XercesElementBridge(); 00116 00117 00121 virtual const XalanDOMString& 00122 getNodeName() const; 00123 00127 virtual const XalanDOMString& 00128 getNodeValue() const; 00129 00133 virtual NodeType 00134 getNodeType() const; 00135 00145 virtual XalanNode* 00146 getParentNode() const; 00147 00161 virtual const XalanNodeList* 00162 getChildNodes() const; 00163 00169 virtual XalanNode* 00170 getFirstChild() const; 00171 00177 virtual XalanNode* 00178 getLastChild() const; 00179 00185 virtual XalanNode* 00186 getPreviousSibling() const; 00187 00193 virtual XalanNode* 00194 getNextSibling() const; 00195 00200 virtual const XalanNamedNodeMap* 00201 getAttributes() const; 00202 00212 virtual XalanDocument* 00213 getOwnerDocument() const; 00214 00216 00218 00237 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) 00238 virtual XalanNode* 00239 #else 00240 virtual XercesElementBridge* 00241 #endif 00242 cloneNode(bool deep) const; 00243 00245 00247 00264 virtual XalanNode* 00265 insertBefore( 00266 XalanNode* newChild, 00267 XalanNode* refChild); 00268 00282 virtual XalanNode* 00283 replaceChild( 00284 XalanNode* newChild, 00285 XalanNode* oldChild); 00286 00294 virtual XalanNode* 00295 removeChild(XalanNode* oldChild); 00296 00308 virtual XalanNode* 00309 appendChild(XalanNode* newChild); 00310 00312 00314 00322 virtual bool 00323 hasChildNodes() const; 00324 00325 00327 00329 00330 00344 virtual void 00345 setNodeValue(const XalanDOMString& nodeValue); 00346 00348 00350 00367 virtual void 00368 normalize(); 00369 00383 virtual bool 00384 isSupported( 00385 const XalanDOMString& feature, 00386 const XalanDOMString& version) const; 00387 00401 virtual const XalanDOMString& 00402 getNamespaceURI() const; 00403 00408 virtual const XalanDOMString& 00409 getPrefix() const; 00410 00418 virtual const XalanDOMString& 00419 getLocalName() const; 00420 00450 virtual void 00451 setPrefix(const XalanDOMString& prefix); 00452 00453 virtual bool 00454 isIndexed() const; 00455 00456 virtual IndexType 00457 getIndex() const; 00458 00460 00461 // These interfaces are inherited from XalanElement... 00462 00471 virtual const XalanDOMString& 00472 getTagName() const; 00473 00481 virtual const XalanDOMString& 00482 getAttribute(const XalanDOMString& name) const; 00483 00491 virtual XalanAttr* 00492 getAttributeNode(const XalanDOMString& name) const; 00493 00504 virtual XalanNodeList* 00505 getElementsByTagName(const XalanDOMString& name) const; 00506 00508 00510 00532 virtual void 00533 setAttribute( 00534 const XalanDOMString& name, 00535 const XalanDOMString& value); 00536 00556 virtual XalanAttr* 00557 setAttributeNode(XalanAttr* newAttr); 00558 00560 00562 00578 virtual XalanAttr* 00579 removeAttributeNode(XalanAttr* oldAttr); 00580 00593 virtual void 00594 removeAttribute(const XalanDOMString& name); 00595 00597 00599 00610 virtual const XalanDOMString& 00611 getAttributeNS( 00612 const XalanDOMString& namespaceURI, 00613 const XalanDOMString& localName) const; 00614 00655 virtual void 00656 setAttributeNS( 00657 const XalanDOMString& namespaceURI, 00658 const XalanDOMString& qualifiedName, 00659 const XalanDOMString& value); 00660 00675 virtual void 00676 removeAttributeNS( 00677 const XalanDOMString& namespaceURI, 00678 const XalanDOMString& localName); 00679 00690 virtual XalanAttr* 00691 getAttributeNodeNS( 00692 const XalanDOMString& namespaceURI, 00693 const XalanDOMString& localName) const; 00694 00714 virtual XalanAttr* 00715 setAttributeNodeNS(XalanAttr* newAttr); 00716 00732 virtual XalanNodeList* 00733 getElementsByTagNameNS( 00734 const XalanDOMString& namespaceURI, 00735 const XalanDOMString& localName) const; 00736 00742 DOM_ElementType 00743 getXercesNode() const 00744 { 00745 return m_xercesNode; 00746 } 00747 00749 00750 private: 00751 00752 // Not implemented... 00753 XercesElementBridge(const XercesElementBridge& theSource); 00754 00755 XalanNode& 00756 operator=(const XalanNode& theSource); 00757 00758 bool 00759 operator==(const XercesElementBridge& theRHS) const; 00760 00761 // Data members... 00762 XercesDOM_ElementHack m_xercesNode; 00763 00764 const XercesBridgeNavigator& m_navigator; 00765 00766 XercesNodeListBridge m_children; 00767 00768 XercesNamedNodeMapBridge m_attributes; 00769 }; 00770 00771 00772 00773 XALAN_CPP_NAMESPACE_END 00774 00775 00776 00777 #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.7 |
|