Information on Nodes

(1) Node types

There are three types of nodes in the XML tree. This section describes each of them.

a) Element node

Element nodes represent XML elements. Materialized elements (described later) are output. An element name of up to 255 bytes can be imported.

The "any" node icon cannot be mapped.

Figure 4.78 Element node icon (not materialized)

Figure 4.79 Element node icon (materialized)

Figure 4.80 "any" node icon

Figure 4.81 Element node icon (set as the starting point of repetition)

b) Attribute node

Attribute nodes represent XML attributes. Materialized elements are output. Attribute names of up to 255 bytes can be imported.

Figure 4.82 Attribute node icon (not materialized)

Figure 4.83 Attribute node icon (materialized)

c) Contents model node

Contents model nodes represent XML contents models. Contents models are not directly output, but materializing contents model nodes extends the range of elements. To materialize this node, some requirements must be met.

Figure 4.84 Contents model node icon (not materialized)

Figure 4.85 Contents model node icon (with "choice" materialized)

Figure 4.86 Contents model node icon (with "sequence" materialized)

Figure 4.87 Contents model node icon (with "all" materialized)

Figure 4.88 Contents model node icon (set as the starting point of repetition)

(2) Information contained in nodes

This section describes the information contained in nodes. There are two different types of element node, depending on whether an element node has child elements or not. This document defines element nodes with child elements as middle element nodes, and element nodes with no child elements as terminal element nodes. The term element nodes refers collectively to middle element nodes and terminal element nodes.

a) name

For an element node, this represents the name of the element. For an attribute node, this represents the name of the attribute. For a contents model node, this represents any one of the sequence, choice, and "all" values.

b) type

Middle element nodes and contents model nodes do not have this value. Terminal element node and attribute nodes have a character or numeric data.

c) minOccurs

For element nodes and contents model nodes only, the lowest value of the frequency of occurrence is displayed.

d) maxOccurs

For element nodes and contents model nodes only, the highest value of frequency of occurrence is displayed.

e) empty

Only terminal element nodes have this value. If any empty element is specified in the schema file, or if the type of a terminal element node cannot be identified when DataMagic imports the node, "empty" is set to true. Otherwise, "empty" is set to false. If "empty" is true, the element is always processed as character data.

Note

"empty" is only used for displaying the information, and DataMagic does not check empty elements. For example, if any value exists in a terminal element node where "empty" is true in the input side schema, that value is used for the input. Additionally, for a terminal element node where "empty" is true in the output side schema, the value is output as long as the element is mapped.

f) default

Middle element nodes and contents model nodes do not have this value. Terminal element nodes and attribute nodes have this value if the default value is specified in the schema file. Data up to the default value of 9999 bytes can be imported. This value is only used when the XML tree is on the input side. When the value corresponding to the mapped input terminal element node or attribute node does not occur in the input file, the default value is used as the input value if it exists in the schema file.

Note

For terminal element nodes, the default value applies only if the value contained in the terminal element node does not exist (i.e., the element is empty). For attribute nodes, the default value applies if no such attribute exists.