[XML-SIG] Re: Some pyXML Bugs in PyXML 0.6.2 and 4Suite for Python 1.5.2

Jeremy Kloth jeremy.kloth@fourthought.com
Wed, 07 Feb 2001 14:17:32 -0700

"Thomas B. Passin" wrote:

> Now the code runs, but the example being tested still fails -  Apparently the
> xpointer expression no longer works.  When I try various plausible variations,
> a few of them work, some of them return None (which causes an error) , and
> some give this same error.
> Seems to me that if no match is found for an expression, returning None would
> always be appropriate.  It shouldn't return an exception unless there was
> invalid syntax in the xpointer expression.

According the the XPointer specification, it is an error.
In section 3.4:

[Definition: If a syntactically correct XPointer, suitably escaped,
fails as discussed in 4.3 Schemes, the XPointer has a sub-resource
error.] Note that XPath allows expressions that return empty node-sets
as their results and does not regard this situation as an error. Because
the XPointer language is intended as a specification of document
locations rather than a broader query language, an empty result is an

Jeremy Kloth                             Consultant
jeremy.kloth@fourthought.com             (303)583-9900 x 105
Fourthought, Inc.                        http://www.fourthought.com
Software-engineering, knowledge-management, XML, CORBA, Linux, Python