declare function xps_sftp:sendString($element as element(), $data as xs:string, $targetPath as xs:string) as xs:boolean external;
let $now := ddtek:format-dateTime(fn:current-dateTime(),'[Y0001][M01][D01][H01][m01][s01]') ,
$fileName := concat("S8000092.Order.",$now,'.edi')
return
xps_sftp:sendString($config,$ediData,$fileName)
This script works if I just have a pipeline where an EDIFACT file is used as input, but if I do transformations from XML to EDIFACT before applying this script nothing is placed on the ftp server and an error is thrown "No value has been bound to the external variable $edidata"
I need to apply a special name to the file, otherwise I would have just used the binding file option.
Can anyone tell me why edifact data can be parsed directly , but not as the result of an conversion?
I have attached the two pipelines, the working one and the faulty one.
Subject:Query and Sftp clent Author:Bruce Cantor Date:10 Aug 2021 06:43 AM
Here is the full pipeline flows including xslt scripts and archive outgoing port. In Stylus Studio it can be seen that there is output from the xslt script.
Subject:Query and Sftp clent Author:Ivan Pedruzzi Date:13 Aug 2021 04:24 AM Originally Posted: 13 Aug 2021 04:23 AM
This is may be a limitation is the Stylus Studio pipeline debugger.
However the all thing can be done with one query, see attached project, still keeping the XML to EDI mapping in a separate library module which can be re-used.
I converted your XSLT logic to XQuery which is far less verbose.
BTW watch out, you have the purchase order line date hard coded to 20210415.