[xquery-talk] Using axis in XQuery

padmapriya ayyagari asn.padmapriya at gmail.com
Tue Nov 30 22:05:34 PST 2004


Hello,

The code given below provides an xslt solution for printing the path to a node.
However, I could not find how to use the axis (equivalent of 'select'
given below) in xquery.

I need a function such that : For every node returned as an answer to
an xquery which is a union of xqueries, I want the path from the root
to that node in the document.

<xsl:for-each select="ancestor-or-self::*">
  <xsl:text>/</xsl:text>
  <xsl:value-of select="name()" />
</xsl:for-each>

Also, between galax and saxon, which would you suggest for running
xqueries on xml documents?

Thank you so much Micahel and Jason for helping me out.

Padmapriya


More information about the talk mailing list