[xquery-talk] Using axis in XQuery
ipedruzz at progress.com
Wed Dec 1 03:34:40 PST 2004
This is one way
declare function local:fullpath($node as node())
if (name($node)) then
concat(name($node), '/', local:fullpath($node/..))
> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf Of padmapriya ayyagari
> Sent: Tuesday, November 30, 2004 10:06 PM
> To: talk at xquery.com
> Subject: [xquery-talk] Using axis in XQuery
> 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:value-of select="name()" />
> 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.
> talk at xquery.com
More information about the talk