xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cory Isaacson \(Compuflex\)" <cisaac...@compuflex.com>
Subject contains()
Date Thu, 10 Jan 2002 03:55:21 GMT
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




Mime
View raw message