Stylus Studio XML Editor

Table of contents

Appendices

C.2 Element Node Mapping

Element Node Mapping

Infoset to Element Node[top]

Infoset to Element Node

An element information item maps to a Element node. The attributes of the corresponding Element node are constructed as follows:

13The table contains the mapping of an Infoset information item to a Node Attribute Value
11Node.nodeName 11same as Element.tagName
11Node.nodeValue 11null
11Node.nodeType 11Node.ELEMENT_NODE
11Node.parentNode 11The [parent] property
11Node.childNodes 11A NodeList containing the information items in the [children] property
11Node.firstChild 11The first node contained in Node.childNodes
11Node.lastChild 11The last node contained in Node.childNodes
11Node.previousSibling 11The information item preceding the current one on the [children] property contained in the [parent] property
11Node.nextSibling 11The information item following the current one on the [children] property contained in the [parent] property
11Node.attributes 11The information items contained in the [attributes] and [namespace attributes] properties
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 11The [base URI] property
11Node.textContent 11Concatenation of the Node.textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children.
11Element.tagName 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.
11Element.schemaTypeInfo 11 A TypeInfo object whose TypeInfo.typeNamespace and TypeInfo.typeName are inferred from the schema in use if available.
NOTE: 

The [in-scope namespaces] property is not exposed through the Element node.

Element Node to Infoset[top]

Element Node to Infoset

An Element node maps to an element information item. Because the Infoset only represents unexpanded entity references, non-empty EntityReference nodes contained in Node.childNodes need to be replaced by their content. DOM applications could use the Document.normalizeDocument() method for that effect with the "entities" parameter set to false. The properties of the corresponding element 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[children] 11Node.childNodes, whose expanded entity references (EntityReference nodes with children) have been replaced with their content.
11[attributes] 11The nodes contained in Node.attributes, whose Node.namespaceURI value is different from "http://www.w3.org/2000/xmlns/"
11[namespace attributes] 11The nodes contained in Node.attributes, whose Node.namespaceURI value is "http://www.w3.org/2000/xmlns/"
11[in-scope namespaces] 11 The namespace information items computed using the [namespace attributes] properties of this node and its ancestors. If the [DOMXPath] module is supported, the namespace information items can also be computed from the XPathNamespace nodes.
11[base URI] 11Node.baseURI
11[parent] 11Node.parentNode