[XML-SIG] PyXML XPath limitation

Paul Boddie paul.boddie at ementor.no
Wed Sep 1 11:32:48 CEST 2004

Brian Quinlan wrote:
> In the unlikely event that this isn't a known problem, or in the more 
> likely event that I am doing something wrong, the following code 
> generates an exception for me:
> nodes = xpath.Evaluate(
>              '//dict[key=%r]/key' % key, self.document)


> Exception: Expected node set from relative expression.  Got ()

I remember submitting a patch for this some time ago. Whilst doing some
XPath experimentation, it did occur to me that the xml.xpath package
do with some tidying up in certain respects, but I never got round to
looking into this more thoroughly. As for the exception you see, I
that some refactoring process which changed the representation of
things left some corner cases that didn't get tested.


More information about the XML-SIG mailing list