cancel
Showing results for 
Search instead for 
Did you mean: 

XSL Question: how to insert the value of a variable into XSl

Former Member
0 Kudos

Hi

i got a piece os XSL (XSL mapping program to PI 7.1) that gives me a few errors. I am a newbie to XSL so please accept my apologies beforehand.

I am trying to retrieve the FileName from the File SENDER adapter and map into a field in the XML, but it's always blank...

Please help

>----


XSL start

.....

.....

.....

<xsl:param name="inputparam"/>

<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />

<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />

<xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)" />

<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

(bla bla bla)

..

..

<IT_TRANSACTION xmlns="">

<xsl:for-each select="$var1_instance_FILPAYLOAD/ns0:MT_filePOSDM/record">

<xsl:variable name="var2_record" select="."/>

<item>

<RETAILSTOREID>

<xsl:value-of select="string($var2_record/tradeid)"/>

</RETAILSTOREID>

<TRANSNUMMER>

<xsl:copy-of select="$dynamic-value"/> <========!!!!!!!!!!!!

</TRANSNUMMER>

..

..

<----


XSL End

The field TRANSNUMMER should have the value assigned to variable "dynamic-value" - but it is always blank...

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi,

you refer the value of a variable with <xsl:value-of select="$variable_name"/>, not with copy-of

Regards,

Udo

Former Member
0 Kudos

Thx, Got it

Answers (0)