|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.impl.xs.opti.DefaultNode org.apache.xerces.impl.xs.opti.NodeImpl org.apache.xerces.impl.xs.opti.AttrImpl
public class AttrImpl
This class represents a single attribute.
Field Summary |
---|
Constructor Summary | |
---|---|
AttrImpl()
Default Constructor |
|
AttrImpl(Element element,
java.lang.String prefix,
java.lang.String localpart,
java.lang.String rawname,
java.lang.String uri,
java.lang.String value)
Constructs an attribute. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name of this attribute. |
Element |
getOwnerElement()
The Element node this attribute is attached to or
null if this attribute is not in use. |
TypeInfo |
getSchemaTypeInfo()
Method getSchemaTypeInfo. |
boolean |
getSpecified()
True if this attribute was explicitly given a value in
the instance document, false otherwise. |
java.lang.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(java.lang.String value)
On retrieval, the value of the attribute is returned as a string. |
Methods inherited from class org.apache.xerces.impl.xs.opti.NodeImpl |
---|
getLocalName, getNamespaceURI, getNodeName, getNodeType, getPrefix, getReadOnly, setReadOnly |
Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultNode |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Constructor Detail |
---|
public AttrImpl()
public AttrImpl(Element element, java.lang.String prefix, java.lang.String localpart, java.lang.String rawname, java.lang.String uri, java.lang.String value)
element
- Element which owns this attributeprefix
- The QName prefix.localpart
- The QName localpart.rawname
- The QName rawname.uri
- The uri binding for the associated prefix.value
- The value of the attribute.Method Detail |
---|
public java.lang.String getName()
Attr
Node.localName
is
different from null
, this attribute is a qualified name.
getName
in interface Attr
public boolean getSpecified()
Attr
True
if this attribute was explicitly given a value in
the instance document, false
otherwise. If the
application changed the value of this attribute node (even if it ends
up having the same value as the default value) then it is set to
true
. The implementation may handle attributes with
default values from other schemas similarly but applications should
use Document.normalizeDocument()
to guarantee this
information is up-to-date.
getSpecified
in interface Attr
public java.lang.String getValue()
Attr
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()
.
getValue
in interface Attr
public Element getOwnerElement()
Attr
Element
node this attribute is attached to or
null
if this attribute is not in use.
getOwnerElement
in interface Attr
public void setValue(java.lang.String value) throws DOMException
Attr
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()
.
setValue
in interface Attr
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public boolean isId()
Attr
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.
isId
in interface Attr
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Attr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |