defining xpath axes

hi;
when I use axes in my xpath queries like
“/dictionary/e/ss/s/qp/descendant::*” I got the error “Named axes are not supported”
Can anyone suggest me a trick to handle the problem.
thanks…

Hello there.

How about this:

  /dictionary/e/ss/s/qp//*


The XQuery implementation in Tamino 4.1 actually supports the [named] axes “attribute”, “child”, “descendant”, “descendant-or-self”, “parent” and “self”.

I hope that helps,
Trevor.

hi; :confused: :confused:
/dictionary/e/ss/s/qp//* query is same with /dictionary/e/ss/s/qp/descendant::*, if it they are same can you show me the ways for other axes; child and attribute… and is there any way for ancestor?
thanks

Hello.

Perhaps the easiest approach is to point you to the appropriate section in the Tamino 4.1 documentation:
C:/Program Files/Software AG/Tamino/Tamino 4.1.1.1/Documentation/xquery/xq-nutsnbolts.htm#xq-nb-paths

Here is the section on Axes (for those who do not have direct access to the documentation):

Axes
In XQuery, six axes are defined. Axes originate in the context node and determine the initial
node sequence that will be further refined by node tests and predicates. In XQuery and XPath 
2.0, you can specify a path either by the unabbreviated syntax or by a more concise 
abbreviated syntax. The following table lists the axes along with their direction (normal 
document order or reverse document order) and a short description. In the unabbreviated 
syntax a double colon '::' follows the name of the axis. 

Axis                 Direction               Meaning 
attribute::          implementation-defined  attached attribute nodes 
child::              normal                  immediate child nodes (default axis) 
descendant::         normal                  all descendent child nodes 
descendant-or-self:: normal                  current node and all its descendent
                                             child nodes  
parent::             reverse                 parent node (or attaching node for
                                             attribute and namespace nodes)  
self::               normal                  the current node 

Tamino also supports the abbreviated notation of path expressions with axes. They correspond
to the unabbreviated axes, as defined in the W3C XQuery specification, as follows: 

Abbreviation  Description 
no axis       nodes along child:: axis satisfying node tests and optional predicates  
@             nodes along attribute:: axis satisfying node tests and optional predicates  
.             self::node(), which is the current node of any type  
..            parent::node(), which is the empty sequence if the current node is the document
              node; the attaching node if the current node is an attached node (of type
              attribute or namespace); otherwise the parent node  
//            /descendant-or-self::node()/, which is the absolute path at the start of an 
              expression, or the relative path elsewhere  



I hope that helps.
Trevor.

[This message was edited by Trevor Ford on 24 Mar 2003 at 16:28.]

[This message was edited by Trevor Ford on 24 Mar 2003 at 16:29.]