net.sf.saxon.dom
Class DOMAttributeMap

java.lang.Object
  extended by net.sf.saxon.dom.DOMAttributeMap
All Implemented Interfaces:
NamedNodeMap

 class DOMAttributeMap
extends Object
implements NamedNodeMap

Implementation of DOM NamedNodeMap used to represent the attributes of an element, for use when Saxon element and attribute nodes are accessed using the DOM API.

Note that namespaces are treated as attributes.


Constructor Summary
DOMAttributeMap(NodeInfo parent)
          Construct an AttributeMap for a given element node
 
Method Summary
 int getLength()
          Get number of attributes and namespaces (DOM NamedNodeMap method).
 Node getNamedItem(String name)
          Get named attribute (DOM NamedNodeMap method)
 Node getNamedItemNS(String uri, String localName)
          Get named attribute (DOM NamedNodeMap method)
 Node item(int index)
          Get n'th attribute (DOM NamedNodeMap method).
 Node removeNamedItem(String name)
          Remove named attribute (DOM NamedNodeMap method: always fails)
 Node removeNamedItemNS(String uri, String localName)
          Remove named attribute (DOM NamedNodeMap method: always fails)
 Node setNamedItem(Node arg)
          Set named attribute (DOM NamedNodeMap method: always fails)
 Node setNamedItemNS(Node arg)
          Set named attribute (DOM NamedNodeMap method: always fails)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMAttributeMap

public DOMAttributeMap(NodeInfo parent)
Construct an AttributeMap for a given element node

Method Detail

getNamedItem

public Node getNamedItem(String name)
Get named attribute (DOM NamedNodeMap method)

Specified by:
getNamedItem in interface NamedNodeMap

item

public Node item(int index)
Get n'th attribute (DOM NamedNodeMap method). In this implementation we number the attributes as follows: 0 - the xmlns:xml namespace declaration 1-n further namespace declarations n+1... "real" attribute declarations

Specified by:
item in interface NamedNodeMap

getLength

public int getLength()
Get number of attributes and namespaces (DOM NamedNodeMap method).

Specified by:
getLength in interface NamedNodeMap

getNamedItemNS

public Node getNamedItemNS(String uri,
                           String localName)
Get named attribute (DOM NamedNodeMap method)

Specified by:
getNamedItemNS in interface NamedNodeMap

setNamedItem

public Node setNamedItem(Node arg)
                  throws DOMException
Set named attribute (DOM NamedNodeMap method: always fails)

Specified by:
setNamedItem in interface NamedNodeMap
Throws:
DOMException

removeNamedItem

public Node removeNamedItem(String name)
                     throws DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)

Specified by:
removeNamedItem in interface NamedNodeMap
Throws:
DOMException

setNamedItemNS

public Node setNamedItemNS(Node arg)
                    throws DOMException
Set named attribute (DOM NamedNodeMap method: always fails)

Specified by:
setNamedItemNS in interface NamedNodeMap
Throws:
DOMException

removeNamedItemNS

public Node removeNamedItemNS(String uri,
                              String localName)
                       throws DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)

Specified by:
removeNamedItemNS in interface NamedNodeMap
Throws:
DOMException