Stylus Studio XML Editor

Table of contents

Appendices

C.1 Document Node Mapping

Document Node Mapping

Infoset to Document Node[top]

Infoset to Document Node

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

13The table contains the mapping of an Infoset information item to a Node Attribute Value
11Node.nodeName 11"#document"
11Node.nodeValue 11null
11Node.nodeType 11Node.DOCUMENT_NODE
11Node.parentNode 11null
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 11null
11Node.nextSibling 11null
11Node.attributes 11null
11Node.ownerDocument 11null
11Node.namespaceURI 11null
11Node.prefix 11null
11Node.localName 11null
11Node.baseURI 11same as Document.documentURI
11Node.textContent 11null
11Document.doctype 11The document type information item
11Document.implementation 11The DOMImplementation object used to create this node
11Document.documentElement 11The [document element] property
11Document.inputEncoding 11The [character encoding scheme] property
11Document.xmlEncoding 11null
11Document.xmlStandalone 11The [standalone] property, or false if the latter has no value.
11Document.xmlVersion 11The [version] property, or "1.0" if the latter has no value.
11Document.strictErrorChecking 11true
11Document.documentURI 11The [base URI] property
11Document.domConfig 11A DOMConfiguration object whose parameters are set to their default values

The [notations], [unparsed entities] properties are being exposed in the DocumentType node.

NOTE: 

The [all declarations processed] property is not exposed through the Document node.

Document Node to Infoset[top]

Document Node to Infoset

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

13The table contains the mapping of a Node to the Infoset Property Value
11[children] 11Node.childNodes
11[document element] 11Document.documentElement
11[notations] 11Document.doctype.notations
11[unparsed entities] 11The information items from Document.doctype.entities, whose Node.childNodes is an empty list
11[base URI] 11Document.documentURI
11[character encoding scheme] 11Document.inputEncoding
11[standalone] 11Document.xmlStandalone
11[version] 11Document.xmlVersion
11[all declarations processed] 11The value is implementation dependent