We have a home grown XML generator tool, which
is controlled by something which we call "interface description".
This interface description can be derived from XML schema definitions
and is translated by a special translator to PL/1 or C include files
(containing structure definitions containing constants), which are then
given as parameters to the XML generator.

This way it is possible to define per field, if is is generated as a
XML tag or as a attribute.

It is also possible to have counter fields as part of the structure,
which are not written to the XML document, but control the number
of sub-structures contained in the document. For example, the structure
that leads to the XML document has an array with 50 elements, but only
the first 7 are filled with values; then you set the counter variable to 7, and
from the interface definition the XML generator knows where it has to take
the value from that controls the number of sub-structures etc. - and it only
writes 7 sub-tags to the XML dokument and ignores the remaining 43
array elements.

I strongly believe that without such a description that controls an XML generator,
it will be pretty useless. An XML generator which produces the XML documents
simply by looking at the structure definition of some programming language
(without additional control information) doesn't lead you very far.

Kind regards

Bernd



Am 10.04.2012 17:25, schrieb Frank Swarbrick:
Is it really that cool?  Rather a kludge.

Discovering it was a combination of figuring out what kind of fields could not be converted to 
attributes (fields with "occurrences"), and the fact that we have a vendor XML product 
that also uses the "occurs 1" kludge, but for a different reason.

(for what I am wanting here it seemed simpler to use Enterprise COBOL XML 
support; plus I wanted to try it out.)

Frank

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to