I have revised my question.
I would like to get the Status whose TimestampCreate matches the ControlPoint Timestamp.
My xml 1.0 code
Code:
<?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 By Judicial Officer</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>
I am not sure how to change my xslt code
I am using a function to convert date time to a number. I am not sure how then to compare the Status TimestampCreate to ControlPoint Timestamp and select the
Status TimestampCreate that matches
ControlPoint Timestamp.
xslt 1.0 code
Code:
<ProtectionOrderStatus>
<ProtectionOrderStatusDate>
<xsl:value-of select="mscef:formatDate(string(Statuses/Status/Date))"/>
</ProtectionOrderStatusDate>
</ProtectionOrderStatus>
Here is my function to convert Status TimestampCreate and ControlPoint Timestamp to numeric
Code:
<xsl:value-of select="mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimeStampCreate)))"/>