[xquery-talk] Context node for ancestor-or-self

Michael Rys mrys at microsoft.com
Wed Dec 1 16:46:13 PST 2004


 for $n in fn:document("xmark.xml")/site/people/person/emailaddress)
 return fn:string-join(for $p in $n/ancestor-or-self::* return
 fn:name($p), "/")

> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf
> Of padmapriya ayyagari
> Sent: Wednesday, December 01, 2004 4:18 PM
> To: talk at xquery.com
> Subject: [xquery-talk] Context node for ancestor-or-self
> 
> This gives an error :
> 
> for $n in fn:document("xmark.xml")/site/people/person/emailaddress)
> return fn:string-join(for $p in ancestor-or-self::* return
> fn:name($p), "/")
> 
> 
> Exception in thread "main" galapi.GalapiException: Failure("Context
> item not defined")
> 
> I think this is because the processor cannot locate the context node
> for ancestor-or-self. How does one specify the context node for
> ancestor-or-self, $n in this case?
> 
> Thanks,
> Padmapriya
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk



More information about the talk mailing list