Non standard behaviour with attribute kind test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Non standard behaviour with attribute kind test

Timo Boehme

I tested some rather weird queries with the eXist demo server and found
that the treatment of the attribute kind test does not correspond to the
XQuery standard.

For the following queries I used document doc('/db/library/biblio.rdf')
and defined the rdf namespace.

The query
results in the content of the 57 id attributes - ok.

The same with
   /rdf:RDF/rdf:Description/attribute(id) - ok

returns the attributes as well

as does

returns correctly the empty sequence.

In general all XPath expressions with an attribute kind test and an axis
which is or is derived from child axis (descendant, descendant-or-self,
following-sibling, preceding-sibling) must return an empty sequence.
Only in case the context already contains attribute nodes and we have
descendant-or-self axis the current attribute nodes might be returned
(if name matches).

Looking only at the examples it seems to me that the error is simply
that eXist ignores the axis specifier if an attribute test is given.

Kind regards,


This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more.
Exist-open mailing list
[hidden email]