This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a few xquery/qexo problems


Hoehle, Joerg-Cyril wrote:

Hi,

I hadn't used xquery for a year, and was glad to see that it includes a schema validator!

But Qexo doesn't yet.


1. the interactive output does not show namespaces, although they are there. How to make them appear?

(: 63 :) declare namespace ds = "http://www.w3.org/2000/09/xmldsig#";
(: 66 :) (document("5.xml")/*[1]/ds:Signature)
<Signature> -- note: no xmlns=...
<SignedInfo>...
(: nn :) (document("5.xml")/*[1]/Signature) -> no output since document's Signature is in another namespace

Not yet implemented. For a long thread where discussing implementation, see:
http://lists.w3.org/Archives/Public/www-ql/2003OctDec/0001.html


2. fn:node-kind is mentioned as a replacement for dm:node-kind
http://www.gnu.org/software/qexo/XQuery-Intro.html
"For example there is a fn:node-kind function which you can use, and which is defined to return the same result as dm:node-kind."

(: 57 :) fn:node-kind(document("5.xml")/*[1]/*[3])
gnu.mapping.UnboundSymbol: Unbound symbol node-kind

One of many function I just haven't gotten around to implementing. Should be just an hour's work.


3. I can't seem to get schema import to work

That's because it is not implemented. Note that Scheme import is an *optional* feature of XQuery. I do want to implement it, but it will be a while.


4. a few bizarre errors about "dot" being unbound:
(: 1 :) exit
gnu.mapping.UnboundSymbol: Unbound symbol dot

The CVS version emits "node test when focus is undefined" (though the error message get delayed for some reason). It is parsed as a path expression, but there is no context.


(: 86 :) import
gnu.mapping.UnboundSymbol: Unbound symbol dot
        at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:638)

Likewise.

(: 26 :) return $book java.lang.Error: invalid syntax - variable following name at gnu.xquery.lang.XQParser.parseMaybePrimaryExpr(XQParser.java:1997)

That is correct.


What makes parsing XQuery trickier is the lack of reserved idenifiers. You canot tell whether return is a path expression or part of a return clause without context. Now error messages could guess better, and Qexo's errors messages are gradually getting better.

5. http://www.gnu.org/software/qexo/XQ-Data-Model.html
says "xs:integer - Matches any integer type or any type derived from it, such a xs:nonNegativeInteger, assuming this is in scope of a namespace
declaration that binds xsd to http://www.w3.org/2001/XMLSchema.";
                       ^^^ probably xs?

Yes.


Running kawa-1.7 on MS-Windows 2k JRE1.4.2 or Suze Linux 8.1 JRE 1.3.1

There have beeb lots of improvements in CVS. I'm trying hard to get Kawa 1.8 finished.
--
--Per Bothner
per@bothner.com http://per.bothner.com/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]