|
top
|
Subject: Automatic Error Detection and Quick-Fix Corrections Author: Ivan Pedruzzi Date: 04 Mar 2021 12:53 AM Originally Posted: 02 Mar 2021 08:01 PM
|
In addition you may want to read chapter "EDI Analysis Functions" in the DataDirect XQuery User's Guide located in your Stylus Studio installation here
c:\Program Files\
-Stylus Studio X16 XML Enterprise Suite 64-bit\
--Components\
---DataDirect XQuery\
----books\
-----ddxquery\
------ddxqug\
-------ddxqug.pdf
The following is an extract from the chapter
Notice that the EDI Analyzer API can create the acknowledge message automatically.
let $edi := "EDI:tbl=yes?file:///c:/EDI/code99.x12"
let $report := ddtek:analyze-edi-from-url($edi)
let $ack := $report/AnalyzeReport/Response/Acknowledgement/X12
let $receipt := $report/AnalyzeReport/Response/Receipt/X12
let $xml := ddtek:edi-to-xml-from-url($edi, $report)
return(
ddtek:serialize-to-url($report ,"file:///c:/EDI/code99.x12.report.xml", "")
,ddtek:serialize-to-url($xml ,"file:///c:/EDI/code99.x12.xml", "")
,ddtek:serialize-to-url($receipt,"file:///c:/EDI/code99.rec.x12","method=EDI"
)
,ddtek:serialize-to-url($ack ,"file:///c:/EDI/code99.ack.x12","method=EDI")
Ivan Pedruzzi
Stylus Studio Team
|
|
|