Requirement :
I have a requirement for data masking as we receive request data like 2.1, 32.2 and response should be in decimal (4.2) like 0002.10, 0032.20.
Solution :
We have masking function in XSLT But as per the above requirement we have function format-number ().
Syntax :
format-number ($RequestXpath, '0000.00' )
<processResponse>
<result>
<xsl:value-of select="format-number (/process/input, "0000.0" )"/>
</result>
</processResponse>
Request :
<process>
<input>2.1</input>
</process>
I have a requirement for data masking as we receive request data like 2.1, 32.2 and response should be in decimal (4.2) like 0002.10, 0032.20.
Solution :
We have masking function in XSLT But as per the above requirement we have function format-number ().
Syntax :
format-number ($RequestXpath, '0000.00' )
<processResponse>
<result>
<xsl:value-of select="format-number (/process/input, "0000.0" )"/>
</result>
</processResponse>
Request :
<process>
<input>2.1</input>
</process>
Response :
<processResponse>
<result>0002.10</result>
</processResponse>
Thanks!!
Nice one
ReplyDelete