On Jul 30, 2014, at 10:00 AM, "Philipp Kursawe
phil(_dot_)kursawe(_at_)gmail(_dot_)com"
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--