::class xmlAttr public subclass xmlNode

CLASS: xmlAttr

The xmlAttr interface represents an attribute in an xmlElement object. Typically the allowable values for the
attribute are defined in a schema associated with the document.

xmlAttr objects inherit the xmlNode interface, but since they are not actually child nodes of the element they
describe, the DOM does not consider them part of the document tree. Thus, the xmlNode attributes parentNode,
previousSibling, and nextSibling have a .nil value for xmlAttr objects. The DOM takes the view
that attributes are properties of elements rather than having a separate identity from the elements they are
associated with; this should make it more efficient to implement such features as default attributes associated with
all elements of a given type. Furthermore, xmlAttr nodes may not be immediate children of a xmlDocumentFragment.
However, they can be associated with xmlElement nodes contained within a xmlDocumentFragment. In short, users and
implementors of the DOM need to be aware that xmlAttr nodes have some things in common with other objects inheriting
the Node interface, but they also are quite distinct.

The attribute's effective value is determined as follows: if this attribute has been explicitly assigned any value,
that value is the attribute's effective value; otherwise, if there is a declaration for this attribute, and that
declaration includes a default value, then that default value is the attribute's effective value; otherwise, the
attribute does not exist on this element in the structure model until it has been explicitly added. Note that the
xmlNode nodeValue attribute on the xmlAttr instance can also be used to retrieve the string version of the
attribute's value(s).

If the attribute was not explicitly given a value in the instance document but has a default value provided by the
schema associated with the document, an attribute node will be created with specified set to false. Removing attribute
nodes for which a default value is defined in the schema generates a new attribute node with the default value and
specified set to false. If validation occurred while invoking the xmlDocument normalizeDocument, attribute
nodes with specified equals to false are recomputed according to the default attribute values provided by the schema.
If no default value is associate with this attribute in the schema, the attribute node is discarded.

In XML, where the value of an attribute can contain entity references, the child nodes of the xmlAttr node may be
either xmlText or xmlEntityReference nodes (when these are in use; see the description ofxml EntityReference for
discussion).

Definition at line 1111 of xmlDOM.cls

Public Methods

  init ()
  name ()
  value ()

Public Attributes

  isId
  isId
no comment
  ownerElement
  ownerElement
no comment
  schemaTypeInfo
  schemaTypeInfo
no comment
  specified
  specified
no comment

Public Class Methods inherited from xmlNode

number - unique identifier for the new xmlNode getId ()

Public Methods inherited from xmlNode

node - the node appended appendChild (child)
nodes - A xmlNodeList that contains all the children of this node. children ()
node - the duplicated node cloneNode (deep=.false)
number - Position relatively to the reference node compareDocumentPosition (other)
child - The first child of this node firstChild ()
domObject - An object which implements the specialized APIs or .nil getFeature (feature, version)
userdata - the DOMUserData associated, or .nil if there was none getUserData (key)
boolean - .true if this node has any attributes, .false otherwise hasAttributes ()
boolean - .true if this node has any children, .false otherwise hasChildNodes ()
  init ()
node - the node being inserted insertBefore (child, where)
boolean - .true if default, .false otherwise isDefaultNamespace (uri)
boolean - .true if equal, .false otherwise isEqualNode (other)
boolean - .true if the nodes are the same, .false otherwise. isSameNode (other)
boolean - .true if supported on this node, .false otherwise. isSupported (feature, version)
aNode - The last child of this node. lastChild ()
aString - The associated namespaceURI or .nil if none is found. lookupNamespaceURI (prefix)
aString - An associated namespace prefix or .nil if none is found lookupPrefix (uri)
aNode - The node immediately following this node. normalize ()
aNode - The node immediately preceding this node. removeChild (child)
aNode - The node replaced. replaceChild (new, old)
  setReadOnly (attrName, attrValue)
userData - The DOMUserData previously associated to the given key on this node, or null if there was none. setUserData (key, data, handler)
  textContent ()

Public Attributes inherited from xmlNode

  attributes
  attributes
no comment
  baseURI
  baseURI
no comment
  childNodes
  childNodes
no comment
  localName
  localName
no comment
  namespaceURI
  namespaceURI
no comment
  nextSibling
  nodeName
  nodeName
no comment
  nodeType
  nodeType
no comment
  nodeValue
  nodeValue
no comment
  ownerDocument
  ownerDocument
no comment
  parentNode
  parentNode
no comment
  prefix
  prefix
no comment
  previousSibling
  textContent
no comment

Private Class Attributes inherited from xmlNode

  instances

Private Methods inherited from xmlNode

  treeWalk (nodes, name, nl)

Private Attributes inherited from xmlNode

  id

Instantiated by

xmlDOM.cls line 2223
xmlDOM.cls line 2267

Feature Detail

xmlAttr::attribute isId get

Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not.
When it is and its value is unique, the ownerElement of this attribute can be retrieved using the xmlDocument
getElementById method. The implementation could use several ways to determine if an attribute node is known to
contain an identifier:

xmlAttr::attribute isId set
Definition at line 1136 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 1987 "node~isId = isId"
xmlDOM.cls line 2006 "node~isId = isId"
xmlDOM.cls line 2023 "idAttr~isId = isId"

xmlAttr::method name

Returns the name of this attribute. If the xmlNode localName is different from .nil, this attribute is a
qualified name.


Definition at line 1141 of xmlDOM.cls
Dynamically referenced by
tryxmldom.rex line 255 "attrName = attrDir[i]~name"
xmlDOM.cls line 1946 "raise user domException additional (.domException~wrong_document_err) description ("Attribute" newAttr~name "is owned by another document")"
xmlDOM.cls line 2272 "attr~name = qualifiedName"

xmlAttr::attribute ownerElement get

The xmlElement node this attribute is attached to or .nil if this attribute is not in use.

Definition at line 1146 of xmlDOM.cls
Dynamically referenced by
tryxmldom.rex line 80 "attr~ownerElement = gpx"
tryxmldom.rex line 83 "attr~ownerElement = gpx"
tryxmldom.rex line 86 "attr~ownerElement = gpx"
tryxmldom.rex line 89 "attr~ownerElement = gpx"
tryxmldom.rex line 92 "attr~ownerElement = gpx"
tryxmldom.rex line 114 "attr~ownerElement = link"
tryxmldom.rex line 141 "attr~ownerElement = bounds"
tryxmldom.rex line 144 "attr~ownerElement = bounds"
tryxmldom.rex line 147 "attr~ownerElement = bounds"
tryxmldom.rex line 150 "attr~ownerElement = bounds"
tryxmldom.rex line 173 "attr~ownerElement = rtept"
tryxmldom.rex line 176 "attr~ownerElement = rtept"
tryxmldom.rex line 211 "attr~ownerElement = trkpt"
tryxmldom.rex line 214 "attr~ownerElement = trkpt"
xmlDOM.cls line 1016 "if arg~ownerElement<>.nil"
xmlDOM.cls line 1039 "if arg~ownerElement<>.nil"
xmlDOM.cls line 1179 "self~ownerElement = .nil"
xmlDOM.cls line 1948 "if newAttr~ownerElement<>self "
xmlDOM.cls line 1949 "raise user domException additional (.domException~inuse_attribute_err) description (newAttr~ownerElement)"
xmlDOM.cls line 2020 "if idAttr~ownerElement<>self "
xmlDOM.cls line 2816 "self~attrNode~ownerElement = self~nodeStack[1]"

xmlAttr::attribute ownerElement set
Definition at line 1147 of xmlDOM.cls
Dynamically referenced by
tryxmldom.rex line 80 "attr~ownerElement = gpx"
tryxmldom.rex line 83 "attr~ownerElement = gpx"
tryxmldom.rex line 86 "attr~ownerElement = gpx"
tryxmldom.rex line 89 "attr~ownerElement = gpx"
tryxmldom.rex line 92 "attr~ownerElement = gpx"
tryxmldom.rex line 114 "attr~ownerElement = link"
tryxmldom.rex line 141 "attr~ownerElement = bounds"
tryxmldom.rex line 144 "attr~ownerElement = bounds"
tryxmldom.rex line 147 "attr~ownerElement = bounds"
tryxmldom.rex line 150 "attr~ownerElement = bounds"
tryxmldom.rex line 173 "attr~ownerElement = rtept"
tryxmldom.rex line 176 "attr~ownerElement = rtept"
tryxmldom.rex line 211 "attr~ownerElement = trkpt"
tryxmldom.rex line 214 "attr~ownerElement = trkpt"
xmlDOM.cls line 1016 "if arg~ownerElement<>.nil"
xmlDOM.cls line 1039 "if arg~ownerElement<>.nil"
xmlDOM.cls line 1948 "if newAttr~ownerElement<>self "
xmlDOM.cls line 1949 "raise user domException additional (.domException~inuse_attribute_err) description (newAttr~ownerElement)"
xmlDOM.cls line 2020 "if idAttr~ownerElement<>self "
xmlDOM.cls line 2816 "self~attrNode~ownerElement = self~nodeStack[1]"

xmlAttr::attribute schemaTypeInfo get

The type information associated with this attribute. While the type information contained in this attribute is
guarantee to be correct after loading the document or invoking the xmlDocument normalizeDocument method,
schemaTypeInfo may not be reliable if the node was moved.

Definition at line 1153 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 1180 "self~schemaTypeInfo = .nil"

xmlAttr::attribute schemaTypeInfo set
Definition at line 1154 of xmlDOM.cls

xmlAttr::attribute specified get

.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 the xmlDocument normalizeDocument method to guarantee this information is
up-to-date.

Definition at line 1162 of xmlDOM.cls
Dynamically referenced by
xmlDOM.cls line 1181 "self~specified = .false"

xmlAttr::attribute specified set
Definition at line 1163 of xmlDOM.cls

xmlAttr::method value

On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced
with their values. See also the method getAttribute on the xmlElement interface.

On setting, this creates a xmlText 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 xmlElement setAttribute
method.


Definition at line 1172 of xmlDOM.cls
Dynamically referenced by
tryxmldom.rex line 256 "attrValue = attrDir[i]~value"

xmlAttr::method init

xmlAttr instance creation method


Definition at line 1177 of xmlDOM.cls

Get RexxLiterate at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on 30 Jul 2015 13:56:51 for xmlDOM for OOrexx by rexxliterate  0.0.1