xsl-list
[Top] [All Lists]

RE: A challenge.. Group Periods of Data (1..5, 2..8, 4..9) (10..12; 10..14)

2005-05-03 15:38:12

You mean you want the
stylesheet to detect a time at which no sessions are alive, 
and use that as
a boundary between periods? What if there is no such time? 

First element of period:  first element or first element where
period_begin does not fall within previous sibling period_begin and
period_end.

Last element of period:  last element match where period_begin falls
within previous sibling period_begin and period_end.

What if there are several?



This then sounds like a simple extension of Wendell's stylesheet, where
instead of the list of periods being supplied as a parameter, it is
constructed by a prescan of the data: the set of period boundaries is the
set of session endtimes that do not overlap any session, i.e.

//session/@endtime[every $s in //session satisfies ($s/@starttime <= . or
$s/@endtime >= .)]

(Sorry, I've forgotten what the actual element and attribute names were).

Someone who enjoys coding with one hand tied behind their back can no doubt
give you an XSLT 1.0 version of that...

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>