public class OMAttr extends OMNode
Modifier | Constructor and Description |
---|---|
protected |
OMAttr(Attr ot)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Attr |
getAttr()
Returns the wrapped
Attr |
String |
getName()
Returns the name of this attribute.
|
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.
|
addDomHandler, addHandler, appendChild, cleanup, cloneNode, convert, convertList, dispatch, fireEvent, getChildNodes, getEventBus, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setNodeValue, toString
public final String getName()
OMNode.localName
is
different from null
, this attribute is a qualified name.public final String getValue()
getAttribute
on the
OMElement
interface.
OMText
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 OMElement.setAttribute()
.
public final void setValue(String value)
getAttribute
on the
OMElement
interface.
OMText
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 OMElement.setAttribute()
.
value
- the attribute valueDOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public final boolean isId()
ownerElement
of this attribute
can be retrieved using the method OMDocument.getElementById
. The implementation could use several ways to determine if an
attribute node is known to contain an identifier:
OMDocument.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]
.
OMDocument.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]
.
OMElement.setIdAttribute()
,
OMElement.setIdAttributeNS()
, or
OMElement.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.
OMDocument.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 OMAttr.schemaTypeInfo
attribute contains an ID type,
isId
will always return true.Copyright © 2018. All Rights Reserved.