Hello!<br><br>I&#39;m having two problems which I could not solve until now.<br><br>The first problem is the following: schema type matching doesn&#39;t work for me in typeswitch constructs. By that I mean constructs of the following form:
<br><br>typeswitch ($elem)<br>case element(*, asdf:type1) return element type1 {}<br>case element(*, asdf:type2) return element type2 {}<br>default return element default {}<br><br>Here, asdf is the namespace prefix of the imported schema. I&#39;ve tried this both with the schema-aware version of saxon and with Galax. I&#39;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&#39;ve made some syntactical mistake.
<br><br>The second problem is about the XQuery! implementation in Galax. I&#39;m using this XQuery extension to make changes in the XML node sets but this doesn&#39;t work for me. Here is the example which I&#39;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:
<br><br><pre>(: Declare our counter :)<br>declare variable $counter := element counter { 0 };<br><br>(: Increment the counter :)<br>declare function local:getnext() as xs:integer {<br> replace { $counter/node() } with { $counter/node() + 1 },
<br> $counter<br>};</pre>I&#39;m getting the following error:<br><pre>Lexing Error: 3 Found QName while in operator state [File &quot;bib.xq&quot;, line 6,<br><br>characters 9-10:]</pre>I&#39;m using the following command to interpret this script:
<br><pre>galax-run -output-xml bib.xml.result.xml -language xquerybang bib.xq</pre>Here is the link to the presentation by Jerome Simeon from which I extracted the above sample script:<br><a href="http://xquerybang.cs.washington.edu/papers/xquerybang-psd.pdf">
http://xquerybang.cs.washington.edu/papers/xquerybang-psd.pdf</a><br><br>I will be thankful for any hint from your side! I already tried posting this problem to the galax mailing list but didn&#39;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...
<br><br>I would also be thankful for the current state of the XQuery update facility implementations or implementations of some alternative XQuery update extension.<br><br>Thanks in advance for your answers!<br>Vitali Gontsharuk
<br>