RE: [xsl] processin each element not on a list

Subject: RE: [xsl] processin each element not on a list
From: Dan Diebolt <dandiebolt@xxxxxxxxx>
Date: Sun, 6 Oct 2002 08:26:10 -0700 (PDT)
Thanks. Basically everyone is saying to use a key. How do
you approach the problem if you have several sets of choices.
Lets say one set of choices is {A,B,C,D} and the other set is
{X,Y,Z}. Reformulating the source XML a bit, I would like to
process all <item>'s that did not match their respective set
of choices:

  <object id="1">
  <object id="2">
  <item id="1"><object id="1">A</object></item>
  <item id="2"><object id="1">X</object></item>
  <item id="3"><object id="2">W</object></item>
  <item id="4"><object id="1">D</object></item>
  <item id="5"><object id="2">B</object></item>
  <item id="6"><object id="2">Y</object></item>

In other words, <item id="2"> should be processed
because its text value "X" is not among the list
of choices for <ojbect id="1">. Likewise, <item id="3"> 
and <item id="5"> should be processed because thier 
text values "W" and "B" are not among the list
of allowed choices.

Is it possible to do this in a generic fashion
with a *fixed* key definition or do I have to have
one key for each set of choices? What I am trying
to do is come up with a key definition and processing
that would accomodate *any* set of choices that
might be found in the source XML file. 

Thanks in advance.

 XSL-List info and archive:

Current Thread