## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# XalanSourceTreeElementA Class Reference

Inheritance diagram for XalanSourceTreeElementA:

[legend]
Collaboration diagram for XalanSourceTreeElementA:

[legend]
List of all members.

## Public Types

- typedef unsigned long AttributesCountType

## Public Member Functions

- XalanSourceTreeElementA (MemoryManagerType &theManager, const XalanDOMString &theTagName, XalanSourceTreeDocument *theOwnerDocument, XalanSourceTreeAttr **theAttributes, AttributesCountType theAttributeCount, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, IndexType theIndex=0)
    Constructor.
- virtual ~XalanSourceTreeElementA ()
- virtual const XalanNamedNodeMap * getAttributes () const
    Gets a `NamedNodeMap` containing the attributes of this node (if it is an `Element`) or `null` otherwise.
- virtual XalanSourceTreeElementA * cloneNode (bool deep) const
    Returns a duplicate of this node.
- virtual const XalanDOMString & getNamespaceURI () const
    Get the namespace URI of this node, or `null` if it is unspecified.
- virtual const XalanDOMString & getPrefix () const
    Get the namespace prefix of this node, or `null` if it is unspecified.
- virtual const XalanDOMString & getLocalName () const
    Returns the local part of the qualified name of this node.
- virtual const XalanDOMString & getAttribute (const XalanDOMString &name) const
    Retrieves an attribute value by name.
- virtual XalanAttr * getAttributeNode (const XalanDOMString &name) const
    Retrieves an `DOM_Attr` node by name.
- virtual const XalanDOMString & getAttributeNS (const XalanDOMString &namespaceURI, const XalanDOMString &localName) const
    Retrieves an attribute value by local name and namespace URI.
- virtual XalanAttr * getAttributeNodeNS (const XalanDOMString &namespaceURI, const XalanDOMString &localName) const
    Retrieves an `DOM_Attr` node by local name and namespace URI.
- AttributesCountType getAttributeCount () const
- XalanSourceTreeAttr * getAttributeByIndex (AttributesCountType index) const
- XalanSourceTreeElementA * clone (bool deep) const

## Protected Member Functions

- XalanSourceTreeElementA (MemoryManagerType &theManager, const XalanSourceTreeElementA &theSource, bool deep=false)

## Static Protected Member Functions

- XalanSourceTreeElementA * create (MemoryManagerType &theManager, const XalanSourceTreeElementA &theSource, bool deep=false)

## Member Typedef Documentation

typedef unsigned long XalanSourceTreeElementA::AttributesCountType

## Constructor & Destructor Documentation

XalanSourceTreeElementA::XalanSourceTreeElementA | ( | MemoryManagerType & | theManager,
|  | const XalanDOMString & | theTagName,
|  | XalanSourceTreeDocument * | theOwnerDocument,
|  | XalanSourceTreeAttr ** | theAttributes,
|  | AttributesCountType | theAttributeCount,
|  | XalanNode * | theParentNode = 0,
|  | XalanNode * | thePreviousSibling = 0,
|  | XalanNode * | theNextSibling = 0,
|  | IndexType | theIndex = 0
| ) |

Constructor.

Parameters:

  theTagName | The tag name of the element
  theOwnerDocument | The document that owns the instance
  theAttributes | An array of pointers to the attribute instances for the element
  theAttributeCount | The number of attributes.
  theParentNode | The parent node, if any.
  thePreviousSibling | The previous sibling, if any.
  theNextSibling | The next sibling, if any.
  theIndex | The document-order index of the node.

virtual XalanSourceTreeElementA::~XalanSourceTreeElementA | ( |  | ) | `[virtual]`

XalanSourceTreeElementA::XalanSourceTreeElementA | ( | MemoryManagerType & | theManager,
|  | const XalanSourceTreeElementA & | theSource,
|  | bool | deep = false
| ) | `[protected]`

## Member Function Documentation

XalanSourceTreeElementA* XalanSourceTreeElementA::clone | ( | bool | deep | ) | const

virtual XalanSourceTreeElementA* XalanSourceTreeElementA::cloneNode | ( | bool | deep | ) | const`[virtual]`

Returns a duplicate of this node.

This function serves as a generic copy constructor for nodes.

The duplicate node has no parent ( `parentNode` returns `null`.).
Cloning an `Element` copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child `Text` node. Cloning any other type of node simply returns a copy of this node.

Parameters:

  deep | If `true`, recursively clone the subtree under the specified node; if `false`, clone only the node itself (and its attributes, if it is an `Element`).

Returns:
  The duplicate node.

Implements XalanSourceTreeElement.

Reimplemented in XalanSourceTreeElementANS.

XalanSourceTreeElementA* XalanSourceTreeElementA::create | ( | MemoryManagerType & | theManager,
|  | const XalanSourceTreeElementA & | theSource,
|  | bool | deep = false
| ) | `[static, protected]`

virtual const XalanDOMString& XalanSourceTreeElementA::getAttribute | ( | const XalanDOMString & | name | ) | const`[virtual]`

Retrieves an attribute value by name.

Parameters:

  name | The name of the attribute to retrieve.

Returns:
  The `DOM_Attr` value as a string, or the empty string if that attribute does not have a specified or default value.

Implements XalanSourceTreeElement.

XalanSourceTreeAttr* XalanSourceTreeElementA::getAttributeByIndex | ( | AttributesCountType | index | ) | const

AttributesCountType XalanSourceTreeElementA::getAttributeCount | ( |  | ) | const

virtual XalanAttr* XalanSourceTreeElementA::getAttributeNode | ( | const XalanDOMString & | name | ) | const`[virtual]`

Retrieves an `DOM_Attr` node by name.

Parameters:

  name | The name (`nodeName`) of the attribute to retrieve.

Returns:
  The `DOM_Attr` node with the specified name (`nodeName`) or `null` if there is no such attribute.

Implements XalanSourceTreeElement.

virtual XalanAttr* XalanSourceTreeElementA::getAttributeNodeNS | ( | const XalanDOMString & | namespaceURI,
|  | const XalanDOMString & | localName
| ) | const`[virtual]`

Retrieves an `DOM_Attr` node by local name and namespace URI.

Parameters:

  namespaceURI | The namespace URI of the attribute to retrieve.
  localName | The local name of the attribute to retrieve.

Returns:
  The `DOM_Attr` node with the specified attribute local name and namespace URI or `null` if there is no such attribute.

Implements XalanSourceTreeElement.

virtual const XalanDOMString& XalanSourceTreeElementA::getAttributeNS | ( | const XalanDOMString & | namespaceURI,
|  | const XalanDOMString & | localName
| ) | const`[virtual]`

Retrieves an attribute value by local name and namespace URI.

Parameters:

  namespaceURI | The namespace URI of the attribute to retrieve.
  localName | The local name of the attribute to retrieve.

Returns:
  The `DOM_Attr` value as a string, or an empty string if that attribute does not have a specified or default value.

Implements XalanSourceTreeElement.

virtual const XalanNamedNodeMap* XalanSourceTreeElementA::getAttributes | ( |  | ) | const`[virtual]`

| Gets a `NamedNodeMap` containing the attributes of this node (if it is an `Element`) or `null` otherwise. Implements XalanSourceTreeElement.

virtual const XalanDOMString& XalanSourceTreeElementA::getLocalName | ( |  | ) | const`[virtual]`

| Returns the local part of the qualified name of this node. For nodes created with a DOM Level 1 method, such as `createElement` from the `DOM_Document` interface, it is null. Implements XalanSourceTreeElement. Reimplemented in XalanSourceTreeElementANS.

virtual const XalanDOMString& XalanSourceTreeElementA::getNamespaceURI | ( |  | ) | const`[virtual]`

Get the namespace URI of this node, or `null` if it is unspecified.

This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.

For nodes of any type other than `ELEMENT_NODE` and `ATTRIBUTE_NODE` and nodes created with a DOM Level 1 method, such as `createElement` from the `Document` interface, this is always `null`.

Implements XalanSourceTreeElement.

Reimplemented in XalanSourceTreeElementANS.

virtual const XalanDOMString& XalanSourceTreeElementA::getPrefix | ( |  | ) | const`[virtual]`

| Get the namespace prefix of this node, or `null` if it is unspecified. Implements XalanSourceTreeElement. Reimplemented in XalanSourceTreeElementANS.

The documentation for this class was generated from the following file:

- XalanSourceTreeElementA.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.