on 03-22-2019 12:26 AM
Hi Guys,
I went through the blocks which tells how to assign property from XSLT in HCI.
However I want to know how can we do some transformation in XSLT and then assign that
output to the property variable in HCI.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:hci="http://sap.com/it/">
<xsl:param name="exchange"/>
<xsl:template match="/">
<Emp>
<xsl:for-each select="/Employees/Employee">
<EmpDetails>
<CEE_ID>
<xsl:value-of select="CEE_ID"/>
</CEE_ID>
</EmpDetails>
</xsl:for-each>
</Emp>
<xsl:value-of select="hci:setProperty($exchange, 'EMP', <HOW TO ADD XSLT OUTPUT HERE ???> />
</xsl:template>
</xsl:stylesheet>
Thanks
Yatan
Hi Yatanveer,
You need to declare a local variable first and pass the whole XML payload. Then just use this variable in the setProperty as below.
<xsl:variable name="xml_inp">
<xsl:copy-of select="."/>
</xsl:variable>
<xsl:value-ofselect="hci:setProperty($exchange, 'EMP', $xml_inp) />
Try it out.
~Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Basically if I want to set the whole XML in property variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you trying to assign the CEE_ID value in the setProperty?
~Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.