|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xsl:stylesheet version="3.0"
|
|
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:err="http://www.w3.org/2005/xqt-errors"
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:fwkmapping="http://www.loreal.com/hip/fwk/mapping/FwkMapping"
|
|
xmlns:document="http://www.loreal.com/hip/fwk/mapping/Document"
|
|
xmlns:invocationContext="http://www.loreal.com/hip/fwk/mapping/InvocationContext"
|
|
xmlns:property="http://www.loreal.com/hip/fwk/common/Property"
|
|
xmlns:header="http://www.loreal.com/hip/fwk/mapping/Header" xmlns:csv="http://www.loreal.com/hip/fwk/xsl/csv"
|
|
xmlns:cf="http://www.loreal.com/hip/fwk/mapping/customfunctions"
|
|
xmlns:saxon="http://saxon.sf.net/" exclude-result-prefixes="csv fn xs xsl cf saxon">
|
|
|
|
<xsl:output method="xml" encoding="UTF-8" byte-order-mark="no"
|
|
indent="yes" />
|
|
|
|
|
|
<!-- [Document] -->
|
|
<xsl:param name="input-data-type" select="'json'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="input-data-csv-field-separator" select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="input-data-csv-line-separator" select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="output-data-type" select="'json'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="output-data-csv-field-separator" select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="output-data-csv-line-separator" select="''"
|
|
as="xs:string" />
|
|
|
|
|
|
<!-- [Transient] -->
|
|
<xsl:param name="input-transient-data-type" select="'nop'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="input-transient-data-csv-field-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="input-transient-data-csv-line-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="output-transient-data-type" select="'xml'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="output-transient-data-csv-field-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="output-transient-data-csv-line-separator"
|
|
select="''" as="xs:string" />
|
|
|
|
|
|
<!-- [InvocationRequest] -->
|
|
<xsl:param name="input-invocation-request-data-type" select="'nop'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="input-invocation-request-data-csv-field-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="input-invocation-request-data-csv-line-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="output-invocation-request-data-type" select="'xml'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="output-invocation-request-data-csv-field-separator"
|
|
select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="output-invocation-request-data-csv-line-separator"
|
|
select="''" as="xs:string" />
|
|
|
|
<!-- [InvocationResponse] -->
|
|
<xsl:param name="input-invocation-response-data-type" select="'xml'"
|
|
as="xs:string" /><!-- csv, json or xml -->
|
|
<xsl:param name="input-invocation-response-data-csv-field-separator"
|
|
select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="input-invocation-response-data-csv-line-separator"
|
|
select="''" as="xs:string" />
|
|
<xsl:param name="output-invocation-response-data-type"
|
|
select="'nop'" as="xs:string" /><!--
|
|
csv, json or xml -->
|
|
<xsl:param name="output-invocation-response-data-csv-field-separator"
|
|
select="''"
|
|
as="xs:string" />
|
|
<xsl:param name="output-invocation-response-data-csv-line-separator"
|
|
select="''"
|
|
as="xs:string" />
|
|
|
|
|
|
<!-- [Common] -->
|
|
<xsl:param name="input-csv-field-separator" select="';'"
|
|
as="xs:string" />
|
|
<xsl:param name="input-csv-line-separator" select="'\r\n?|\n\r?'"
|
|
as="xs:string" />
|
|
<xsl:param name="output-csv-field-separator" select="','"
|
|
as="xs:string" />
|
|
<xsl:param name="output-csv-line-separator" select="'
'"
|
|
as="xs:string" />
|
|
<xsl:param name="input-csv-quote" select="'"'" as="xs:string" />
|
|
<xsl:param name="output-csv-quote" select="'"'" as="xs:string" />
|
|
|
|
<!-- [MF] use-csv false -->
|
|
<xsl:use-package name="csv-xsl-package"
|
|
package-version="*">
|
|
<xsl:override>
|
|
<!-- Change the field separator here to use semicolon, comma, etc between -->
|
|
<!-- fields -->
|
|
<xsl:variable name="csv:field-separator" as="xs:string"
|
|
select="$input-csv-field-separator" visibility="public" />
|
|
<xsl:variable name="csv:line-separator" as="xs:string"
|
|
select="$input-csv-line-separator" visibility="public" />
|
|
<xsl:variable name="csv:quote" as="xs:string" select="$input-csv-quote"
|
|
visibility="public" />
|
|
</xsl:override>
|
|
</xsl:use-package>
|
|
|
|
<!-- [Template match="/" ] [Start] -->
|
|
<xsl:template match="/" priority="9">
|
|
<xsl:variable name="finalResultVar">
|
|
<xsl:call-template name="injectData">
|
|
<xsl:with-param name="headerVar"
|
|
select="fwkmapping:fwkMappingIn/fwkmapping:fwkMapping/fwkmapping:header" />
|
|
<xsl:with-param name="mappingDataVar"
|
|
select="fwkmapping:fwkMappingIn/fwkmapping:fwkMapping/fwkmapping:mappingData" />
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<!-- ADD Update Global Status -->
|
|
<xsl:variable name="updatedStatusVar">
|
|
<xsl:call-template name="updateStatus">
|
|
<xsl:with-param name="finalResultHeaderVar"
|
|
select="$finalResultVar/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:header" />
|
|
<xsl:with-param name="finalResultMappingDataVar"
|
|
select="$finalResultVar/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:mappingData" />
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<!-- Write Files -->
|
|
<xsl:call-template name="writeFiles">
|
|
<xsl:with-param name="finalUpdatedResult" select="$updatedStatusVar" />
|
|
</xsl:call-template>
|
|
</xsl:template>
|
|
<!-- [Template match="/" ] [End] -->
|
|
|
|
<!-- [Inject data] [Start] -->
|
|
<xsl:template name="injectData">
|
|
<xsl:param name="headerVar" />
|
|
<xsl:param name="mappingDataVar" />
|
|
<fwkmapping:fwkMappingOut>
|
|
<fwkmapping:fwkMapping>
|
|
<xsl:copy-of copy-namespaces="no" select="$headerVar" />
|
|
<xsl:for-each select="$mappingDataVar">
|
|
<!-- <xsl:try> -->
|
|
<!-- [File handling] [Start] -->
|
|
<!-- ###[Transient Data]### -->
|
|
<xsl:variable name="transient-data">
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:transient/document:filename)>0 and string-length(fwkmapping:transient/document:content/document:text)=0">
|
|
<xsl:copy-of
|
|
select="unparsed-text(concat('file:///',fwkmapping:transient/document:filename))" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of
|
|
select="fwkmapping:transient/document:content/document:text" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<!-- ###[Invocation Response]### -->
|
|
<xsl:variable name="InvocationResponse-data">
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:invocation/invocationContext:response/document:filename)>0 and string-length(fwkmapping:invocation/invocationContext:response/document:content/document:text)=0">
|
|
<xsl:copy-of
|
|
select="unparsed-text(concat('file:///',fwkmapping:invocation/invocationContext:response/document:filename))" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:content/document:text" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<!-- ###[Payload Data]### -->
|
|
<xsl:variable name="payload-data">
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:document/document:filename)>0 and string-length(fwkmapping:document/document:content/document:text)=0">
|
|
<xsl:copy-of
|
|
select="unparsed-text(concat('file:///',fwkmapping:document/document:filename))" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of
|
|
select="fwkmapping:document/document:content/document:text" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<!-- [File handling] [End] -->
|
|
|
|
|
|
<!-- Parse transient input -->
|
|
<xsl:variable name="transient">
|
|
<xsl:if test="string-length($transient-data)>0">
|
|
<xsl:choose>
|
|
<!-- [MF] use-csv false -->
|
|
<xsl:when test="$input-transient-data-type='csv'">
|
|
<xsl:copy-of
|
|
select="csv:parse($transient-data,$input-transient-data-csv-line-separator,$input-transient-data-csv-field-separator)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-transient-data-type='json'">
|
|
<xsl:copy-of select="fn:json-to-xml($transient-data)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-transient-data-type='xml'">
|
|
<xsl:copy-of select="parse-xml($transient-data)" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of select="$transient-data" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
</xsl:variable>
|
|
<!-- Parse Invocation Request -->
|
|
<xsl:variable name="invocation-Request">
|
|
<xsl:if
|
|
test="string-length(fwkmapping:invocation/invocationContext:request/document:content/document:text)>0">
|
|
<xsl:choose>
|
|
<!-- [MF] use-csv false -->
|
|
<xsl:when test="$input-invocation-request-data-type='csv'">
|
|
<xsl:copy-of
|
|
select="csv:parse(fwkmapping:invocation/invocationContext:request/document:content/document:text,$input-invocation-request-data-csv-line-separator,$input-invocation-request-data-csv-field-separator)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-invocation-request-data-type='json'">
|
|
<xsl:copy-of
|
|
select="fn:json-to-xml(fwkmapping:invocation/invocationContext:request/document:content/document:text)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-invocation-request-data-type='xml'">
|
|
<xsl:copy-of
|
|
select="parse-xml(fwkmapping:invocation/invocationContext:request/document:content/document:text)" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of
|
|
select="fwkmapping:invocation/invocationContext:request/document:content/document:text" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
</xsl:variable>
|
|
<!-- Parse Invocation Response -->
|
|
<xsl:variable name="invocation-Response">
|
|
<xsl:if test="string-length($InvocationResponse-data)>0">
|
|
<xsl:choose>
|
|
<!-- [MF] use-csv false -->
|
|
<xsl:when test="$input-invocation-response-data-type='csv'">
|
|
<xsl:copy-of
|
|
select="csv:parse($InvocationResponse-data,$input-invocation-response-data-csv-line-separator,$input-invocation-response-data-csv-field-separator)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-invocation-response-data-type='json'">
|
|
<xsl:copy-of select="fn:json-to-xml($InvocationResponse-data)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-invocation-response-data-type='xml'">
|
|
<xsl:copy-of select="parse-xml($InvocationResponse-data)" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of select="$InvocationResponse-data" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
</xsl:variable>
|
|
<!-- Parse Document input -->
|
|
<xsl:variable name="data">
|
|
<xsl:if test="string-length($payload-data)>0">
|
|
<xsl:choose>
|
|
<!-- [MF] use-csv false -->
|
|
<xsl:when test="$input-data-type='csv'">
|
|
<xsl:copy-of
|
|
select="csv:parse($payload-data,$input-data-csv-line-separator,$input-data-csv-field-separator)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-data-type='json'">
|
|
<xsl:copy-of select="fn:json-to-xml($payload-data)" />
|
|
</xsl:when>
|
|
<xsl:when test="$input-data-type='xml'">
|
|
<xsl:copy-of select="parse-xml($payload-data)" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of select="$payload-data" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<!-- [call-template name="mapWrapper"] -->
|
|
<xsl:variable name="resultVar">
|
|
<xsl:call-template name="mapWrapper">
|
|
<xsl:with-param name="wrapperHeaderVar" select="$headerVar" />
|
|
<!-- Add New -->
|
|
<xsl:with-param name="wrapperobjectTypeVar"
|
|
select="$mappingDataVar/fwkmapping:objectType" />
|
|
<xsl:with-param name="wrapperfileNameVar"
|
|
select="$mappingDataVar/fwkmapping:fileName" />
|
|
<xsl:with-param name="wrapperFunctionalKeysVar"
|
|
select="$mappingDataVar/fwkmapping:functionalKeys" />
|
|
<!-- Add New -->
|
|
<xsl:with-param name="wrapperParametersVar"
|
|
select="$mappingDataVar/fwkmapping:parameters" />
|
|
<xsl:with-param name="wrapperTransientVar" select="$transient" />
|
|
<xsl:with-param name="wrapperTransientFileVar"
|
|
select="fwkmapping:transient/document:filename" />
|
|
<xsl:with-param name="wrapperInvocationReqVar"
|
|
select="$invocation-Request" />
|
|
<xsl:with-param name="wrapperInvocationRespVar"
|
|
select="$invocation-Response" />
|
|
<xsl:with-param name="wrapperInvocationRespFileVar"
|
|
select="fwkmapping:invocation/invocationContext:response/document:filename" />
|
|
<xsl:with-param name="wrapperDataVar" select="$data" />
|
|
<xsl:with-param name="wrapperDataFileVar"
|
|
select="fwkmapping:document/document:filename" />
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="finalResultVar">
|
|
<!-- Invokes business map -->
|
|
<xsl:apply-templates select="$resultVar" mode="tibco" />
|
|
</xsl:variable>
|
|
|
|
<xsl:for-each
|
|
select="$finalResultVar/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:mappingData">
|
|
<fwkmapping:mappingData>
|
|
<fwkmapping:status>
|
|
<xsl:value-of select="'OK'" />
|
|
</fwkmapping:status>
|
|
|
|
<!-- Add New -->
|
|
<fwkmapping:objectType>
|
|
<xsl:value-of select="fwkmapping:objectType" />
|
|
</fwkmapping:objectType>
|
|
<fwkmapping:fileName>
|
|
<xsl:value-of select="fwkmapping:fileName" />
|
|
</fwkmapping:fileName>
|
|
|
|
|
|
<!-- [FunctionalKeys](Start] -->
|
|
<fwkmapping:functionalKeys>
|
|
<xsl:for-each
|
|
select="fwkmapping:functionalKeys/fwkmapping:functionalKey">
|
|
<fwkmapping:functionalKey>
|
|
<property:name>
|
|
<xsl:value-of select="property:name" />
|
|
</property:name>
|
|
<property:value>
|
|
<xsl:value-of select="property:value" />
|
|
</property:value>
|
|
</fwkmapping:functionalKey>
|
|
</xsl:for-each>
|
|
</fwkmapping:functionalKeys>
|
|
|
|
<!-- [FunctionalKeys](End] -->
|
|
|
|
|
|
<!-- Add New -->
|
|
|
|
<!-- [Parameters](Start] -->
|
|
<fwkmapping:parameters>
|
|
<xsl:for-each select="fwkmapping:parameters/fwkmapping:parameter">
|
|
<fwkmapping:parameter>
|
|
<property:name>
|
|
<xsl:value-of select="property:name" />
|
|
</property:name>
|
|
<property:value>
|
|
<xsl:value-of select="property:value" />
|
|
</property:value>
|
|
</fwkmapping:parameter>
|
|
</xsl:for-each>
|
|
</fwkmapping:parameters>
|
|
|
|
<!-- [Parameters](End] -->
|
|
|
|
<!-- [Transient][Start] -->
|
|
<xsl:if test="fwkmapping:transient">
|
|
<fwkmapping:transient>
|
|
<document:content>
|
|
<xsl:choose>
|
|
<xsl:when test="$output-transient-data-type='csv'">
|
|
<document:text>
|
|
<xsl:apply-templates
|
|
select="fwkmapping:transient/document:content/document:xml/*"
|
|
mode="csv-render-new">
|
|
<xsl:with-param name="output-csv-line-separator"
|
|
select="output-transient-data-csv-line-separator" />
|
|
<xsl:with-param name="output-csv-field-separator"
|
|
select="output-transient-data-csv-field-separator" />
|
|
</xsl:apply-templates>
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-transient-data-type='json'">
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fn:xml-to-json(fwkmapping:transient/document:content/document:xml/*, map{'number-formatter': function($x){$x}})" />
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-transient-data-type='xml'">
|
|
<document:text>
|
|
<!-- Remove Extra namespaces -->
|
|
<xsl:variable name="xml_var">
|
|
<xsl:copy-of
|
|
select="fwkmapping:transient/document:content/document:xml/*"
|
|
copy-namespaces="no" />
|
|
</xsl:variable>
|
|
<xsl:copy-of select="serialize($xml_var)"
|
|
copy-namespaces="no" />
|
|
<!-- Remove Extra namespaces -->
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fwkmapping:transient/document:content/document:xml/*" />
|
|
</document:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of select="fwkmapping:transient/document:filename" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of select="fwkmapping:transient/document:size" />
|
|
</document:size>
|
|
</fwkmapping:transient>
|
|
</xsl:if>
|
|
<!-- [Transient][End] -->
|
|
|
|
<!-- [Invocation][Start] -->
|
|
<xsl:if test="fwkmapping:invocation">
|
|
<fwkmapping:invocation>
|
|
<xsl:if test="fwkmapping:invocation/invocationContext:request">
|
|
<invocationContext:request>
|
|
<document:content>
|
|
<xsl:choose>
|
|
<xsl:when test="$output-invocation-request-data-type='csv'">
|
|
<document:text>
|
|
<xsl:apply-templates
|
|
select="fwkmapping:invocation/invocationContext:request/document:content/document:xml/*"
|
|
mode="csv-render-new">
|
|
<xsl:with-param name="output-csv-line-separator"
|
|
select="output-invocation-request-data-csv-line-separator" />
|
|
<xsl:with-param name="output-csv-field-separator"
|
|
select="output-invocation-request-data-csv-field-separator" />
|
|
</xsl:apply-templates>
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-invocation-request-data-type='json'">
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fn:xml-to-json(fwkmapping:invocation/invocationContext:request/document:content/document:xml/*, map{'number-formatter': function($x){$x}})" />
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-invocation-request-data-type='xml'">
|
|
<document:text>
|
|
<!-- Remove Extra namespaces -->
|
|
<xsl:variable name="xml_var">
|
|
<xsl:copy-of
|
|
select="fwkmapping:invocation/invocationContext:request/document:content/document:xml/*"
|
|
copy-namespaces="no" />
|
|
</xsl:variable>
|
|
<xsl:copy-of select="serialize($xml_var)"
|
|
copy-namespaces="no" />
|
|
<!-- Remove Extra namespaces -->
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:request/document:content/document:xml/*" />
|
|
</document:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:request/document:filename" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:request/document:size" />
|
|
</document:size>
|
|
</invocationContext:request>
|
|
</xsl:if>
|
|
<xsl:if test="fwkmapping:invocation/invocationContext:response">
|
|
<invocationContext:response>
|
|
<document:content>
|
|
<xsl:choose>
|
|
<xsl:when test="$output-invocation-response-data-type='csv'">
|
|
<document:text>
|
|
<xsl:apply-templates
|
|
select="fwkmapping:invocation/invocationContext:response/document:content/document:xml/*"
|
|
mode="csv-render-new">
|
|
<xsl:with-param name="output-csv-line-separator"
|
|
select="output-invocation-response-data-csv-line-separator" />
|
|
<xsl:with-param name="output-csv-field-separator"
|
|
select="output-invocation-response-data-csv-field-separator" />
|
|
</xsl:apply-templates>
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-invocation-response-data-type='json'">
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fn:xml-to-json(fwkmapping:invocation/invocationContext:response/document:content/document:xml/*, map{'number-formatter': function($x){$x}})" />
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:when test="$output-invocation-response-data-type='xml'">
|
|
<document:text>
|
|
<!-- Remove Extra namespaces -->
|
|
<xsl:variable name="xml_var">
|
|
<xsl:copy-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:content/document:xml/*"
|
|
copy-namespaces="no" />
|
|
</xsl:variable>
|
|
<xsl:copy-of select="serialize($xml_var)"
|
|
copy-namespaces="no" />
|
|
<!-- Remove Extra namespaces -->
|
|
</document:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<document:text>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:content/document:xml/*" />
|
|
</document:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:filename" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:size" />
|
|
</document:size>
|
|
</invocationContext:response>
|
|
</xsl:if>
|
|
</fwkmapping:invocation>
|
|
</xsl:if>
|
|
<!-- [Invocation][End] -->
|
|
|
|
<!-- Build output -->
|
|
<xsl:variable name="output-content">
|
|
<xsl:choose>
|
|
<xsl:when test="$output-data-type='csv'">
|
|
<xsl:apply-templates
|
|
select="fwkmapping:document/document:content/document:xml/*"
|
|
mode="csv-render-new">
|
|
<xsl:with-param name="output-csv-line-separator"
|
|
select="$output-data-csv-line-separator" />
|
|
<xsl:with-param name="output-csv-field-separator"
|
|
select="$output-data-csv-field-separator" />
|
|
</xsl:apply-templates>
|
|
</xsl:when>
|
|
<xsl:when test="$output-data-type='json'">
|
|
<xsl:value-of
|
|
select="fn:xml-to-json(fwkmapping:document/document:content/document:xml/*, map{'number-formatter': function($x){$x}})" />
|
|
</xsl:when>
|
|
<xsl:when test="$output-data-type='xml'">
|
|
<!-- Remove Extra namespaces -->
|
|
<xsl:variable name="xml_var">
|
|
<xsl:copy-of
|
|
select="fwkmapping:document/document:content/document:xml/*"
|
|
copy-namespaces="no" />
|
|
</xsl:variable>
|
|
<xsl:copy-of select="serialize($xml_var)"
|
|
copy-namespaces="no" />
|
|
<!-- Remove Extra namespaces -->
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of
|
|
select="fwkmapping:document/document:content/document:xml/*" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
|
|
<!-- [Document][Start] -->
|
|
<fwkmapping:document>
|
|
<document:content>
|
|
<document:text>
|
|
<xsl:value-of select="$output-content" />
|
|
</document:text>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of select="fwkmapping:document/document:filename" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of select="xs:int(string-length($output-content))" />
|
|
</document:size>
|
|
</fwkmapping:document>
|
|
<!-- [Document][End] -->
|
|
</fwkmapping:mappingData>
|
|
</xsl:for-each>
|
|
<!-- <xsl:catch> -->
|
|
<!-- <fwkmapping:mappingData> -->
|
|
<!-- <fwkmapping:status> -->
|
|
<!-- <xsl:value-of select="'KO'" /> -->
|
|
<!-- </fwkmapping:status> -->
|
|
<!-- <fwkmapping:error> -->
|
|
<!-- <fwkmapping:code> -->
|
|
<!-- <xsl:value-of select="$err:code" /> -->
|
|
<!-- </fwkmapping:code> -->
|
|
<!-- <fwkmapping:level> -->
|
|
<!-- <xsl:value-of select="'ERROR'" /> -->
|
|
<!-- </fwkmapping:level> -->
|
|
<!-- <fwkmapping:message> -->
|
|
<!-- <xsl:value-of select="'Error on parsing content'" /> -->
|
|
<!-- </fwkmapping:message> -->
|
|
<!-- <fwkmapping:cause> -->
|
|
<!-- <xsl:value-of select="$err:description" /> -->
|
|
<!-- </fwkmapping:cause> -->
|
|
<!-- </fwkmapping:error> -->
|
|
<!-- <fwkmapping:document> -->
|
|
<!-- <document:content> -->
|
|
<!-- <document:text> -->
|
|
<!-- <xsl:value-of -->
|
|
<!-- select="fwkmapping:document/document:content/document:text" /> -->
|
|
<!-- </document:text> -->
|
|
<!-- </document:content> -->
|
|
<!-- <document:size> -->
|
|
<!-- <xsl:value-of select="xs:int(fwkmapping:document/document:size)"
|
|
/> -->
|
|
<!-- </document:size> -->
|
|
<!-- </fwkmapping:document> -->
|
|
<!-- </fwkmapping:mappingData> -->
|
|
<!-- </xsl:catch> -->
|
|
<!-- </xsl:try> -->
|
|
</xsl:for-each>
|
|
</fwkmapping:fwkMapping>
|
|
</fwkmapping:fwkMappingOut>
|
|
</xsl:template>
|
|
<!-- [Inject data] [End] -->
|
|
|
|
|
|
<!-- [Update Global Status] [Start] -->
|
|
<xsl:template name="updateStatus">
|
|
<xsl:param name="finalResultHeaderVar" />
|
|
<xsl:param name="finalResultMappingDataVar" />
|
|
<fwkmapping:fwkMappingOut>
|
|
<fwkmapping:fwkMapping>
|
|
<fwkmapping:header>
|
|
<header:mapName>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:mapName" />
|
|
</header:mapName>
|
|
<header:instanceId>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:instanceId" />
|
|
</header:instanceId>
|
|
<header:project>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:project" />
|
|
</header:project>
|
|
<header:exchange>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:exchange" />
|
|
</header:exchange>
|
|
<header:halfFlow>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:halfFlow" />
|
|
</header:halfFlow>
|
|
<header:process>
|
|
<xsl:value-of select="$finalResultHeaderVar/header:process" />
|
|
</header:process>
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="exists($finalResultMappingDataVar[fwkmapping:status='KO'])">
|
|
<header:status>
|
|
<xsl:value-of select="'KO'" />
|
|
</header:status>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<header:status>
|
|
<xsl:value-of select="'OK'" />
|
|
</header:status>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</fwkmapping:header>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="$finalResultMappingDataVar" />
|
|
</fwkmapping:fwkMapping>
|
|
</fwkmapping:fwkMappingOut>
|
|
</xsl:template>
|
|
<!-- [Update Global Status] [End] -->
|
|
|
|
<!-- [mapWrapper][Start] -->
|
|
<xsl:template name="mapWrapper">
|
|
<xsl:param name="wrapperHeaderVar" />
|
|
<!-- Add New -->
|
|
<xsl:param name="wrapperobjectTypeVar" />
|
|
<xsl:param name="wrapperfileNameVar" />
|
|
<xsl:param name="wrapperFunctionalKeysVar" />
|
|
<!-- Add New -->
|
|
<xsl:param name="wrapperParametersVar" />
|
|
<xsl:param name="wrapperTransientVar" />
|
|
<xsl:param name="wrapperTransientFileVar" />
|
|
<xsl:param name="wrapperInvocationReqVar" />
|
|
<xsl:param name="wrapperInvocationRespVar" />
|
|
<xsl:param name="wrapperInvocationRespFileVar" />
|
|
<xsl:param name="wrapperDataVar" />
|
|
<xsl:param name="wrapperDataFileVar" />
|
|
<!-- [Add fwkMappingIn] -->
|
|
<fwkmapping:fwkMappingIn>
|
|
<!-- [Add fwkMappingIn] -->
|
|
<fwkmapping:fwkMapping>
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperHeaderVar" />
|
|
<fwkmapping:mappingData>
|
|
|
|
<!-- Add New -->
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperobjectTypeVar" />
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperfileNameVar" />
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="$wrapperFunctionalKeysVar" />
|
|
<!-- Add New -->
|
|
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperParametersVar" />
|
|
<!-- Transient -->
|
|
<fwkmapping:transient>
|
|
<document:content>
|
|
<document:xml>
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperTransientVar" />
|
|
</document:xml>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of select="$wrapperTransientFileVar" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of select="xs:int(string-length($wrapperTransientVar))" />
|
|
</document:size>
|
|
</fwkmapping:transient>
|
|
<!-- Invocation -->
|
|
<fwkmapping:invocation>
|
|
<invocationContext:request>
|
|
<document:content>
|
|
<document:xml>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="$wrapperInvocationReqVar" />
|
|
</document:xml>
|
|
</document:content>
|
|
<document:size>
|
|
<xsl:value-of select="xs:int(string-length($wrapperInvocationReqVar))" />
|
|
</document:size>
|
|
</invocationContext:request>
|
|
|
|
<invocationContext:response>
|
|
<document:content>
|
|
<document:xml>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="$wrapperInvocationRespVar" />
|
|
</document:xml>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of select="$wrapperInvocationRespFileVar" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of select="xs:int(string-length($wrapperInvocationRespVar))" />
|
|
</document:size>
|
|
</invocationContext:response>
|
|
</fwkmapping:invocation>
|
|
|
|
<!-- Document -->
|
|
<fwkmapping:document>
|
|
<document:content>
|
|
<document:xml>
|
|
<xsl:copy-of copy-namespaces="no" select="$wrapperDataVar" />
|
|
</document:xml>
|
|
</document:content>
|
|
<document:filename>
|
|
<xsl:value-of select="$wrapperDataFileVar" />
|
|
</document:filename>
|
|
<document:size>
|
|
<xsl:value-of select="xs:int(string-length($wrapperDataVar))" />
|
|
</document:size>
|
|
</fwkmapping:document>
|
|
</fwkmapping:mappingData>
|
|
</fwkmapping:fwkMapping>
|
|
<!-- [Add fwkMappingIn] -->
|
|
<fwkmapping:output-data-type>
|
|
<xsl:value-of select="$output-data-type" />
|
|
</fwkmapping:output-data-type>
|
|
</fwkmapping:fwkMappingIn>
|
|
<!-- [Add fwkMappingIn] -->
|
|
</xsl:template>
|
|
<!-- [mapWrapper][End] -->
|
|
|
|
<!-- [CSV Render][Start] -->
|
|
<!-- [csv-render] -->
|
|
<xsl:template match="csv" mode="csv-render">
|
|
<xsl:param name="output-csv-line-separator" />
|
|
<xsl:param name="output-csv-field-separator" />
|
|
<xsl:for-each select="row">
|
|
<xsl:for-each select="field">
|
|
<xsl:choose>
|
|
<xsl:when test="position() = last()">
|
|
<xsl:value-of
|
|
select="if(@quoted = 'yes') then concat($output-csv-quote, . , $output-csv-quote) else ." />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of
|
|
select="concat(if(@quoted = 'yes') then concat($output-csv-quote, . , $output-csv-quote) else ., $output-csv-field-separator)" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
<!--more efficient, but cannot use variable as separator and cannot customize
|
|
rendering -->
|
|
<!--<xsl:value-of select="field" separator=";" /> -->
|
|
<xsl:value-of select="$output-csv-line-separator" />
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<!-- [csv-render-new] -->
|
|
<xsl:template match="csv" mode="csv-render-new">
|
|
<xsl:param name="output-csv-line-separator" />
|
|
<xsl:param name="output-csv-field-separator" />
|
|
<xsl:for-each select="row">
|
|
<xsl:for-each select="field">
|
|
<xsl:choose>
|
|
<xsl:when test="position() = last()">
|
|
<xsl:value-of
|
|
select="if(@quoted = 'yes') then concat($output-csv-quote, . , $output-csv-quote) else ." />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of
|
|
select="concat(if(@quoted = 'yes') then concat($output-csv-quote, . , $output-csv-quote) else ., $output-csv-field-separator)" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:for-each>
|
|
<!--more efficient, but cannot use variable as separator and cannot customize
|
|
rendering -->
|
|
<!--<xsl:value-of select="field" separator=";" /> -->
|
|
<xsl:value-of select="$output-csv-line-separator" />
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
<!-- [CSV Render][End] -->
|
|
|
|
<!-- [Write Files] [Start] -->
|
|
<xsl:template name="writeFiles">
|
|
<xsl:param name="finalUpdatedResult" />
|
|
<fwkmapping:fwkMappingOut>
|
|
<fwkmapping:fwkMapping>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="$finalUpdatedResult/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:header" />
|
|
<xsl:for-each
|
|
select="$finalUpdatedResult/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:mappingData">
|
|
|
|
<!-- Get base uri [Start] -->
|
|
|
|
<xsl:variable name="transient-base-path">
|
|
<xsl:value-of
|
|
select="substring-before(fwkmapping:transient/document:filename,concat('/',fn:tokenize(fwkmapping:transient/document:filename,'/')[last()]))" />
|
|
</xsl:variable>
|
|
<xsl:variable name="invocation-base-path">
|
|
<xsl:value-of
|
|
select="substring-before(fwkmapping:invocation/invocationContext:response/document:filename,concat('/',fn:tokenize(fwkmapping:invocation/invocationContext:response/document:filename,'/')[last()]))" />
|
|
</xsl:variable>
|
|
<xsl:variable name="document-base-path">
|
|
<xsl:value-of
|
|
select="substring-before(fwkmapping:document/document:filename,concat('/',fn:tokenize(fwkmapping:document/document:filename,'/')[last()]))" />
|
|
</xsl:variable>
|
|
|
|
<xsl:message>
|
|
<xsl:copy-of
|
|
select="concat('######## transient-base-path #########', $transient-base-path)" />
|
|
</xsl:message>
|
|
<xsl:message>
|
|
<xsl:copy-of
|
|
select="concat('######## invocation-base-path #########', $invocation-base-path)" />
|
|
</xsl:message>
|
|
|
|
<xsl:message>
|
|
<xsl:copy-of
|
|
select="concat('######## document-base-path #########', $document-base-path)" />
|
|
</xsl:message>
|
|
|
|
<!-- Get base url [End] -->
|
|
|
|
<fwkmapping:mappingData>
|
|
<fwkmapping:status>
|
|
<xsl:value-of select="'OK'" />
|
|
</fwkmapping:status>
|
|
|
|
<!-- Add New -->
|
|
<xsl:copy-of copy-namespaces="no" select="fwkmapping:objectType" />
|
|
<xsl:copy-of copy-namespaces="no" select="fwkmapping:fileName" />
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:functionalKeys" />
|
|
<!-- Add New -->
|
|
|
|
<xsl:copy-of copy-namespaces="no" select="fwkmapping:parameters" />
|
|
|
|
<!-- [Transient] [Start] -->
|
|
<xsl:if test="fwkmapping:transient">
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:transient/document:filename)>0">
|
|
<fwkmapping:transient>
|
|
<!-- [ Data File handling ] [Start] -->
|
|
<xsl:variable name="dataFilePath">
|
|
<xsl:value-of
|
|
select="concat($transient-base-path,'/',$finalUpdatedResult/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:header/header:instanceId,'_',fn:generate-id(.),fn:seconds-from-dateTime(fn:current-dateTime()),'_transient_out')" />
|
|
</xsl:variable>
|
|
|
|
<xsl:result-document href="{concat('file:///',$dataFilePath)}"
|
|
method="text">
|
|
<xsl:value-of
|
|
select="fwkmapping:transient/document:content/document:text" />
|
|
</xsl:result-document>
|
|
|
|
<document:filename>
|
|
<xsl:value-of select="$dataFilePath" />
|
|
</document:filename>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:transient/document:size" />
|
|
<!-- [ Data File handling ] [End] -->
|
|
</fwkmapping:transient>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of copy-namespaces="no" select="fwkmapping:transient" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
<!-- [Transient] [End] -->
|
|
|
|
<!-- [Invocation][Start] -->
|
|
<xsl:if test="fwkmapping:invocation">
|
|
<fwkmapping:invocation>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:invocation/invocationContext:request" />
|
|
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:invocation/invocationContext:response/document:filename)>0">
|
|
<invocationContext:response>
|
|
<!-- [ Data File handling ] [Start] -->
|
|
<xsl:variable name="dataFilePath">
|
|
<xsl:value-of
|
|
select="concat($invocation-base-path,'/',$finalUpdatedResult/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:header/header:instanceId,'_',fn:generate-id(.),fn:seconds-from-dateTime(fn:current-dateTime()),'_InvocationResponse_out')" />
|
|
</xsl:variable>
|
|
|
|
<xsl:result-document href="{concat('file:///',$dataFilePath)}"
|
|
method="text">
|
|
<xsl:value-of
|
|
select="fwkmapping:invocation/invocationContext:response/document:content/document:text" />
|
|
</xsl:result-document>
|
|
|
|
<document:filename>
|
|
<xsl:value-of select="$dataFilePath" />
|
|
</document:filename>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:invocation/invocationContext:response/document:size" />
|
|
<!-- [ Data File handling ] [End] -->
|
|
</invocationContext:response>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:invocation/invocationContext:response" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
|
|
</fwkmapping:invocation>
|
|
</xsl:if>
|
|
<!-- [Invocation][End] -->
|
|
|
|
<!-- [Document] [Start] -->
|
|
<xsl:choose>
|
|
<xsl:when
|
|
test="string-length(fwkmapping:document/document:filename)>0">
|
|
<fwkmapping:document>
|
|
<!-- [ Data File handling ] [Start] -->
|
|
<xsl:variable name="dataFilePath">
|
|
<xsl:value-of
|
|
select="concat($document-base-path,'/',$finalUpdatedResult/fwkmapping:fwkMappingOut/fwkmapping:fwkMapping/fwkmapping:header/header:instanceId,'_',fn:generate-id(.),fn:seconds-from-dateTime(fn:current-dateTime()),'_content_out')" />
|
|
</xsl:variable>
|
|
|
|
<xsl:result-document href="{concat('file:///',$dataFilePath)}"
|
|
method="text">
|
|
<xsl:value-of
|
|
select="fwkmapping:document/document:content/document:text" />
|
|
</xsl:result-document>
|
|
|
|
<document:filename>
|
|
<xsl:value-of select="$dataFilePath" />
|
|
</document:filename>
|
|
<xsl:copy-of copy-namespaces="no"
|
|
select="fwkmapping:document/document:size" />
|
|
<!-- [ Data File handling ] [End] -->
|
|
</fwkmapping:document>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of copy-namespaces="no" select="fwkmapping:document" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
<!-- [Document] [End] -->
|
|
</fwkmapping:mappingData>
|
|
</xsl:for-each>
|
|
</fwkmapping:fwkMapping>
|
|
</fwkmapping:fwkMappingOut>
|
|
</xsl:template>
|
|
<!-- [Write Files] [End] -->
|
|
|
|
<!--[TIBCO_TEMPLATE] -->
|
|
|
|
<xsl:template name="Mapper-input" match="/" mode="tibco" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tns="http://www.loreal.com/hip/fwk/mapping/FwkMapping" xmlns:ns="http://www.loreal.com/hip/fwk/mapping/Document" xmlns:tns2="http://www.example.org/MappingWrapper" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://www.loreal.com/hip/fwk/mapping/InvocationContext" xmlns:ns1="http://www.w3.org/2005/xpath-functions" xmlns:ns7="http://www.loreal.com/hip/fwk/common/Property" xmlns:tns5="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns8="http://ws.alfaprojekt.com/" xmlns:tns4="http://www.loreal.com/hip/fwk/config/GetTranscodificationDetailsComponentOut" xmlns:tns3="http://www.loreal.com/hip/fwk/config/TranscodificationDetails" >
|
|
<!-- TIBCO parameters are converted to variables -->
|
|
<xsl:variable name="Start" select="tns:fwkMappingIn" />
|
|
<xsl:variable name="ParseCSV" select="$Start/tns:fwkMapping/tns:mappingData/tns:document/ns:content/ns:xml/*" />
|
|
<xsl:variable name="ParseXML" select="$Start/tns:fwkMapping/tns:mappingData/tns:document/ns:content/ns:xml/*" />
|
|
<xsl:variable name="ParseJSON" select="$Start/tns:fwkMapping/tns:mappingData/tns:document/ns:content/ns:xml/*" />
|
|
<xsl:variable name="ParseInvocationResponseXML" select="$Start/tns:fwkMapping/tns:mappingData/tns:invocation/ns2:response/ns:content/ns:xml/*" />
|
|
<!-- TIBCO map -->
|
|
<tns:fwkMappingOut>
|
|
<tns:fwkMapping>
|
|
<xsl:copy-of select="$Start/tns:fwkMapping/tns:header"/>
|
|
<tns:mappingData>
|
|
<!--/!\ The functional keys must be mapped /!\-->
|
|
<!--/!\ The parameters must be mapped /!\-->
|
|
<tns:functionalKeys>
|
|
<xsl:copy-of select="$Start/tns:fwkMapping/tns:mappingData/tns:functionalKeys/tns:functionalKey"/>
|
|
<tns:functionalKey>
|
|
<ns7:name>
|
|
<xsl:value-of select=""Routing""/>
|
|
</ns7:name>
|
|
<ns7:value>
|
|
<xsl:value-of select=""EMEA_SOE_FEDEXPL_SHIPMENT_02_ESB""/>
|
|
</ns7:value>
|
|
</tns:functionalKey>
|
|
</tns:functionalKeys>
|
|
<tns:parameters>
|
|
<xsl:copy-of select="$Start/tns:fwkMapping/tns:mappingData/tns:parameters/tns:parameter"/>
|
|
<tns:parameter>
|
|
<ns7:name>
|
|
<xsl:value-of select=""http_header_request_CountryCode""/>
|
|
</ns7:name>
|
|
<ns7:value>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="CountryCode"]"/>
|
|
</ns7:value>
|
|
</tns:parameter>
|
|
</tns:parameters>
|
|
<tns:transient>
|
|
<ns:content>
|
|
<ns:xml>
|
|
<xsl:copy-of select="$ParseInvocationResponseXML"/>
|
|
</ns:xml>
|
|
</ns:content>
|
|
<ns:size>
|
|
<xsl:value-of select="xsd:int(string-length(string($ParseInvocationResponseXML)))"/>
|
|
</ns:size>
|
|
</tns:transient>
|
|
<tns:invocation>
|
|
<ns2:request>
|
|
<ns:content>
|
|
<ns:xml>
|
|
<tns5:Envelope>
|
|
<tns5:Body>
|
|
<ns8:zapiszListV2>
|
|
<xsl:if test="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND/CARRIER"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3),"/Fedex") and tns3:targetFieldName="ACCESSCODE"]/tns3:targetFieldValue">
|
|
<accessCode>
|
|
<xsl:value-of select="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND/CARRIER"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3),"/Fedex") and tns3:targetFieldName="ACCESSCODE"]/tns3:targetFieldValue"/>
|
|
</accessCode>
|
|
</xsl:if>
|
|
<shipmentV2>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]
/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"]">
|
|
<nrExt>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]
/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"]"/>
|
|
</nrExt>
|
|
</xsl:if>
|
|
<paymentForm>
|
|
<xsl:value-of select=""P""/>
|
|
</paymentForm>
|
|
<shipmentType>
|
|
<xsl:value-of select=""K""/>
|
|
</shipmentType>
|
|
<payerType>
|
|
<xsl:value-of select=""1""/>
|
|
</payerType>
|
|
<remarks>
|
|
<xsl:value-of select=""""/>
|
|
</remarks>
|
|
<sender>
|
|
<xsl:if test="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND/CARRIER"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3),"/Fedex") and tns3:targetFieldName="SENDERID"]/tns3:targetFieldValue">
|
|
<senderId>
|
|
<xsl:value-of select="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND/CARRIER"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3),"/Fedex") and tns3:targetFieldName="SENDERID"]/tns3:targetFieldValue"/>
|
|
</senderId>
|
|
</xsl:if>
|
|
<contactDetails>
|
|
<phoneNo>
|
|
<xsl:value-of select=""""/>
|
|
</phoneNo>
|
|
<email>
|
|
<xsl:value-of select=""""/>
|
|
</email>
|
|
</contactDetails>
|
|
</sender>
|
|
<receiver>
|
|
<addressDetails>
|
|
<isCompany>
|
|
<xsl:value-of select=""0""/>
|
|
</isCompany>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine1"]">
|
|
<name>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine1"]"/>
|
|
</name>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine2"]">
|
|
<surname>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine2"]"/>
|
|
</surname>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="City"]">
|
|
<city>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="City"]"/>
|
|
</city>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="PostalCode1"]">
|
|
<postalCode>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="PostalCode1"]"/>
|
|
</postalCode>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="CountryCode"]">
|
|
<countryCode>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="CountryCode"]"/>
|
|
</countryCode>
|
|
</xsl:if>
|
|
<street>
|
|
<xsl:value-of select="concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="Street1"],$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="Street2"],$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="Street3"])"/>
|
|
</street>
|
|
<homeNo>
|
|
<xsl:value-of select="".""/>
|
|
</homeNo>
|
|
</addressDetails>
|
|
<contactDetails>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine1"]">
|
|
<name>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine1"]"/>
|
|
</name>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine2"]">
|
|
<surname>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="NameOrAddressLine2"]"/>
|
|
</surname>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="PhoneNumber1"]">
|
|
<phoneNo>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="PhoneNumber1"]"/>
|
|
</phoneNo>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="eMail"]">
|
|
<email>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CN"]/ns1:string[@key="eMail"]"/>
|
|
</email>
|
|
</xsl:if>
|
|
</contactDetails>
|
|
</receiver>
|
|
<proofOfDispatch>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CZ"]/ns1:string[@key="NameOrAddressLine1"]">
|
|
<senderSignature>
|
|
<xsl:value-of select="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[ns1:string[@key="PartnerFunction"]="CZ"]/ns1:string[@key="NameOrAddressLine1"]"/>
|
|
</senderSignature>
|
|
</xsl:if>
|
|
<courierId>
|
|
<xsl:value-of select=""0""/>
|
|
</courierId>
|
|
<sendDate>
|
|
<xsl:value-of select="concat(format-date(current-date(), "[Y0001]-[M01]-[D01]")," 08:45")"/>
|
|
</sendDate>
|
|
</proofOfDispatch>
|
|
<cod>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:string[@key="CashOnDeliveryPaymenttype"] = "COD"">
|
|
<codType>
|
|
<xsl:value-of select=""B""/>
|
|
</codType>
|
|
</xsl:if>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:string[@key="CashOnDeliveryPaymenttype"] = "COD"">
|
|
<codValue>
|
|
<xsl:value-of select="string($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:number[@key="CashOnDeliveryAmount"])"/>
|
|
</codValue>
|
|
</xsl:if>
|
|
<xsl:choose>
|
|
<xsl:when test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:string[@key="CashOnDeliveryPaymenttype"] = "COD"">
|
|
<xsl:if test="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3)) and tns3:targetFieldName="BANKACCOUNTNUMBER"]/tns3:targetFieldValue">
|
|
<bankAccountNumber>
|
|
<xsl:value-of select="$ParseInvocationResponseXML/tns4:transcodificationDetails[
tns3:senderSystem="SOE" 
and tns3:targetSystem="HIP"
and tns3:interfaceId='COMMON' 
and tns3:sourceFieldName = "COUNTRYCODE/BRAND"
and tns3:sourceFieldValue = concat($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="CentralAddressSegmentGroup"]/ns1:map[2]/ns1:string[@key="CountryCode"]
,'/',substring($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:string[@key="ExternalIdentification1"], 1, 3)) and tns3:targetFieldName="BANKACCOUNTNUMBER"]/tns3:targetFieldValue"/>
|
|
</bankAccountNumber>
|
|
</xsl:if>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<bankAccountNumber>
|
|
<xsl:value-of select=""""/>
|
|
</bankAccountNumber>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</cod>
|
|
<xsl:if test="$ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:string[@key="CashOnDeliveryPaymenttype"] = "COD"">
|
|
<insurance>
|
|
<insuranceValue>
|
|
<xsl:value-of select="string($ParseJSON/ns1:array[@key="GBOShipment"]/ns1:map/ns1:map[@key="Shipment"]/ns1:map[@key="ShipmentHeader"]/ns1:array[@key="DeliveryHeader"]/ns1:map/ns1:number[@key="CashOnDeliveryAmount"])"/>
|
|
</insuranceValue>
|
|
<contentDescription>
|
|
<xsl:value-of select=""Cosmetics""/>
|
|
</contentDescription>
|
|
</insurance>
|
|
</xsl:if>
|
|
<additionalServices>
|
|
<service>
|
|
<serviceId>
|
|
<xsl:value-of select=""PRE""/>
|
|
</serviceId>
|
|
</service>
|
|
<service>
|
|
<serviceId>
|
|
<xsl:value-of select=""SMS""/>
|
|
</serviceId>
|
|
<serviceArguments>
|
|
<serviceArgument>
|
|
<code>
|
|
<xsl:value-of select=""VALUE""/>
|
|
</code>
|
|
<argValue>
|
|
<xsl:value-of select=""2""/>
|
|
</argValue>
|
|
</serviceArgument>
|
|
</serviceArguments>
|
|
</service>
|
|
<service>
|
|
<serviceId>
|
|
<xsl:value-of select=""EMAIL""/>
|
|
</serviceId>
|
|
<serviceArguments>
|
|
<serviceArgument>
|
|
<code>
|
|
<xsl:value-of select=""VALUE""/>
|
|
</code>
|
|
<argValue>
|
|
<xsl:value-of select=""2""/>
|
|
</argValue>
|
|
</serviceArgument>
|
|
</serviceArguments>
|
|
</service>
|
|
</additionalServices>
|
|
<parcels>
|
|
<parcel>
|
|
<type>
|
|
<xsl:value-of select=""PC""/>
|
|
</type>
|
|
<weight>
|
|
<xsl:value-of select=""1""/>
|
|
</weight>
|
|
<shape>
|
|
<xsl:value-of select=""0""/>
|
|
</shape>
|
|
</parcel>
|
|
</parcels>
|
|
</shipmentV2>
|
|
</ns8:zapiszListV2>
|
|
</tns5:Body>
|
|
</tns5:Envelope>
|
|
</ns:xml>
|
|
</ns:content>
|
|
<ns:size>
|
|
<xsl:value-of select="xsd:int(string-length(string($ParseJSON)))"/>
|
|
</ns:size>
|
|
</ns2:request>
|
|
</tns:invocation>
|
|
<tns:document>
|
|
<ns:content>
|
|
<ns:xml>
|
|
<!--Add a type substitution for your schema.-->
|
|
<!--Depending on your data input (csv, json or xml), pick from the right activity-->
|
|
<xsl:choose>
|
|
<xsl:when test="$Start/tns:output-data-type = 'csv'">
|
|
<xsl:copy-of select="$ParseCSV"/>
|
|
</xsl:when>
|
|
<xsl:when test="$Start/tns:output-data-type = 'json'">
|
|
<xsl:copy-of select="$ParseJSON"/>
|
|
</xsl:when>
|
|
<xsl:when test="$Start/tns:output-data-type = 'xml'">
|
|
<xsl:copy-of select="$ParseXML"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:copy-of select="$Start/tns:fwkMapping/tns:mappingData/tns:document/ns:content/ns:xml/*"/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</ns:xml>
|
|
</ns:content>
|
|
<ns:size>
|
|
<xsl:value-of select="0"/>
|
|
</ns:size>
|
|
</tns:document>
|
|
</tns:mappingData>
|
|
</tns:fwkMapping>
|
|
</tns:fwkMappingOut>
|
|
</xsl:template>
|
|
|
|
|
|
</xsl:stylesheet>
|