import module namespace example = "http://www.datadirect.com/xquery/examples" at "acord_verbs.xquery";
declare namespace tx="http://ACORD.org/Standards/Life/2";
(:
This example converts an x12 message to xml using the converters.
Then it extracts person and address information from it and wraps
it up in a tx:Party object.
Finally that party is wrapped in a fake TXLifeRequest that is used
to add that person to the database.
:)
let $request:= doc("converter:EDI:long=yes?C:/Dev/XQuery/ACORD Web/100.x12")
let $person := example:x12-to-party($request, "Party_1")
return
example:insert-186 (
{
{
$person
}
}
)
(: Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
:)