Changes

Jump to navigation Jump to search
461 bytes added ,  11:25, 18 August 2021
{{Mark|Updated with Version 9.6:}}
* With the middle dot notation, three adjacent dots can be used to specify array types.
* The path to the standard package {{Code|java.lang.}} can now be omitted.
* Java objects are now wrapped into function items.
* Results of constructor calls are always returned as function item.
* A new option {{Option|WRAPJAVA}} was added to control how Java values are converted to XQuery.
* With the middle dot notation, three adjacent dots can be used to specify array types.
* The path to the standard package {{Code|java.lang.}} can now be omitted.
* The Mapping rules were refined and unified. The most important changes:
** {{Code|array(*)}} type added.
** {{Code|xs:unsignedShort}} values are converted to {{Code|char}} values.
* All error messages were revised and improved.
 
=Identification=
==Functions and Variables==
Java constructors, functions and variables can be referenced and evaluated by the existing XQuery function syntax:
* The namespace of the function name identifies the Java class.
| <code>string.split(";", 3)</code>
|- valign="top"
| Function Constructor with array argument
| <code>Q{String}new·byte...(xs:hexBinary('414243'))</code>
| <code>new String(new byte[] { 41, 42, 43 })</code>
Before Java code is executed, the arguments are converted to Java values, depending on the addressed function or constructor parameters. The accepted Java types and the original XQuery types are depicted in the second and first column of the table below.
 
If a numeric value is supplied for which no exact matching is defined, it is cast to the appropriate type unless it exceeds its limits. The following two function calls are equivalent:
 
<syntaxhighlight lang="xquery">
(: exact match :)
Q{String}codePointAt('ABC', xs:int(1)),
(: xs:byte and xs:integer casts :)
Q{String}codePointAt('ABC', xs:byte(1)),
Q{String}codePointAt('ABC', 1)
</syntaxhighlight>
===Conversion to XQuery===
; Version 9.6
* Updated: Java Bindings revised (new mappings, Java functiom items, {{AnchorOption|Data TypesWRAPJAVA}}: {{Code|array(*option)}} type added; {{Code|xs:integer}} are converted to {{Code|long}} values.
; Version 9.4
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu