public class Attr
extends com.google.gwt.dom.client.Node
Modifier | Constructor and Description |
---|---|
protected |
Attr()
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of this attribute.
|
com.google.gwt.dom.client.Element |
getOwnerElement()
The
Element node this attribute is attached to or
null if this attribute is not in use. |
String |
getValue()
On retrieval, the value of the attribute is returned as a string.
|
boolean |
isId()
Returns whether this attribute is known to be of type ID (i.e.
|
void |
setValue(String value)
On retrieval, the value of the attribute is returned as a string.
|
appendChild, as, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, is, isOrHasChild, removeAllChildren, removeChild, removeFromParent, replaceChild, setNodeValue
public final String getName()
OMNode.localName
is
different from null
, this attribute is a qualified name.public final String getValue()
getAttribute
on the
Element
interface.
Text
node with the unparsed
contents of the string, i.e. any characters that an XML processor
would recognize as markup are instead treated as literal text. See
also the method Element.setAttribute()
.
public final void setValue(String value) throws com.google.gwt.core.client.JavaScriptException
getAttribute
on the
Element
interface.
Text
node with the unparsed
contents of the string, i.e. any characters that an XML processor
would recognize as markup are instead treated as literal text. See
also the method Element.setAttribute()
.
value
- the attribute valueDOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.com.google.gwt.core.client.JavaScriptException
public final boolean isId()
ownerElement
of this attribute
can be retrieved using the method Document.getElementById
. The implementation could use several ways to determine if an
attribute node is known to contain an identifier:
Document.normalizeDocument()
, the post-schema-validation
infoset contributions (PSVI contributions) values are used to
determine if this attribute is a schema-determined ID attribute using
the
schema-determined ID definition in [XPointer]
.
Document.normalizeDocument()
, the infoset [type definition] value is used to determine if this attribute is a DTD-determined ID
attribute using the
DTD-determined ID definition in [XPointer]
.
Element.setIdAttribute()
,
Element.setIdAttributeNS()
, or
Element.setIdAttributeNode()
, i.e. it is an
user-determined ID attribute;
Note: XPointer framework (see section 3.2 in [XPointer] ) consider the DOM user-determined ID attribute as being part of the XPointer externally-determined ID definition.
Document.normalizeDocument()
, all user-determined ID
attributes are reset and all attribute nodes ID information are then
reevaluated in accordance to the schema used. As a consequence, if
the Attr.schemaTypeInfo
attribute contains an ID type,
isId
will always return true.public final com.google.gwt.dom.client.Element getOwnerElement()
Element
node this attribute is attached to or
null
if this attribute is not in use.Copyright © 2018. All Rights Reserved.