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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...