"John L. Clark" wrote:
> I have encountered a bug that behaves as follows.  After installing
> the attached configuration (test_2008-02-01.zip) and loading the
> sample document (also attached - nsatts1.xml), I am having a problem
> searching for elements based upon attribute contents.  To reproduce
> this bug, select the root element of the document (`scr:root`).  Next,
> choose Select > Find Element..., select "Following current node
> (including descendents)", select "Having Attribute", leave the
> attribute name field blank, choose "Containing", and enter the text
> "bar" (without the quotes).  After pressing OK, the `a` element should
> be selected (as it has an attribute containing "bar").  Now either
> press Ctrl+A or choose Select > Find Element... again, leave all the
> values the same, and press OK.  The selection does not change and the
> status bar says that the expression is "not found or cannot be
> selected", but the `scr:s1` element has an attribute that contains
> "bar".  I have experienced this bug using XXE 3.7.1 Professional
> Edition on Linux using Java version 1.6.0_03.
> 
> Let me know if you need any additional information.

--> This bug is fixed now. The bug fix will be available in next release.

--> The search you have described is translated to:

(descendant::*|following::*)[contains(@*,'bar')][1]

It seems that "[contains(@*, 'bar')]" means:
- Having an attribute (any attribute will do).
- This attribute containing 'bar'.

That is, "[contains(@*, 'bar')]" does not iterate over attributes. Not 
intuitive, but probably the correct behavior.

Note that if you restart XXE a dozen times, this search will work as 
expected 2 or 3 times, because this depends on the random order of the 
attributes.

--> The search should have been translated to:

(descendant::*|following::*)[./@*[contains(.,'bar')]][1]







Reply via email to