cancel
Showing results for 
Search instead for 
Did you mean: 

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

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

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

0 Kudos

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>

Answers (1)

Answers (1)

0 Kudos

Great Sriprasad Shivaram Bhat!! Thanks.