Skip to Content

assign XML to property variable in HCI

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 26 at 09:20 PM

    Are you trying to assign the CEE_ID value in the setProperty?

    ~Srini

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 27 at 07:28 PM

    Basically if I want to set the whole XML in property variable.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 27 at 11:13 PM

    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

    Add comment
    10|10000 characters needed characters exceeded