...
DFDL Infoset | Daffodil's JDOM XML Infoset | Scala scala.xml.Node Infoset |
---|---|---|
Document Information Item | JDOM Document | The document is represented by the root element. There is no separate document item. |
root | getRootElement() | none |
dfdlVersion | attribute daffodil:dfdlVersion on the root element. | none |
schema (reserved for future use) | (no implementation) | none |
unicodeByteOrderMark | attribute daf:unicodeByteOrderMark on the root element. | same attribute scheme as JDOM |
Element Information Item | JDOM Element | scala.xml.Elem |
namespace | getNamespace(): org.jdom.Namespace | def namespace: String |
name | getName(): String | def name: String |
document | getDocument() | none (see parent) |
datatype | attribute xsi:type with value one of the set of XML Schema simple type QNames that are in the DFDL Subset of XML Schema. For example: xsi:type='xs:string' By convention, the prefix 'xsi' and 'xs' denote here the usual standard namespace URIs. (NOTE: datatype is not yet implemented) | same attribute scheme as JDOM |
dataValue | For simple types other than xs:string, the cannonical XML representation of the value, as returned by getText(). However, for the value nil, the representation is an element with no value having the xsi:nil='true' attribute. For type xs:string, the DFDL Infoset allows representation of characters that are illegal in XML. These are represented by replacing them with characters in the Unicode Private Use Area by a scheme described below. | def text: String to obtain cannonical text. Nil representation is the same attribute scheme. Values containing XML-illegal characters use the same scheme. |
nilled | xsi:nil='true' attribute on element. Absence of this attribute implies 'false' | Same attribute xsi:nil |
children | getChildren() | def child: Node* |
parent | getParent() | none Scala XML nodes are immutable, and do not have parent references. This allows nodes to be shared. |
schema | A special attribute dafi:schemaComponentID has a value which can be used to retrieve the associated schema component. (Not yet implemented: means to create a standard Schema Component Designator or SCD) | Same attribute scheme |
valid | (Not yet implemented) | (not yet implemented) |
unionMemberSchema | (Not yet implemented) | (not yet implemented) |
"No Value" | A JDOM Element with no children, and with no dataValue is the representation of an element with "No Value". | A scala Elem with no children and no dataValue. |
Augmented Infoset | A JDOM Element with a special marker attribute: dafint:hidden='true' signifies that the element is part of the augmented infoset. This attribute is used to identify and filter out elements when the un-augmented infoset is needed. | Same attribute scheme, but on scala.xml.Elem element. |
...
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
#xD - treated specially
For illegal characters with values from #x00 to #x1F, these values are mapped to the PUA by adding #xE000 to their character code.
Character #xD (Carriage Return or CR) is also mapped to the PUA as #xE00D. The CR character is allowed in the textual representation of XML documents, but not in the XML Infoset. That is, it is read by XML processors, but CRLF is converted to just LF, and CR alone is converted to LF.
For illegal characters #xD800 to #xDFFF, these values are mapped to the PUA by adding #x1000 to their character code. So #xD800 maps to #xE800, and #xDFFF maps to #xEFFF.
...