Releases: FontoXML/fontoxpath
Releases · FontoXML/fontoxpath
3.27.1
Fixed issues
fn:format-integer
now returns the correct result for empty inputs and negative inputs- The descendant axis retrieves child elements if the selector looks like
self::*
, which allows further bucket-style optimization. Used in Fonto to minimize dependencies for certain queries.
3.27.0
Fixed issues
- PathExpressions ending with a map lookup no longer annotate themselves as a map lookup. This fixes a rare static typing error that was unjustified.
- Traces from compiled scripts give a correct position again
New features
- Thanks to @rebp, we now have a minimal implementation of
format-number
! For now, only the A/a/I/i picture strings are supported! - Trace messages with elements in them now output the element's XML, assuming the serializer argument is passed.
3.26.2
Fixed issues
- Fixed
fn:random-number-generator?permute
to work like the spec describes it - Make
fn:serialize
output a single string instead of an array
Other improvements
- Simplify types in
postFixExprWithStep
, thanks to @HectorPeeters - Add type annotations for single item sequences, again thanks to @HectorPeeters
- Remove
slimdom-sax-parser
from the dependencies, use the built-in parser fromslimdom
instead
3.26.1
Bugfixes
- Custom JavaScript functions are now allowed to return maps.
- Custom functions that return dates in maps are now correctly converting the values.
3.26.0
New functionality
The ResultType.ALL
type is added. This type is a replacement for the new deprecated ANY
type that returned items in an unpredictable way.
Improvements
The child axis is now lazy: it will not get all children if only the first child is used in the query. This narrows down the dependencies that a child::x[1]
query would take.
3.25.1
Fixed issues
- the internal function to evaluate XPath and XQuery from within FontoXPath no longer reparses every expression it sees. It will instead cache the results.
3.25.0
New functionality
- The parser has been refactored from using PEGJS to using PRSC. This improved a lot of parsing-related errors as well because we're now parsing a lot more! Update your own buildtools if you need to expose this new library. It should work for 99% of cases, for the other ones, follow how you integrated
xspattern
. Many thanks to @HectorPeeters and @MTimmerije for the actual work! - XQuery library modules can now also be parsed using
parseScript
3.24.0
New functionality
fn:serialize
! With the help of @rrthomas we now supportfn:serialize
. Be sure to pass a serializer to yourevaluateXPath
calls before you can use it- Better buckets. When parsing a selector like
self::*[self::p]
, the strongername-p
bucket will be reconized as the bucket for the whole selector, improving performance - Passing an AST to
evaluateUpdatingExpression
is now supported - Namespaces are now annotated in an AST, making it possible to nest ASTs with different namespace configurations into each other
3.23.0
New functionality
- With the incredible help of @fhaftmann ,
fn:distinct-values
is implemented! fontoxpath:evaluate
now accepts XQueryX elements representing a full document
3.22.0
New functionality
- This release adds overloads for all APIs to pass an Abstract Syntax Tree as an XML document instead of a string. This allows one to generate an XPath or XQuery program, or combine multiple scripts into one.
- The
name
andlocal-name
functions can now be compiled into JavaScript.
Bugfixes
- #434: Fix the
outermost
function returning wrong results when used with adescendant
axis. This is now also covered by the QT3 tests.
Other improvements
- The
and
operator now returns the most specific bucket if it finds one. So theself::* and self::my-element
returns the bucket forname-my-element
instead of the first one. This may improve performance for a lot of nestedand
operators, or when using thebucket
system. For more information on thebucket
system, give our paper a read! Or watch us presenting it!