Subject: Keys Context Management
From: "Karl Stubsjoen" <kstubs@xxxxxxxxx>
Date: Wed, 15 Mar 2006 21:37:54 -0700
|
I have a couple of keys which I have defined like this;
<xsl:key name="key_athletes"
match="/ROOT/MeetResults/Meet/AthleteResults/Athlete" use="USAGNum"/>
<xsl:key name="athlete_driver"
match="/ROOT/NewDataSet[@Name='wbx_scoreupload']/Table"
use="usagnum"/>
Notice that I match right away off of ROOT. I do this because I am
not confident that the context for which the key belongs will be
preserved. I've written similar keys before where I am basically
going after the last node of the tree to which I am after.
How does context work with keys?
Does the context of each key shift as you walk your XML?
I remember that the context of a key can switch XML source, so like in
and out of variables, and back to the original context...
Thanks..
|