pdk.flow.xml.XmlAttr
contains functions to operate with XML Attr variables
Last updated
contains functions to operate with XML Attr variables
Last updated
objects inherit the structure, 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 Node attributes parentNode
, previousSibling
, and nextSibling
have a null
value for 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, nodes may not be immediate children of a . However, they can be associated with nodes contained within a . In short, users and implementors of the DOM need to be aware that nodes have some things in common with other objects inheriting the structure, 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 Node.nodeValue
attribute on the 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 , 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 node may be either or nodes.
The following table gives some examples of the relations between the attribute value in the original document (parsed attribute), the value as exposed in the DOM, and the serialization of the value:
Character reference
Built-in character entity
Literal newline between
Normalized newline between
Arguments:
Result:
Possible exceptions
Example:
XML Document
Arguments:
Result:
Possible exceptions
Example:
XML Document
Arguments:
Result:
Possible exceptions
Example:
XML Document
Arguments:
Result:
No variable is returned. The input attribute value has been changed
Possible exceptions
Example:
XML Document
Arguments:
Result:
Possible exceptions
Example:
XML Document
Arguments:
Result:
Possible exceptions
Arguments:
Result:
Possible exceptions
Returns the name of the input attribute. If result of function is different from null
, this attribute is a qualified name.
attribute ::
output ::
- throws if the input attribute is NULL
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 function to guarantee this information is up-to-date.
attribute ::
output ::
- throws if the input attribute is NULL
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 function .
attribute ::
output ::
- throws if the input attribute is NULL
Creates a 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 function . Some specialized implementations, such as some [] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.
attribute ::
newValue ::
- throws if the input attribute is NULL
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly
The node this attribute is attached to or null
if this attribute is not in us
attribute ::
output ::
- throws if the input attribute is NULL
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 function, schemaTypeInfo
may not be reliable if the node was moved.
attribute ::
output ::
- throws if the input attribute is NULL
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 method
attribute ::
output ::
- throws if the input attribute is NULL