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: Problem with Java application


Carmelo Montanez wrote:
    I Am new to kawa and I am running into the a problem.  Following
is a piece of code, for which I am getting the error that follows it, Any
idea of what the problem could be?

declare namespace op = "http://www.w3.org/2002/11/xquery-operators";

      <results>
       {op:numeric-divide(xs:unsignedShort("0"),xs:unsignedShort("65535"))}
      </results>

Error while evaluating Query java.lang.RuntimeException: invalid syntax in eval
form:
<string>:10:23: missing ')' - saw namespace @:22

I think you need to get a newer version of Kawa. I don't get this syntax error. However, I do get a complaint that numeric-divide is unimplemented. You can use the 'div' operator instead, though note that it currently returns an exact fraction - i.e. 6/4 returns 3/2.

This works:
      <results>
       { 0 div 65535 }
      </results>

Also, the 'avg' function is implemented.  However the
TYPE(EXPRESSION) syntax is not implemented.
--
	--Per Bothner
per at bothner dot 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]