Re: [xsl] time and location condition checking

Subject: Re: [xsl] time and location condition checking
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sat, 02 Nov 2002 13:24:55 +0100
ssd xcxc wrote:
I have an XML set with the following format: -
<LOG>
       <LOCAL>
          <CHARACTER_ID> 13455 </CHARACTER_ID>
          <LOCATION_ID> 20709 </LOCATION_ID>
          <MESSAGE>still its a good idea.</MESSAGE>
      <TIME> 'Mon, 26 Nov 2001 17:08:58 +0000' </TIME>
     </LOCAL>
etc etc
</LOG>

I need to find the number of messages where there were
at least three unique character_id's in the same
location_id within say 10 seconds (either previously
or
afterwards) of each message.

I can use keys to capture the locations and
characters, but is it possible to test the TIME tag in
this way?

Keys wont help. You can try to group by LOCATION_ID and then sort by TIME, but the time format makes this difficult.

Time differences are best evaluated in a monotone running
counter, like UNIX seconds. ISO format timestamps are second
best, but imagine the computational overhead to check whether
2002-10-31T23:59:59 is within 10 seconds of 2002-11-01T00:00:01

If you can, get also rid of the whitespace around the LOCATION_ID
value.

J.Pietschmann


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread