next up previous contents index
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 :

For example, with the following XML file,

Figure: an XML file with attributes and content
\begin{figure}\par\par
\begin{list}{}{
\setlength{\rightmargin}{\leftmargin...
...\small\par
}
\end{list}
{\small <DatabaseInventory>}\end{list}\par
\end{figure}

XML2COB will generate the following COBOL copybook :

Figure: Generated COBOL copybook
\begin{figure}\par\par
\begin{list}{}{
\setlength{\rightmargin}{\leftmargin...
...06 ADMINISTRATOR PICTURE X(14).\end{list}
\end{list}
\end{list}\par
\end{figure}

As you can see, the COBOL item ADMINISTRATOR appears 2 times :

  1. The first time as a grouping item, because the XML element Administrator has attributes
  2. 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 up previous contents index
Next: 8.4 Constraints Up: 8. Principles of generation Previous: 8.2 The COBOL copybook   Contents   Index
sunuraxi@users.sourceforge.net