I would like to get the Status whose TimestampCreate matches ControlPoint Timestamp.
I am not sure how to change my xslt to get matching Status TimestampCreate.
To compare Status TimestampCreate to ControlPoint TimeStamp I am using a fuction to convert these to numeric
Here is my function
Expected output
My xml doc
xslt 1.0 code
I am not sure how to change my xslt to get matching Status TimestampCreate.
To compare Status TimestampCreate to ControlPoint TimeStamp I am using a fuction to convert these to numeric
Here is my function
Code:
<xsl:value-of select="mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimeStampCreate)))"/>
Expected output
XML:
<Statuses>
<Status Op="A">
<Current>false</Current>
<Date Op="A">05/09/2016</Date>
<Type Op="A" Word="SBJO">Signed</Type>
<TimestampCreate>20160509143434737</TimestampCreate>
</Status>
</Statuses>
My xml doc
XML:
<?xml version="1.0" encoding="UTF-8"?>
<Integration>
<ControlPoint Timestamp="5/9/2016 2:34:34 PM" UserID="Kuku">SAVE</ControlPoint>
<ProtectionOrders>
<ProtectionOrder Op="E" InternalProtectionOrderID="11831">
<Statuses>
<Status>
<Current>true</Current>
<Active>No</Active>
<Date>05/09/2016</Date>
<Type Word="DISMISSED">Dismissed</Type>
<TimestampCreate Op="A">05/09/2016 14:34:48:633</TimestampCreate>
</Status>
<Status Op="A">
<Current>false</Current>
<Active>Yes</Active>
<Date Op="A">05/09/2016</Date>
<Type Op="A" Word="SBJO">Signed</Type>
<TimestampCreate>05/09/2016 14:34:34:737</TimestampCreate>
</Status>
<Status>
<Current>false</Current>
<Active>No</Active>
<Date>12/30/2014</Date>
<Type Word="DRAFT">Draft</Type>
<TimestampCreate>05/09/2016 14:34:14:987</TimestampCreate>
</Status>
</Statuses>
</ProtectionOrder>
</ProtectionOrders>
</Integration>
xslt 1.0 code
Code:
<xsl:value-of select="/Integration/ProtectionOrder/Statuses/Status/Date"/>