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
Hi,

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
   //attribute(id)
results in the content of the 57 id attributes - ok.

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

But
   /rdf:RDF/rdf:Description/child::attribute(id)
returns the attributes as well

as does
   /rdf:RDF//descendant::attribute(id)

only
   /rdf:RDF/descendant::attribute(id)
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,

Timo


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open