Keith
I'm not sure that the modifiers like HEADING and the break handling in RetrieVe
make sense in the XML context anyway. I'd rather see a separate keyword if you
want to add a comment element.
Brian
-----Original Message-----
From: "Keith Johnson (DSLWN)"<[EMAIL PROTECTED]>
Sent: 08/05/08 00:27:15
To: "[email protected]"<[email protected]>
Subject: [U2] Universe XML is not to standard
The software I am supporting has a user screen which builds and saves
enquiry statements (English/Access/Recall). I recently created another
screen to allow users to use the defined statement/report to output XML
to the &HOLD& file and to transfer the results to their PC. All well
and good, but then I found that Excel wouldn't pick up the results
properly. The reason for this is that the XML output is not quite to
the standard. For example, the command
>LIST VOC 'VOC' F1 F2 TOXML
gives the result
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<VOC _ID = "VOC" F1 = "F" F2 = "VOC"/>
</ROOT>
------------------------------------------
While the command
>LIST VOC 'VOC' F1 F2 TOXML HEADING "WAHOO 'D'"
gives the result
------------------------------------------
WAHOO 08 May 2008
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<VOC _ID = "VOC" F1 = "F" F2 = "VOC"/>
</ROOT>
------------------------------------------
It's not absolutely clear from the W3C standard itself, but it is very
clear from the examples given with it; that the output must start with
the string "<?xml ". That is to say, although line feeds and spaces are
effectively ignored within XML, they are not catered for before the
"<?xml " string. And while the traditional Pick 'thing' is to
"make-it-work-if-possible", Excel follows the (arguably more standard)
convention of "holy-heck-that's-not-right-do-nothing"
What I had to put in place was an extra bit of code to read in the
output, delete any lines before the "<?xml " string, and re-write the
output (which, by the way, I'm unsure will work for very, very, very
large reports). That's not at all satisfactory in my opinion. I think
that the header lines should have been dropped completely, or put in
after the "<?xml " string as a comment something like this:
------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<-- report heading follows
WAHOO 08 May 2008
-->
<ROOT>
<VOC _ID = "VOC" F1 = "F" F2 = "VOC"/>
</ROOT>
------------------------------------------
Does anyone else agree with me? Ought IBM change this? What do you
think?
Regards, Keith
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/