Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Problem with xslt transformation

$
0
0

Yesterday I have tried to apply parameters (objects) to my xslt transformation. I wanted to call object instance from the program. According to the documentation, it is possible, but...

 

The documentation states, that I should create param in xslt like this:

 

<xsl:param name="..." type="..." />

 

where the type will has value object({name of global class}).

 

Snippets are as follows:

 

call transformation ZMYTRANSF parameters prop = let_prop  source xml istream result xml odocument .

------------------

 

<xsl:param name="prop" />

..........

<sap:external-function  class="ZMYCLASS" kind="instance" method="GET_VALUE" name="sdn:get_value">

    <sap:argument param="PROPE" type="string"/>

    <sap:result param="VALUE" type="string"/>

</sap:external-function>

 

...

 

   <xsl:value-of select="sdn:get_value($prop,'test')"/>

 

 

 

 

The thing is, that the xsl:param has no attribute like "TYPE" defined, and when I pass the param without the type, I cannot call the method in xslt successfully, I get runtime error XSLT_UNKNOWN_OBJECT. I was looking over the sdn for example of passing the class instance to the xslt transformation,  but without success. Am I doing something wrong?


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>