Having an issue running it with Saxon at the moment
declare namespace xf = "http://tempuri.org/xqueryTest/XQueryTransformations/csv/";
declare function xf:csv($aPIMessage1 as element(APIMessage))
as xs:string {
concat(for $line in $aPIMessage1/AuthResponse
let $ct := concat($line/ClientTransactionReference, "," , $line/SystemReferenceNumber, ",", $line/ResponseInfo/ResponseCode , ",", $line/ResponseInfo/Result ,",", $line/ResponseInfo/Description , ",", $line/ApprovalInfo/ApprovalCode , ",", $line/ApprovalInfo/DateTime, " ")
return $ct)
};
declare variable $aPIMessage1 as element(APIMessage) external;
xf:csv($aPIMessage1)
No comments:
Post a Comment