clementsmc
MIS
Here is my original XML Control file Map:
<root Delimiter="" Type="FLAT">
<Rows StartWith="ship" EndWith="" ignore="">
<fileid>@fileid@</fileid>
<custcode>XXXX</custcode>
<reportedbyorg>XXXX</reportedbyorg>
<reporteddate date="yyyyMMddhhmm">X</reporteddate>
<tagfield1 position="5" length="25">@flattext@</tagfield1>
<reportedatfacility position="87" length="30" database="lookup!value!section+subsection+key">XXXX+XXXX+@flattext@</reportedatfacility>
<reportedatother position="117" length="30">@flattext@</reportedatother>
<note>From 214</note>
<isoformat>M</isoformat>
<Event>
<eventdate position="34" length="19">@flattext@</eventdate>
<eventcode position="30" length="2" database="lookup!value!section+subsection+key">XXXX+XXXX+@flattext@</eventcode>
</Event>
</Rows>
</root>
What I'm trying to accomplish is: Copy the original file into the output XML file as well as when <eventcode> equals a specific value, insert two addtional <Event> nodes (with all inclusive children) into the output XML file.
Relatively new to XML/XSL. I have searched far and wide and can find only examples that apply to HTML output not XML.
Any and all suggestions would be most appreciated.
Thanks,
Mary
<root Delimiter="" Type="FLAT">
<Rows StartWith="ship" EndWith="" ignore="">
<fileid>@fileid@</fileid>
<custcode>XXXX</custcode>
<reportedbyorg>XXXX</reportedbyorg>
<reporteddate date="yyyyMMddhhmm">X</reporteddate>
<tagfield1 position="5" length="25">@flattext@</tagfield1>
<reportedatfacility position="87" length="30" database="lookup!value!section+subsection+key">XXXX+XXXX+@flattext@</reportedatfacility>
<reportedatother position="117" length="30">@flattext@</reportedatother>
<note>From 214</note>
<isoformat>M</isoformat>
<Event>
<eventdate position="34" length="19">@flattext@</eventdate>
<eventcode position="30" length="2" database="lookup!value!section+subsection+key">XXXX+XXXX+@flattext@</eventcode>
</Event>
</Rows>
</root>
What I'm trying to accomplish is: Copy the original file into the output XML file as well as when <eventcode> equals a specific value, insert two addtional <Event> nodes (with all inclusive children) into the output XML file.
Relatively new to XML/XSL. I have searched far and wide and can find only examples that apply to HTML output not XML.
Any and all suggestions would be most appreciated.
Thanks,
Mary