Am Freitag, 30. März 2012, 09:12:39 schrieb Charles Duffy: > Howdy -- > > I have a thin wrapper around the 3rd-party svnkit library. At present, it > provides two functions: > > module namespace svnkit = "http://dyfis.net/svnkit-wrapper"; > declare namespace j="java:net.dyfis.svnkit_wrapper.SvnWrapper"; > > declare function svnkit:cat($path as xs:string) as xs:string { > j:cat($path) > }; > > declare function svnkit:cat($path as xs:string, $rev as xs:integer) as > xs:string { > j:cat($path, $rev) > }; > > > SvnWrapper (written in Clojure) provides both versions of cat as static > methods: > > (ns net.dyfis.svnkit-wrapper.core (:gen-class > :name net.dyfis.svnkit_wrapper.SvnWrapper > :methods [#^{:static true} [cat [java.lang.String] java.lang.String] > #^{:static true} [cat [java.lang.String int] > java.lang.String]])) > > > svnkit:cat($path) works fine. > svnkit:cat($path, $revno) results in the following: > > [FORG0006] Invalid arguments: SvnWrapper.cat(xs:string, xs:integer) found. > > > SvnWrapper.cat(xs:string, xs:integer) is exactly what I *expect* it to > find, so the error doesn't make a great deal of sense to me. Any hints?
In BaseX xs:integer is mapped to java.math.BigInteger. So either you should change your Clojure methods to java.math.BigInteger or change the XQuery wrapper function to xs:int (I guess this make more sense). Regards, Dimitar _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk