Changes

Jump to navigation Jump to search
53 bytes added ,  18:01, 28 March 2012
* {{Mono|input}} is an instance of [https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/util/InputInfo.java InputInfo]. It contains line/column and the original query and is mainly used for providing better error messages.
Below, The following query calls two context-aware Java methods are : <pre class="brush:java">import module namespace context = 'java:org.basex.examples.query.ContextModule'; <pre class="brush:xquery"><context>{ context:function-namespace()}</context>,<error-code>{ try { context:to-int('abc') } catch * { $err:code }}</error-code></pre> The called Java method is shown that take advantage of the variablesbelow:
<pre class="brush:java">
}
}
</pre>
 
<pre class="brush:java">
import module namespace context = 'java:org.basex.examples.query.ContextModule';
 
<context>{
context:function-namespace()
}</context>,
<error-code>{
try {
context:to-int('abc')
} catch * {
$err:code
}
}</error-code>
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu