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

Re: time and location condition checking

Subject: Re: time and location condition checking
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sat, 02 Nov 2002 13:24:55 +0100
location condition
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

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.