qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Error message in function definition


From: Carol Romanowski
Subject: Re: [Qexo-general] Error message in function definition
Date: Fri, 09 May 2003 21:27:28 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1

Thanks for the prompt reply, and that suggestion worked!

Per Bothner wrote:

Carol Romanowski wrote:

Hello --

I am trying out the use cases and got this error for the Q6 test.

nestedlist.xql:1:67: node test when focus is undefined
nestedlist.xql:1:67: missing '}'
nestedlist.xql:1:78: missing expression
nestedlist.xql:1:78: missing ')' - saw  @:78
nestedlist.xql:10:1: missing ')' - saw  @:1



The XQuery code is

define function section-summary($book-or-section as element())
 as element()*
...

What's the problem?


Excessive optimism, I'm afraid.
The element() syntax is new as of the 02 May 2003 draft.
The instead of 'element()' you *should* be able to use
'element *'.  However, occurrence indiactors such as '*'
are not supported.  Note that there is a good chunk of previous
drafts that Qexo does not implement either!

Try leaving out the type specifications:

define function section-summary($book-or-section)
{ ... }

Adding support for the 'element(*)' and 'element(NAME,*)'
type specifiers are at the top of my priority list, because my
article http://www.gnu.org/software/qexo/XQ-Gen-XML.html
depends on them.  It currently uses the old 'element NAME'
syntax, I need to update it ASAP, because it will appear
in the "XQuery Kick Start" book I'm co-writing.


--
Carol J Romanowski
Department of Industrial Engineering
415 Bell Hall
(716) 645-2357 ext. 2106
address@hidden
www.eng.buffalo.edu/~cfr








reply via email to

[Prev in Thread] Current Thread [Next in Thread]