declare namespace esb = "http://www.ferguson.com/esb"; declare option ddtek:serialize "omit-xml-declaration=no,indent=yes"; for $Order at $orderPos in doc('converter:file:///c:/eStorefront/storefront_send.conv?file:///c:/eStorefront/zzedi856_o.dat')/root/Order return ddtek:serialize-to-url( ENDRIES originator 2009-02-13T11:57:37Z 2009-02-13T11:57:37Z { $Order/EnterDT/text() } { $Order/Orderno/text() } { $Order/Customer/text() } { $Order/Name/text() } { $Order/Address/text() } { $Order/Address2/text() } { $Order/City/text() } { $Order/State/text() } { $Order/Country/text() } { $Order/Zip/text() } { $Order/ReqDate/text() } { for $component in $Order/field/component return { $component/po/text() } {if ($component/contact) then { $component/contact/text() } else () } {if ($component/prodnote1) then { $component/prodnote1/text() } else () } {if ($component/prodnote2) then { $component/prodnote2/text() } else () } {if ($component/email) then { $component/email/text() } else () } {if ($component/v-note1) then { $component/v-note1/text() } else () } {if ($component/v-note2) then { $component/v-note2/text() } else () } {if ($component/v-note3) then { $component/v-note3/text() } else () } {if ($component/v-note4) then { $component/v-note4/text() } else () } {if ($component/v-note5) then { $component/v-note5/text() } else () } {if ($component/v-note6) then { $component/v-note6/text() } else () } {if ($component/v-note7) then { $component/v-note7/text() } else () } {if ($component/v-note8) then { $component/v-note8/text() } else () } {if ($component/v-note9) then { $component/v-note9/text() } else () } {if ($component/v-note10) then { $component/v-note10/text() } else () } {if ($component/v-note11) then { $component/v-note11/text() } else () } {if ($component/v-note12) then { $component/v-note12/text() } else () } {if ($component/v-note13) then { $component/v-note13/text() } else () } {if ($component/v-note14) then { $component/v-note14/text() } else () } {if ($component/v-note15) then { $component/v-note15/text() } else () } {if ($component/v-note16) then { $component/v-note16/text() } else () } { $component/item/text() } { $component/des1/text() } { $component/qty/text() } { $component/price/text() } { $component/perqty/text() } { $component/subcomponent/text() } { $component/reqdate/text() } { $component/adn/text() } { $component/des1/text() } { $component/po_line/text() } } , concat("file:///C:/TMP/", fn:replace(string(current-dateTime()), ":", "-"),"_", $orderPos, ".xml"), "")(: Stylus Studio meta-information - (c) 2004-2008. Progress Software Corporation. All rights reserved. :)