[xquery-talk] Parse error - please help!

Michael Rys mrys at microsoft.com
Wed Dec 1 11:41:33 PST 2004


Actually the XQuery grammar since LC Nov 2003 requires the ; after a
prolog declare statement...

Best regards
Michael

> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf
> Of Raffaele Sena
> Sent: Wednesday, December 01, 2004 11:30 AM
> To: 'padmapriya ayyagari'; talk at xquery.com
> Subject: RE: [xquery-talk] Parse error - please help!
> 
> Why do you have ";" after your declare ?
> 
> I think they are not part of the XQuery syntax (and the parser may get
> upset
> about them).
> 
> -- Raffaele
> 
> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
Behalf
> Of
> padmapriya ayyagari
> Sent: Wednesday, December 01, 2004 11:15 AM
> To: talk at xquery.com
> Subject: [xquery-talk] Parse error - please help!
> 
> Hello,
> 
> When I try to execute the following xquery:
> 
> declare default function namespace
> "http://www.w3.org/2004/10/xquery-local-functions";
> 
> declare function local:fullpath($node as node()) as xs:string
>  {
> 	 if ($node/..) then concat(name($node), '/',
> local:fullpath($node/..))
> 	 else ""
>  };
> 
>
local:fullpath(fn:document("xmark.xml")//site/people/person/emailaddress
)
> 
> It gives me the following error :
> 
> Exception in thread "main" galapi.GalapiException: Failure("Parsing
> Error: Parse error in XQuery string [characters 8-24:]")
> 
> Similarly for the function below:
> 
> declare default function namespace
> "http://www.w3.org/2004/10/xquery-local-functions";
> declare function local:getmypath($e as node()) as xs:string
>  {
>   concat('/', string-join(for $n in ancestor-or-self::* return
name($n),
> '/'))
> };
>  local:getmypath(fn:doc("xmark.xml")//site/people/person/emailaddress)
> Exception in thread "main" galapi.GalapiException: Failure("Parsing
> Error: Parse error in XQuery string [characters 8-24:]")
> 
> To tbe best of my knowledge, the syntax is in tune with the w3
> specifications. Could someone please point out what the error might
> be?
> 
> Thanks,
> Padmapriya
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
> 
> 
> !DSPAM:41ae0e6e227621973087510!
> 
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk



More information about the talk mailing list