Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call Transformation With Parameter

Former Member
0 Likes
647

Hello,

is it possible to call a xslt program with a parameter which contains a xpath expression and use this in "xsl:value-of"-tag. I´ve testet it, but my transformation returns the string '//Child/@attribute' (see below) not the attribute value.

Is there such a thing to evaluate a expression in xsl or is it not possible?

For example:

call transformation (´xy´)

parameter expr = '//Child/@attribute'

source xml xml_source

result xml xml_result

xslt-program

<xsl:transform version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:sap="http://www.sap.com/sapxsl "

<xsl:strip-space elements="*"/>

<xsl:param name="EXPR" />

<xsl:template match="/">

<xsl:value-of select="$EXPR" />

</xsl:template>

</xsl:transform>

Kind Regards

Sebastian

Hello,

is it possible to call a xslt program with a parameter which contains a xpath expression and use this in "xsl:value-of"-tag. I´ve testet it, but my transformation returns the string '//Child/@attribute' (see below) not the attribute value.

Is there such a thing to evaluate a expression in xsl or is it not possible?

For example:

call transformation (´xy´)

parameter expr = '//Child/@attribute'

source xml xml_source

result xml xml_result

xslt-program

<xsl:transform version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:sap="http://www.sap.com/sapxsl "

<xsl:strip-space elements="*"/>

<xsl:param name="EXPR" />

<xsl:template match="/">

<xsl:value-of select="$EXPR" />

</xsl:template>

</xsl:transform>

Kind Regards

Sebastian

1 REPLY 1
Read only

Former Member
0 Likes
436

It´s not possible to evaluate the value of a variable or parameter which contains a xsl-statement on runtime.