net.sf.saxon.dom
Class DOMAttributeMap

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

 class DOMAttributeMap
extends java.lang.Object
implements org.w3c.dom.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).
 org.w3c.dom.Node getNamedItem(java.lang.String name)
          Get named attribute (DOM NamedNodeMap method)
 org.w3c.dom.Node getNamedItemNS(java.lang.String uri, java.lang.String localName)
          Get named attribute (DOM NamedNodeMap method)
 org.w3c.dom.Node item(int index)
          Get n'th attribute (DOM NamedNodeMap method).
 org.w3c.dom.Node removeNamedItem(java.lang.String name)
          Remove named attribute (DOM NamedNodeMap method: always fails)
 org.w3c.dom.Node removeNamedItemNS(java.lang.String uri, java.lang.String localName)
          Remove named attribute (DOM NamedNodeMap method: always fails)
 org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
          Set named attribute (DOM NamedNodeMap method: always fails)
 org.w3c.dom.Node setNamedItemNS(org.w3c.dom.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 org.w3c.dom.Node getNamedItem(java.lang.String name)
Get named attribute (DOM NamedNodeMap method)

Specified by:
getNamedItem in interface org.w3c.dom.NamedNodeMap

item

public org.w3c.dom.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 org.w3c.dom.NamedNodeMap

getLength

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

Specified by:
getLength in interface org.w3c.dom.NamedNodeMap

getNamedItemNS

public org.w3c.dom.Node getNamedItemNS(java.lang.String uri,
                                       java.lang.String localName)
Get named attribute (DOM NamedNodeMap method)

Specified by:
getNamedItemNS in interface org.w3c.dom.NamedNodeMap

setNamedItem

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

Specified by:
setNamedItem in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

removeNamedItem

public org.w3c.dom.Node removeNamedItem(java.lang.String name)
                                 throws org.w3c.dom.DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)

Specified by:
removeNamedItem in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

setNamedItemNS

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

Specified by:
setNamedItemNS in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException

removeNamedItemNS

public org.w3c.dom.Node removeNamedItemNS(java.lang.String uri,
                                          java.lang.String localName)
                                   throws org.w3c.dom.DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)

Specified by:
removeNamedItemNS in interface org.w3c.dom.NamedNodeMap
Throws:
org.w3c.dom.DOMException