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

Unions and/or temporally related groups

Subject: Unions and/or temporally related groups
From: Tony Click <Tony.Click@xxxxxxxxx>
Date: Thu, 12 Jul 2001 16:30:53 -0400
hashmap two keys
I've searched the sites and haven't found an answer that solves my problem
and it may be that what I want to do cannot be done in XSL, but here's the
situation:

I have an xml document that has a tremendous amount of time ordered data.
The temporal order is essential to the report.  Additionally the data is
comming from multiple channels and there is a grouping based on the channels
being sent.  To make it even more complex there is also a grouping within a
channel as a channel's parameters change.  Here is some XML to help explain:

<time value="12:00:00">
	<data value="123" channel="1" parameterSet="1"/>
	<data value="123" channel="2" parameterSet="2"/>
</time>
<time value="12:15:00">
	<data value="234" channel="1" parameterSet="1"/>
	<data value="456" channel="2" parameterSet="2"/>
</time>
<time value="12:30:00">
	<data value="234" channel="1" parameterSet="3"/>
	<data value="456" channel="2" parameterSet="2"/>
</time>
<time value="12:45:00">
	<data value="234" channel="1" parameterSet="3"/>
	<data value="456" channel="2" parameterSet="4"/>
</time>
<time value="13:00:00">
	<data value="234" channel="1" parameterSet="3"/>
</time>

When generating html, I essentially need to create a 2 column table (rows by
time, columns are channels) and break the table every where the is a
discontinuity; where a discontinuity occurs between <time> elements when the
next time element does not contain the same number of data elements with the
same channel and parameterSet attribute values.  In the previous example
there is a discontinuity between 12:15 and 12:30 because the parameterSet of
channel 1 changed to 3.  There is a discontinutity between 12:30 and 12:45
because the parameterSet of channel 2 changed.  There is discontinuity
between 12:45 and 13:00 because there is no data for channel 1.

I have a solution to the problem which involves an <xsl:if> (I know, not
pretty!) and basically I want to do an intersection of the values of the
current time elements data elements channel attributes  (
$currentTime/data/@channel ) with the same attributes of the next time
element.  Unfortunatly it appears that despite the fact that the attributes
are named the same and even when their values are the same a union results
in four nodes.  So I suppose what I need to know how to do is how do I get
an intersection of nodes based on value not identity?

Also, I'm open to solving this problem other ways.  I've explored using
keys, but keys only allows basically grouping by one key where I need
grouping by two keys (channel and parameterSet).

I suppose there is one more constraint; I'm working with hundereds of
thousands of data elements and I need to be able to process them in seconds
not minutes.

Any ideas???

TIA

-Tony



 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.