BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.stree
Class AttrImpl

java.lang.Object
  |
  +--weblogic.apache.xml.utils.UnImplNode
        |
        +--weblogic.apache.xalan.stree.Child
              |
              +--weblogic.apache.xalan.stree.AttrImpl
Direct Known Subclasses:
AttrImplNS

public class AttrImpl
extends Child
implements org.w3c.dom.Attr

Class to hold information about an attribute node.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Fields inherited from class weblogic.apache.xalan.stree.Child
m_doc, m_parent
 
Method Summary
 void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
          Handle a Characters event
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getName()
          Get this attribute's name
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 org.w3c.dom.Node getNextSibling()
          The node immediately following this node.
 java.lang.String getNodeName()
          Returns the node name.
 short getNodeType()
          A short integer indicating what type of node this is.
 java.lang.String getNodeValue()
          Same as getValue().
 org.w3c.dom.Element getOwnerElement()
          The Element node this attribute is attached to or null if this attribute is not in use.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 org.w3c.dom.Node getPreviousSibling()
          The node immediately preceding this node.
 boolean getSpecified()
          If this attribute was explicitly given a value in the original document, this is true ; otherwise, it is false .
 java.lang.String getValue()
          Returns the value of this attribute node.
 void setValue(java.lang.String value)
          Sets the value of this attribute node.
 
Methods inherited from class weblogic.apache.xalan.stree.Child
getAttributes, getFirstChild, getLastChild, getLevel, getOwnerDocument, getParentNode, getTagName, getTransformer, getUid, hasChildNodes, isComplete, isNamespaceNode, isSupported, setAttribute, setComplete, setDoc, setLevel, setParent, setUid, throwIfParseError, throwParseError
 
Methods inherited from class weblogic.apache.xml.utils.UnImplNode
appendChild, appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, error, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildNodes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getLength, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertBefore, insertData, item, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, splitText, substringData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNodeType

public short getNodeType()
A short integer indicating what type of node this is. The named constants for this value are defined in the org.w3c.dom.Node interface.

Returns:
node type of attribute
Overrides:
getNodeType in class UnImplNode

getNodeName

public java.lang.String getNodeName()
Returns the node name.

Returns:
node name
Overrides:
getNodeName in class UnImplNode

getNamespaceURI

public java.lang.String getNamespaceURI()
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.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.

Returns:
namespace URI
Overrides:
getNamespaceURI in class Child

getPrefix

public java.lang.String getPrefix()
The namespace prefix of this node, or null if it is unspecified.

Returns:
namespace prefix of this node
Overrides:
getPrefix in class Child

getLocalName

public java.lang.String getLocalName()
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 Document interface, it is null.

Returns:
local part of the qualified name of this node
Overrides:
getLocalName in class Child

getValue

public java.lang.String getValue()
Returns the value of this attribute node.
For nodes created with a DOM Level 1 method, such as createElement from the Document interface, it is null.
Specified by:
getValue in interface org.w3c.dom.Attr

Returns:
the value of this attribute node

getNodeValue

public java.lang.String getNodeValue()
                              throws org.w3c.dom.DOMException
Same as getValue().

Returns:
the value of this attribute node
Throws:
org.w3c.dom.DOMException -  
Overrides:
getNodeValue in class UnImplNode

setValue

public void setValue(java.lang.String value)
              throws org.w3c.dom.DOMException
Sets the value of this attribute node.
For nodes created with a DOM Level 1 method, such as createElement from the Document interface, it is null.
Specified by:
setValue in interface org.w3c.dom.Attr

Parameters:
value - Attribute value to be set
Throws:
org.w3c.dom.DOMException -  
Overrides:
setValue in class UnImplNode

getSpecified

public boolean getSpecified()
If this attribute was explicitly given a value in the original document, this is true ; otherwise, it is false . Note that the implementation is in charge of this attribute, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the specified flag is automatically flipped to true . To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with specified set to false and the default value (if one exists).
In summary: If the attribute has an assigned value in the document then specified is true , and the value is the assigned value. If the attribute has no assigned value in the document and has a default value in the DTD, then specified is false , and the value is the default value in the DTD. If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, then the attribute does not appear in the structure model of the document.
Specified by:
getSpecified in interface org.w3c.dom.Attr

Returns:
whether this attribute was explicitly given a value in the original document
Overrides:
getSpecified in class UnImplNode

getOwnerElement

public org.w3c.dom.Element getOwnerElement()
The Element node this attribute is attached to or null if this attribute is not in use.
Specified by:
getOwnerElement in interface org.w3c.dom.Attr

Returns:
node this attribute is attached to
Overrides:
getOwnerElement in class UnImplNode

getName

public java.lang.String getName()
Get this attribute's name
Specified by:
getName in interface org.w3c.dom.Attr

Returns:
attribute name

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
The node immediately preceding this node. If there is no such node, this returns null.

Returns:
node immediately preceding this node
Overrides:
getPreviousSibling in class Child

getNextSibling

public org.w3c.dom.Node getNextSibling()
The node immediately following this node. If there is no such node, this returns null.

Returns:
node immediately following this node
Overrides:
getNextSibling in class Child

dispatchCharactersEvent

public void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
                             throws org.xml.sax.SAXException
Handle a Characters event

Parameters:
ch - Content handler to handle SAX events
Throws:
SAXException - if the content handler characters event throws a SAXException.
Overrides:
dispatchCharactersEvent in class Child

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.