The Zorba Team is proud to announce the release of Zorba 2.9, codename Io! Io includes extensions and improvements to our JSONiq support; enhanced support for Higher-Order Functions (HOF); and extensive improvements in XQuery 3.0 comformance. There are also many optimizations, a number of new features, and more than 65 bug fixes! We can’t cover everything here, so please see the ChangeLog for complete information.
JSONiq
JSONiq - the language for querying JSON data - has been expanding, and Zorba’s implementation is keeping up. New in this release is the ability to declare a module or query to be JSONiq via a version declaration (the first line of the query) :
jsoniq version "1.0";
You can also save your query in a file with a “.jq” extension to enable this.
Doing so invokes a new JSONiq query parser which offers several syntax improvements for dealing with JSON data. In particular, you can now use the familiar “.” notation for accessing JSON object members:
let $obj := { "field1" : 42 } return $obj.field1
This parser also understands JSON-style string escape characters, instead of XML-style &XXX; character references. So you should be able to cut-and-paste valid JSON into your query.
Higher-Order Functions
Zorba has supported for function items for some time, but Zorba 2.9 ups the ante with full support for XQuery 3.0 Higher-Order Functions - functions that take other functions as arguments. This includes sequence-type extensions for declaring variables and parameters as specifically-typed functions; dynamic function evaluation; and even partial function application, which is a powerful functional-programming technique. Zorba 2.9 also includes the XQuery 3.0 functions dealing with higher-order functions, such asfn:filter()
and fn:for-each()
. Be on the lookup for a future blog entry covering these features in more detail.
XQuery 3.0 Conformance
The W3C has a conformance test suite for XQuery 1.0 and 3.0 called QT3, which comprises over 26,000 test cases. While Zorba 2.8 had good compliance, we made strides in this release to clean up many small (and a few not-so-small) conformance issues. Zorba 2.9 boasts over 99.5% conformance with XQuery 1.0, and 99.1% conformance with XQuery 3.0. Check out our full conformance report, including details of our support for XQuery Update Facility and XQuery Full-Text.
And much more
- Extensions to the “uri” module for parsing URIs into components
- Support for XML canonicalization in the “xml” module
- Support for most XML Schema 1.1 features, including
xs:dateTimeStamp
typeswitch
extended to support unions of types- ….
Go check it out today!