Releases: FontoXML/fontoxpath
3.12.0
New features
Benchmarking
We now have the option to run benchmarks for a subset of the QT3 tests or benchmarks we wrote ourselves. This will make it easier to ensure the performance of this library in future development. See the contributing guide for more details.
Lightweight cloning
We've made some changes internal which greatly improves the creating deep data structures using element constructors in XQuery. This includes queries which create a new data structure and paste in existing pieces of XML as in this example.
let $existing-element := descendant::myElement
return <root><level1><level2>{$existing-element}</level2></level1></root>
fn:matches
We now have support for fn:matches
as requested in #188. See the specs for more examples and details on how to use this.
Note that we do not yet support the $flags
argument. We might look into this if/when it becomes needed.
Fixed issues
- #230 Atomizing arrays now results in all values concatenated.
fn:string-join
now accepts any atomic type as argument.fn:id
would not raise an error if the context item was not a node.- Fixed an issue where
getData
would not call the providedIDomFacade
.
3.11.1
#Fixed issues
Fixed an issue where the running the same XPath expression with a different namespace configuration causes the wrong namespace configuration to be used later on.
3.11.0
New features:
- New option
logger
for thetrace()
function, this can be used to output additional context for your traces. - Access the abstract syntax tree of you expression in an XQueryX format using the new parseScript function.
3.10.0
New features:
- We finally support the '?' operator, which can be used to quickly navigate through maps and arrays
Fixed issues:
- Arrays can now properly be normalized
- The error for fn:exactly-one is fixed
Other
- All dependencies are upgraded, build system switched from using typescript + closure directly to using tscc
3.9.2
We now also show a prettied error message showing the line containing the error when registering an XQuery module with the debug flag enabled.
For example, the following module
module namespace my-ns="http://www.dita-example-editor.com/hooks";
declare %public %updating function my-ns:my-func ($node as node()) as xs:integer {
$node/descendant::p ! (replace value of node . with "steve"), 1
};
will show the following error
2:${' '}
3: declare %public %updating function my-ns:my-func ($node as node()) as xs:integer {
4: $node/descendant::p ! (replace value of node . with "steve"), 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5: };
Error: XUST0001: Can not execute an updating expression in a non-updating context.
at <simpleMapExpr>:4:5 - 4:65
3.9.1
A number of bugfixes in this one:
Empty sequences in quantified expressions no longer cause errors (thanks @Koltharius !)
Inserting attributes correctly handles prefixless attributes
Document type nodes are correctly filtered in the child axis and more. Document type nodes are not part of the XDM.
3.9.0
New features:
We now support updating functions for XQuery Update Facility, see 2.3 Updating Functions of the spec for more information.
Fixed issues:
More errors will be raised when using updating expressions in non updating context. This will ensure the updating queries you write will be compliant to the spec.
3.8.0
New features:
Proper type conversion when calling external JavaScript functions (thanks to @ymor)
fn:data
fn:index-of
Better support of FLWOR expressions
Fixed issues:
A lot of small and big bugs that were found while making FontoXPath able to run the XQueryDoc library, such as whitespace issues, missing functions, better support of some prolog parts, etcetera.
3.7.0
3.6.1
The return value of functions will now be converted to the correct type.
Buckets are no longer passed to the IDomFacade
in a descendant axis.
Development dependencies have been updated.