[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Select item from schedule based on date in XPath 1

Subject: Re: Select item from schedule based on date in XPath 1.0
From: "L2L 2L emanuelallen@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Jul 2014 14:59:52 -0000
Re:  Select item from schedule based on date in XPath 1
> On Jul 30, 2014, at 10:00 AM, "Philipp Kursawe phil.kursawe@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hello all,
>
> I have this XML
>
> <daily>
> <item startTime="2014-07-26T10:00:00.000Z">
> <item startTime="2014-07-26T11:00:00.000Z">
> <item startTime="2014-07-26T12:00:00.000Z">
> <item startTime="2014-07-26T13:00:00.000Z">
> </daily>
>
> I want to select the item for a specific time, ie for 11:15 it should select
the second item.
>
> I am using XPath 1.0 so for the date comparison itself I use this trick:
> number(translate(@startTime, "-T:.Z", ""))
> to get a number representation for the startTime attibute.
>
> My trouble is now with finding the next sibling to compare its startTime (in
my example the item that starts at 12:00) Basically my expression in pseudo
xpath would be
> item[@startTime >= time and next-sibling[@startTime < time]
>
> Thanks for any hints!
> Phil
> XSL-List info and archive
> EasyUnsubscribe (by email)

I don't know if this is a place for this type of querying.

E-S4L

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.