[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] Error message in function definition
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] Error message in function definition |
Date: |
Fri, 09 May 2003 18:21:23 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3) Gecko/20030312 |
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.
--
--Per Bothner
address@hidden http://per.bothner.com/