On 11/04/07, Ali Ranalvi <[EMAIL PROTECTED]> wrote:
HI Sebb,

Thanks for your reply. I had a look at the Issue#41253, yes that's similar
what I was suggesting. However in XPath Assertion, you are not merely
extracting but also matching.

Duh - sorry, that was for a different XPath test element.

Current behaviour: The XPath query is assumed to return a NodeList *only*.
If the XPath query returns null or a list with no nodes, then all's well,
else it fails.

If you try to assert count(//*errors)=1 (count of all error nodes wherever
they occur in the XML document must be 1), a valid XPath query, which
evaluates to a #BOOLEAN, there's a TransformerException.

We need additional meat in XpathAssertion#getResult(SampleResult) to:
1. Use generic XPathAPI.eval, instead of XPathAPI.selectNodeList
2. Make decision based on the return value of point 1.
  a. If NodeList, do as earlier.
  b. If boolean, then fail if false, else pass.
  c. So on for other types

Can you create a Bugzilla enhancement for this please?

It would be very helpful if you could also include some test samples -
i.e. an XML document, and some Assertions that are expected to pass or
fail.

S///

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to