Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XercesElementWrapper.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(XERCESELEMENTWRAPPER_HEADER_GUARD_1357924680)
17 #define XERCESELEMENTWRAPPER_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
27 
28 
29 
31 
32 
33 
36 
37 
38 
39 XALAN_CPP_NAMESPACE_BEGIN
40 
41 
42 
44 
45 
46 
48 {
49 public:
50 
52  const DOMElementType* theXercesElement,
53  const XercesWrapperNavigator& theNavigator);
54 
55  virtual
57 
58 
62  virtual const XalanDOMString&
63  getNodeName() const;
64 
68  virtual const XalanDOMString&
69  getNodeValue() const;
70 
74  virtual NodeType
75  getNodeType() const;
76 
86  virtual XalanNode*
87  getParentNode() const;
88 
102  virtual const XalanNodeList*
103  getChildNodes() const;
104 
110  virtual XalanNode*
111  getFirstChild() const;
112 
118  virtual XalanNode*
119  getLastChild() const;
120 
126  virtual XalanNode*
127  getPreviousSibling() const;
128 
134  virtual XalanNode*
135  getNextSibling() const;
136 
141  virtual const XalanNamedNodeMap*
142  getAttributes() const;
143 
153  virtual XalanDocument*
154  getOwnerDocument() const;
155 
157 
159 
178 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
179  virtual XalanNode*
180 #else
181  virtual XercesElementWrapper*
182 #endif
183  cloneNode(bool deep) const;
184 
186 
188 
205  virtual XalanNode*
206  insertBefore(
207  XalanNode* newChild,
208  XalanNode* refChild);
209 
223  virtual XalanNode*
224  replaceChild(
225  XalanNode* newChild,
226  XalanNode* oldChild);
227 
235  virtual XalanNode*
236  removeChild(XalanNode* oldChild);
237 
249  virtual XalanNode*
250  appendChild(XalanNode* newChild);
251 
253 
255 
263  virtual bool
264  hasChildNodes() const;
265 
266 
268 
270 
271 
285  virtual void
286  setNodeValue(const XalanDOMString& nodeValue);
287 
289 
291 
308  virtual void
309  normalize();
310 
324  virtual bool
325  isSupported(
326  const XalanDOMString& feature,
327  const XalanDOMString& version) const;
328 
342  virtual const XalanDOMString&
343  getNamespaceURI() const;
344 
349  virtual const XalanDOMString&
350  getPrefix() const;
351 
359  virtual const XalanDOMString&
360  getLocalName() const;
361 
391  virtual void
392  setPrefix(const XalanDOMString& prefix);
393 
394  virtual bool
395  isIndexed() const;
396 
397  virtual IndexType
398  getIndex() const;
399 
401 
402  // These interfaces are inherited from XalanElement...
403 
412  virtual const XalanDOMString&
413  getTagName() const;
414 
422  virtual const XalanDOMString&
423  getAttribute(const XalanDOMString& name) const;
424 
432  virtual XalanAttr*
433  getAttributeNode(const XalanDOMString& name) const;
434 
445  virtual XalanNodeList*
446  getElementsByTagName(const XalanDOMString& name) const;
447 
449 
451 
473  virtual void
474  setAttribute(
475  const XalanDOMString& name,
476  const XalanDOMString& value);
477 
497  virtual XalanAttr*
498  setAttributeNode(XalanAttr* newAttr);
499 
501 
503 
519  virtual XalanAttr*
520  removeAttributeNode(XalanAttr* oldAttr);
521 
534  virtual void
535  removeAttribute(const XalanDOMString& name);
536 
538 
540 
551  virtual const XalanDOMString&
553  const XalanDOMString& namespaceURI,
554  const XalanDOMString& localName) const;
555 
596  virtual void
598  const XalanDOMString& namespaceURI,
599  const XalanDOMString& qualifiedName,
600  const XalanDOMString& value);
601 
616  virtual void
618  const XalanDOMString& namespaceURI,
619  const XalanDOMString& localName);
620 
631  virtual XalanAttr*
633  const XalanDOMString& namespaceURI,
634  const XalanDOMString& localName) const;
635 
655  virtual XalanAttr*
656  setAttributeNodeNS(XalanAttr* newAttr);
657 
673  virtual XalanNodeList*
675  const XalanDOMString& namespaceURI,
676  const XalanDOMString& localName) const;
677 
683  const DOMElementType*
685  {
686  return m_xercesNode;
687  }
688 
690 
691 private:
692 
693  // Implementation of XalanNodeList for children.
694  virtual XalanNode*
695  item(unsigned int index) const;
696 
697  virtual unsigned int
698  getLength() const;
699 
700 
701  // Not implemented...
702  XercesElementWrapper(const XercesElementWrapper& theSource);
703 
704  XalanNode&
705  operator=(const XalanNode& theSource);
706 
707  bool
708  operator==(const XercesElementWrapper& theRHS) const;
709 
710  // Data members...
711  const DOMElementType* const m_xercesNode;
712 
713  const XercesWrapperNavigator& m_navigator;
714 
715  XercesNamedNodeMapWrapper m_attributes;
716 };
717 
718 
719 
720 XALAN_CPP_NAMESPACE_END
721 
722 
723 
724 #endif // !defined(XERCESELEMENTWRAPPER_HEADER_GUARD_1357924680)
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
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.
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
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...
const DOMElementType * getXercesNode() const
Get the Xerces node this instance represent.
Definition: XercesElementWrapper.hpp:684
virtual XalanElement * cloneNode(bool deep) const =0
Returns a duplicate of this node.
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: XercesNamedNodeMapWrapper.hpp:41
virtual XalanNode * item(unsigned int index) const =0
Returns the indexth item in the collection.
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
Definition: XercesWrapperNavigator.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.
Definition: XercesElementWrapper.hpp:47
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
XERCES_CPP_NAMESPACE_QUALIFIER DOMElement DOMElementType
Definition: XercesWrapperTypes.hpp:60
virtual unsigned int getLength() const =0
Returns the number of nodes in the list.
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