Jump to content
Sign in to follow this  
winkimjr2

How do I get the Status with the latest TimestampCreate and has Op?

Recommended Posts

I have revised my question.

I would like to get the Status whose TimstampCreate matches (or closely) ControlPoint Timestamp.

 

How do I do this with my xslt code?

 

My xml 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">

<Statuses>

<Status>

<Date>05/09/2016</Date>

<Type Word="DIS">Dismissed</Type>

<TimeStampCreate>05/09/2016 14:34:48:633</TimestampCreate>

</Status>

<Status Op="A">

<Date Op="A">05/09/2016</Date>

<Type Op="A" Word="SBJ">Signed</Type>

<TimestampCreate>05/09/2016 14:34:34:737</TimestampCreate>

</Status>

</Statuses>

</ProtectionOrder>

</Integration>

 

 

Expected Output something similar to this:

<Statuses>

<Status Op="A">

<Current>false</Current>

<Date Op="A">05/09/2016</Date>

<Type Op="A" Word="SBJ">Signed</Type>

<TimestampCreate>20160509143434</TimestampCreate>

</Status>

</Statuses>

 

 

I have a function to convert date time to numeric. Here is the function

<xsl:value-of select=mscef:formatDateTimeNumeric(mscef:fixOdysseyTimestamp(string(TimeStampCreate)))"/>

 

My xslt 1.0 code

 

<xsl:value-of select="/Integration/ProtectionOrder/Statuses/Status/Date"/>

Edited by winkimjr2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×