[xquery-talk] Galax, XQuery! and schema type matching

Vitali Gontsharuk vitali.gontsharuk at gmail.com
Fri Jun 8 10:24:28 PDT 2007


Hello!

I'm having two problems which I could not solve until now.

The first problem is the following: schema type matching doesn't work for me
in typeswitch constructs. By that I mean constructs of the following form:

typeswitch ($elem)
case element(*, asdf:type1) return element type1 {}
case element(*, asdf:type2) return element type2 {}
default return element default {}

Here, asdf is the namespace prefix of the imported schema. I've tried this
both with the schema-aware version of saxon and with Galax. I'm doing this
the way this is described in the XQuery spec. Could someone please point me
to the problem by giving a working example. Because Saxon is a 100%
standard-conform XQuery implementation, I assume that I've made some
syntactical mistake.

The second problem is about the XQuery! implementation in Galax. I'm using
this XQuery extension to make changes in the XML node sets but this doesn't
work for me. Here is the example which I'm testing with. It has been
published in a presentation by Jerome Simeon (one of the leaders of the
Galax project). Here is the script:

(: Declare our counter :)
declare variable $counter := element counter { 0 };

(: Increment the counter :)
declare function local:getnext() as xs:integer {
 replace { $counter/node() } with { $counter/node() + 1 },
 $counter
};

I'm getting the following error:

Lexing Error: 3 Found QName while in operator state [File "bib.xq", line 6,

characters 9-10:]

I'm using the following command to interpret this script:

galax-run -output-xml bib.xml.result.xml -language xquerybang bib.xq

Here is the link to the presentation by Jerome Simeon from which I extracted
the above sample script:
http://xquerybang.cs.washington.edu/papers/xquerybang-psd.pdf

I will be thankful for any hint from your side! I already tried posting this
problem to the galax mailing list but didn't get any answer. The activity of
the project seems to be down somehow... There was also no reaction to my bug
report in their bugzilla for about two weeks. Does anyone know about the
status of the project? There has still been an update of galax in February
2007, so someone is still working on it...

I would also be thankful for the current state of the XQuery update facility
implementations or implementations of some alternative XQuery update
extension.

Thanks in advance for your answers!
Vitali Gontsharuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20070608/2eb9d4c9/attachment.htm


More information about the talk mailing list