<syntaxhighlight lang="xquery">
(: Without the pragma, the result of toChars would be converted to an xs:unsignedShort item, and the second function call would fail :)
(# db:wrapjava all #) {
Q{java.lang.Character}toChars(xs:int(33))
<syntaxhighlight lang="xquery">
(: Without the pragma, set:add would return a boolean, indicating if a new entry was added :)
declare namespace set = 'java:java.util.HashSet';
let $set := (# db:wrapjava instance #) {
<syntaxhighlight lang="xquery">
(: Without the pragma, 100 booleans would be returned by the FLWOR expression :)
declare namespace set = 'java:java.util.HashSet';
let $set := set:new()