I am using xalan-j_2_0_D05, and I think there may be a bug with the contains() function.
 
We have an xml document like this:
 
<item ID="1">
  <cat @name="xyz">
  <cat @name="abc">
  <item ID="2">
    <cat @name="xyz">
    <item ID="3">
      <cat @name="abc">
  </item>
</item>
 
I want to use a parameter with a space-delimited string like 'abc xxx' and find all <item> elements which have a match of one or more <cat> children. We tried:
 
<xsl:template select="item[contains($var, ./cat/@name)">
 
If the var is set to 'abc xxx' it should return item1 only. If the var is set to 'abc xyz' it should find item1, item2, and item3. However, it doesn't find any, because its only matching on the first <cat> within an item. If I change the order of the <cat> elements it does work.
 
A) Is this a bug?
 
B) If so, has it been fixed in a later release?
 
C) If yes to a later release, are there major architectural changes to the current release from the one I am running? (The one we have works very fast and well for everything else we are doing, and I have been reading about various performance changes due to the DTM working differently).
 
Thanks,
 
Cory
 
 
 
BEGIN:VCARD
VERSION:2.1
N:Isaacson;Cory;;;(Compuflex)
FN:Cory Isaacson (Compuflex)
ORG:CompuFlex International
TITLE:President & CTO
TEL;WORK;VOICE:(818) 884-1168
TEL;CELL;VOICE:(818) 359-2615
TEL;WORK;FAX:(818) 884-0178
ADR;WORK:;;21124 Banlynn Court;Topanga;CA;90290;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:21124 Banlynn Court=0D=0ATopanga, CA 90290=0D=0AUnited States of America
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010327T203314Z
END:VCARD


Reply via email to