Stylus Studio XML Editor

Table of contents

Appendices

C.3 Attr Node Mapping

Attr Node Mapping

Infoset to Attr Node[top]

Infoset to Attr Node

An attribute information item map to a Attr node. The attributes of the corresponding Attr node are constructed as follows:

13The table contains the mapping of an Infoset information item to a Node Attribute/Method Value
11Node.nodeName 11same as Attr.name
11Node.nodeValue 11same as Attr.value
11Node.nodeType 11Node.ATTRIBUTE_NODE
11Node.parentNode 11null
11Node.childNodes 11A NodeList containing one Text node whose text content is the same as Attr.value.
11Node.firstChild 11The Text node contained in Node.childNodes
11Node.lastChild 11The Text node contained in Node.childNodes
11Node.previousSibling 11null
11Node.nextSibling 11null
11Node.attributes 11null
11Node.ownerDocument 11The document information item
11Node.namespaceURI 11The [namespace name] property
11Node.prefix 11The [prefix] property
11Node.localName 11The [local name] property
11Node.baseURI 11null
11Node.textContent 11the value of Node.textContent of the Text child. same as Node.nodeValue (since this attribute node only contains one Text node)
11Attr.name 11If the [prefix] property has no value, this contains the [local name] property. Otherwise, this contains the concatenation of the [prefix] property, the colon ':' character, and the [local name] property.
11Attr.specified 11The [specified] property
11Attr.value 11The [normalized value] property
11Attr.ownerElement 11The [owner element] property
11Attr.schemaTypeInfo 11 A TypeInfo object whose TypeInfo.typeNamespace is "http://www.w3.org/TR/REC-xml" and TypeInfo.typeName is the [attribute type] property
11Attr.isId 11 if the [attribute type] property is ID, this method return true

Attr Node to Infoset[top]

Attr Node to Infoset

An Attr node maps to an attribute information item. Attr nodes with no namespace URI (Node.namespaceURI equals to null) cannot be represented using the Infoset. The properties of the corresponding attribute information item are constructed as follows:

13The table contains the mapping of a Node to the Infoset Property Value
11[namespace name] 11Node.namespaceURI
11[local name] 11Node.localName
11[prefix] 11Node.prefix
11[normalized value] 11Attr.value
11[specified] 11Attr.specified
11[attribute type] 11 Using the TypeInfo object referenced from Attr.schemaTypeInfo, the value of TypeInfo.typeName if TypeInfo.typeNamespace is "http://www.w3.org/TR/REC-xml".
11[references] 11 if the computed [attribute type] property is IDREF, IDREFS, ENTITY, ENTITIES, or NOTATION, the value of this property is an ordered list of the element, unparsed entity, or notation information items referred to in the attribute value, in the order that they appear there. The ordered list is computed using Node.ownerDocument.getElementById, Node.ownerDocument.doctype.entities, and Node.ownerDocument.doctype.notations.
11[owner element] 11Attr.ownerElement