[xsl] Match nodes with a range of values

Subject: [xsl] Match nodes with a range of values
From: "Karl J. Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Jul 2004 08:04:05 -0700
Hello,

Thanks for the help David on previous topic "Finding similar/conflicting
nodes".
The EXACT conflict of beginning time worked great.  Now the task of looking
for a beginning time which falls between the beginning time and end time of
any node, a range.

So, @timebeg of this node falls between the timebeg and timeend of the next.
Also consider, the event @id must match.

<Event id="1" timebeg="1350" timeend="1500"/>

<Event id="1" timebeg="1100" timeend="1400"/>

In natural english:
"Select all nodes where current nodes timebeg falls between the timebeg and
timeend of all event 1's".



=== SAMPLE XML SOURCE ====
<SCHED>
	<Schedule>
    	<Day id="1">
			<Squad id="1">
    			<Event id="1" timebeg="900" timeend="1000"/>
    			<Event id="2" timebeg="1000" timeend="1100"/>
		    	<Event id="3" timebeg="1100" timeend="1200"/>
    			<Event id="4" timebeg="1200" timeend="1300"/>
	    	</Squad>
			<Squad id="2">
    			<Event id="4" timebeg="800" timeend="1050"/>
    			<Event id="2" timebeg="1050" timeend="1200"/>
		    	<Event id="3" timebeg="1200" timeend="1350"/>
    			<Event id="1" timebeg="1350" timeend="1500"/>
	    	</Squad>
        </Day>
        <Day id="2"/>
        <Day id="3"/>
        <Day id="4"/>
        <Day id="5"/>
        <Day id="6"/>
	</Schedule>
    <Squads>
    	<Squad timebeg="900" timeend="1300" id="1" group="1" name="Level
8,9,10" description="Girls Optionals Level 8,9,10"/>
    	<Squad timebeg="900" timeend="1500" id="2" group="2" name="Level 7"
description="Girls Optional Levels 7"/>
    </Squads>
    <Groups>
    	<Group id="1" name="CompTm" description="Girls Optional Team">
        	<Day id="1"/>
        	<Day id="3"/>
        </Group>
    	<Group id="2" name="OptTm" description="Girls Optional Team">
        	<Day id="1"/>
        	<Day id="3"/>
        </Group>
    </Groups>
    <Events>
    	<Event id="1" name="Bars" description="Women's Uneven Bars"
location="1"/>
    </Events>
    <locations>
    	<location id="1" map="C4" description="Girls Comp Bar Area"/>
    </locations>
    <Days>
    	<Day id="1">Monday</Day>
    	<Day id="2">Tuesday</Day>
    	<Day id="3">Wednesday</Day>
    	<Day id="4">Thursday</Day>
    	<Day id="5">Friday</Day>
    	<Day id="6">Saturday</Day>
    	<Day id="7">Sunday</Day>
    </Days>
</SCHED>

Current Thread