Hi.
This is regarding namespaces in XML Generate in IBM Enterprise COBOL V4.2.
I would like to be able to execute not one XML Generate to create a complete XML document in one go but instead execute a number of XML Generate and then "assemble" (by outputting each result) a XML result document "manually".
My problem here is that if I need to specify more than one XML namespace then I would like to do the XML declaration manually and be able to specify an arbitrary number of xmlns attributes, one maybe default and the others with namespace prefixes.
Then, when issuing the different XML Generate verbs, I would like to be able to just specify the NAMESPACE-PREFIX (with no NAMESPACE). In the COBOL 4.2 you need to specify the NAMESPACE to be able to specify the NAMESPACE-PREFIX but there is a possibility toe specify a null length or blank NAMESPACE. The sad thing about that is that, in that case, the entered NAMESPACE-PREFIX will not be honored so the resulting XML fragment will wind up in the default namespace.
Now, this may seem unimportant, but my actual goal is to only need to specify the namespaces in question in the XML declaration and not repeat them all over the place, This is due to the fact that I am not able (almost never) to do the XML Generate on a group but I do it directly on individual items in the input structure and, if I need to do the namespace definition an every XML element generated then the resulting XML document will be unnecessary large and also considering the fact that the one-time definition and referencing by means of namespace-prefix is a XML standard it is a little annoying that I don´t seem to be able to do this.
So, in conclusion:
- Does anybody have an idea on how to achieve this or
- Does V5.x or V6.y give any help
Thank you in advance for any thoughts or ideas towards resolving my problem.
Regards Lars
lbjerges