Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XercesElementBridge.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(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
17 #define XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
25 #if XERCES_VERSION_MAJOR >= 2
26 #include <xercesc/dom/deprecated/DOM_Element.hpp>
27 #else
28 #include <xercesc/dom/DOM_Element.hpp>
29 #endif
30 
31 
32 
34 
35 
36 
38 
39 
40 
44 
45 
46 
47 XALAN_CPP_NAMESPACE_BEGIN
48 
49 
50 
52 
53 
60 {
61 public:
62 
63  typedef XERCES_CPP_NAMESPACE_QUALIFIER DOM_Element DOM_ElementType;
64 
66  const DOM_ElementType& theXercesElement,
67  const XercesBridgeNavigator& theNavigator);
68 
69  virtual
71 
72 
76  virtual const XalanDOMString&
77  getNodeName() const;
78 
82  virtual const XalanDOMString&
83  getNodeValue() const;
84 
88  virtual NodeType
89  getNodeType() const;
90 
100  virtual XalanNode*
101  getParentNode() const;
102 
116  virtual const XalanNodeList*
117  getChildNodes() const;
118 
124  virtual XalanNode*
125  getFirstChild() const;
126 
132  virtual XalanNode*
133  getLastChild() const;
134 
140  virtual XalanNode*
141  getPreviousSibling() const;
142 
148  virtual XalanNode*
149  getNextSibling() const;
150 
155  virtual const XalanNamedNodeMap*
156  getAttributes() const;
157 
167  virtual XalanDocument*
168  getOwnerDocument() const;
169 
171 
173 
192 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
193  virtual XalanNode*
194 #else
195  virtual XercesElementBridge*
196 #endif
197  cloneNode(bool deep) const;
198 
200 
202 
219  virtual XalanNode*
220  insertBefore(
221  XalanNode* newChild,
222  XalanNode* refChild);
223 
237  virtual XalanNode*
238  replaceChild(
239  XalanNode* newChild,
240  XalanNode* oldChild);
241 
249  virtual XalanNode*
250  removeChild(XalanNode* oldChild);
251 
263  virtual XalanNode*
264  appendChild(XalanNode* newChild);
265 
267 
269 
277  virtual bool
278  hasChildNodes() const;
279 
280 
282 
284 
285 
299  virtual void
300  setNodeValue(const XalanDOMString& nodeValue);
301 
303 
305 
322  virtual void
323  normalize();
324 
338  virtual bool
339  isSupported(
340  const XalanDOMString& feature,
341  const XalanDOMString& version) const;
342 
356  virtual const XalanDOMString&
357  getNamespaceURI() const;
358 
363  virtual const XalanDOMString&
364  getPrefix() const;
365 
373  virtual const XalanDOMString&
374  getLocalName() const;
375 
405  virtual void
406  setPrefix(const XalanDOMString& prefix);
407 
408  virtual bool
409  isIndexed() const;
410 
411  virtual IndexType
412  getIndex() const;
413 
415 
416  // These interfaces are inherited from XalanElement...
417 
426  virtual const XalanDOMString&
427  getTagName() const;
428 
436  virtual const XalanDOMString&
437  getAttribute(const XalanDOMString& name) const;
438 
446  virtual XalanAttr*
447  getAttributeNode(const XalanDOMString& name) const;
448 
459  virtual XalanNodeList*
460  getElementsByTagName(const XalanDOMString& name) const;
461 
463 
465 
487  virtual void
488  setAttribute(
489  const XalanDOMString& name,
490  const XalanDOMString& value);
491 
511  virtual XalanAttr*
512  setAttributeNode(XalanAttr* newAttr);
513 
515 
517 
533  virtual XalanAttr*
534  removeAttributeNode(XalanAttr* oldAttr);
535 
548  virtual void
549  removeAttribute(const XalanDOMString& name);
550 
552 
554 
565  virtual const XalanDOMString&
567  const XalanDOMString& namespaceURI,
568  const XalanDOMString& localName) const;
569 
610  virtual void
612  const XalanDOMString& namespaceURI,
613  const XalanDOMString& qualifiedName,
614  const XalanDOMString& value);
615 
630  virtual void
632  const XalanDOMString& namespaceURI,
633  const XalanDOMString& localName);
634 
645  virtual XalanAttr*
647  const XalanDOMString& namespaceURI,
648  const XalanDOMString& localName) const;
649 
669  virtual XalanAttr*
670  setAttributeNodeNS(XalanAttr* newAttr);
671 
687  virtual XalanNodeList*
689  const XalanDOMString& namespaceURI,
690  const XalanDOMString& localName) const;
691 
699  {
700  return m_xercesNode;
701  }
702 
704 
705 private:
706 
707  // Not implemented...
708  XercesElementBridge(const XercesElementBridge& theSource);
709 
710  XalanNode&
711  operator=(const XalanNode& theSource);
712 
713  bool
714  operator==(const XercesElementBridge& theRHS) const;
715 
716  // Data members...
717  XercesDOM_ElementHack m_xercesNode;
718 
719  const XercesBridgeNavigator& m_navigator;
720 
721  XercesNodeListBridge m_children;
722 
723  XercesNamedNodeMapBridge m_attributes;
724 };
725 
726 
727 
728 XALAN_CPP_NAMESPACE_END
729 
730 
731 
732 #endif // !defined(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
XERCES_CPP_NAMESPACE_QUALIFIER DOM_Element DOM_ElementType
Definition: XercesElementBridge.hpp:63
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
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.
This class is deprecated.
Definition: XercesNamedNodeMapBridge.hpp:50
virtual void setNodeValue(const XalanDOMString &nodeValue)=0
Sets the value of the node.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
#define XALAN_XERCESPARSERLIAISON_EXPORT
Definition: XercesParserLiaisonDefinitions.hpp:37
virtual XalanNode * insertBefore(XalanNode *newChild, XalanNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
NodeType
Definition: XalanNode.hpp:53
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
Definition: XalanElement.hpp:42
DOM_ElementType getXercesNode() const
Get the Xerces node this instance represent.
Definition: XercesElementBridge.hpp:698
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.
This class is deprecated.
Definition: XercesNodeListBridge.hpp:53
virtual void removeAttribute(const XalanDOMString &name)=0
Removes an attribute by name.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
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.
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.
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...
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.
Definition: XercesDOM_NodeHack.hpp:99
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
This class is deprecated.
Definition: XercesBridgeNavigator.hpp:53
virtual XalanAttr * getAttributeNodeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves an Attr node by local name and namespace URI.
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.
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
This class is deprecated.
Definition: XercesElementBridge.hpp:59
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