Next: 8.4 Constraints
Up: 8. Principles of generation
Previous: 8.2 The COBOL copybook
Contents
Index
8.3 COBOL level
COBOL levels are not part of the XML file. They are
computed using the following rules :
- At each XML first child, level
starts at 01 or 02 according to the level01 parameter (see
sub-section
)
- The level of COBOL item increases :
- at each XML element
- at each XML content
- at each XML attribute
- The level of COBOL item decreases :
- at each XML empty element
- after each XML content
- after each XML closing tag,
- after each XML attribute.
For example, with the following XML file,
Figure:
an XML file with attributes and content
 |
XML2COB will generate the following COBOL copybook :
Figure:
Generated COBOL copybook
 |
As you can see, the COBOL item ADMINISTRATOR appears 2 times
:
- The first time as a grouping item, because the
XML element Administrator has attributes
- The second time as an elementary item at a
lower level than the grouping item,
because the XML element Administrator also has a content.
Next: 8.4 Constraints
Up: 8. Principles of generation
Previous: 8.2 The COBOL copybook
Contents
Index
sunuraxi@users.sourceforge.net