Skip to Content

HCI: XSLT get property value

Hi Team,

I'm working with HCI and I'm doing some XSLT programming.

However I want to get the params that are set in the properties of the HCI container, and set the value in a XML tag. Does anybody has an idea?

KR,

MAssarrar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 27, 2017 at 03:18 AM

    Hello Mohammed,

    You have to create a property with name Param1 and you can access the same like below

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hci="http://sap.com/it/" exclude-result-prefixes="hci">
    	<xsl:param name="Param1"/>
    	<xsl:output method="xml" encoding="UTF-8" indent="no" />
    	<xsl:template match="/">
    		<k>
    			<xsl:value-of select="$Param1"/>
    		</k>
    	</xsl:template>
    </xsl:stylesheet>
    

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • I have set a property in groovy script and want to access it in next XSLT mapping. It does not return me the expected result. Can u advise?

      <?xmlversion="1.0"encoding="UTF-8"?>

      <xsl:stylesheetversion="2.0"

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

      <xsl:paramname="payDate"/>

      <xsl:templatematch="queryCompoundEmployeeResponse">

      <xsl:copy>

      <xsl:copy-ofselect="CompoundEmployee[person/employment_information/paycompensation_non_recurring/pay_date >= '$payDate']"/>

      </xsl:copy>

      </xsl:template>

      </xsl:stylesheet>

  • Oct 27, 2017 at 07:23 AM

    Great Sriprasad Shivaram Bhat!! Thanks.

    Add comment
    10|10000 characters needed characters exceeded