on 04-11-2012 9:05 AM
hi experts,
i am using xslt mapping
in that my requirentment is to paas the value of each value to java function and print the returning value of java function.
my source xml is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:CRMTalismaCommonPropertyRequest xmlns:ns0="urn:testing.com">
<Header>
<Name>abc</Name>
<Name>xyz</Name>
<Name>pqr</Name>
</Header>
</ns0:CRMTalismaCommonPropertyRequest>
i am using <xsl:for each> tag but it is printing the value abc xyz pqr
i need to pass this value to java function .
xslt code is..
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:Number="java:Number" exclude-result-prefixes="Number">
<xsl:template match="Header">
<value>
<xsl:for-each>
<xsl:variable name="temp">
<xsl:value-of select="Name"/>
</xsl:variable>
<xsl:value-of select="Number:hashmap($temp))"/>
</xsl:for-each>
</value>
</xsl:template>
</xsl:stylesheet>
help me regradnig this.
thanks and regards
anup banerjee
Hi,
Find and example in SAP Help here: http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
It deals with input parameters for Java functions, namespaces configuration etc.
Also, you can find many useful links about calling Java function from XSLT in this thread:
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you just try it? I believe calling the Java function for each value will be done automatically by the mapping engine, since you put this execution inside an <xsl:for-each> block - it should work as if you executed a function module inside a loop. Is your experience different here?
Regards,
Greg
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.