lrr81765
asked on
XSL Pass node-set to template
WinXP, MSXML 4/.NET.
The basic goal is to pass a node set to a template (see below)
<?xml version="1.0" encoding="utf-8" ?>
<flights>
<flight number="101" line="AQ" time="2004-05-17T11:12:00" type="A">
<values field="gate">B12</values>
</flight>
<flight number="102" line="AQ" time="2004-05-17T12:12:00" type="D">
<values field="gate">B12</values>
</flight>
<flight number="103" line="AQ" time="2004-05-17T13:12:00" type="A">
<values field="gate">B12</values>
</flight>
<flight number="104" line="AQ" time="2004-05-17T14:12:00" type="D">
<values field="gate">B12</values>
</flight>
</flights>
-------------------------- ---------- ---------- ---------- ---------- ---------- ----------
Within 1 hour from now: (select only top 1 arrival/departure (type=A/D)where gate='B12')
If there are NO Arriving/Departing
display "No Flights"
If Only Arriving
Display "Flight (line + number) is Arriving..."
If Departing & Arriving
Display "Flight (line + number) is Departing ..Flight (line + number) is Arriving"
========================== ========== ========== ========== ====
What I'd like to do is use a departure template with an arrival node-set as a parameter.
Then when processing the departure node, use a template for the arrival processing. I *think* the msxsl:node-set function is what I need, but can't find the right answer on the web.
I have simplified both the XML and logic. There is a lot more going on in the
data selection and the presentation logic, but this should do.
The basic goal is to pass a node set to a template (see below)
<?xml version="1.0" encoding="utf-8" ?>
<flights>
<flight number="101" line="AQ" time="2004-05-17T11:12:00"
<values field="gate">B12</values>
</flight>
<flight number="102" line="AQ" time="2004-05-17T12:12:00"
<values field="gate">B12</values>
</flight>
<flight number="103" line="AQ" time="2004-05-17T13:12:00"
<values field="gate">B12</values>
</flight>
<flight number="104" line="AQ" time="2004-05-17T14:12:00"
<values field="gate">B12</values>
</flight>
</flights>
--------------------------
Within 1 hour from now: (select only top 1 arrival/departure (type=A/D)where gate='B12')
If there are NO Arriving/Departing
display "No Flights"
If Only Arriving
Display "Flight (line + number) is Arriving..."
If Departing & Arriving
Display "Flight (line + number) is Departing ..Flight (line + number) is Arriving"
==========================
What I'd like to do is use a departure template with an arrival node-set as a parameter.
Then when processing the departure node, use a template for the arrival processing. I *think* the msxsl:node-set function is what I need, but can't find the right answer on the web.
I have simplified both the XML and logic. There is a lot more going on in the
data selection and the presentation logic, but this should do.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.