During Maximo integration there is need to transform XML from Maximo XML format to External System(eg Oracle) XML format. There we can use the XSL mapping in Maximo. Maximo converts the XML to destination XML format using XSL language and vice versa. During that time, if there is need to set the current date in the XSL format see the below code spinet.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:max="http://www.ibm.com/maximo"
xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
<xsl:template match="/">
<max:SyncRFQSResponse>
<max:RFQSet>
<max:RFQ action="AddChange">
<xsl:for-each select="max:RFQSyncResponse/max:RFQSet/max:RFQ">
<max:RFQNUM>
<xsl:value-of select="max:RFQNUM" />
</max:RFQNUM>
<max:SITEID>
<xsl:value-of select="max:SITEID" />
</max:SITEID>
<max:TEST_DATE>
<xsl:value-of select="java:format(java:java.text.SimpleDateFormat.new('yyyy-MM-dd HH:mm:ss'), java:java.util.Date.new())" />
</max:TEST_DATE>
</xsl:for-each>
</max:RFQ>
</max:RFQSSet>
</max:SyncRFQResponse>
</xsl:template>
</xsl:stylesheet>
No comments:
Post a Comment