Skip to content

Releases: FontoXML/fontoxpath

3.27.1

13 Sep 09:12
Compare
Choose a tag to compare

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

18 Aug 13:32
Compare
Choose a tag to compare

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

22 Jul 09:57
Compare
Choose a tag to compare

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 from slimdom instead

3.26.1

04 Jul 08:04
Compare
Choose a tag to compare

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

04 Jul 08:02
Compare
Choose a tag to compare

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

04 Mar 16:03
Compare
Choose a tag to compare

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

02 Mar 10:30
Compare
Choose a tag to compare

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

09 Feb 16:42
Compare
Choose a tag to compare

New functionality

  • fn:serialize! With the help of @rrthomas we now support fn:serialize. Be sure to pass a serializer to your evaluateXPath calls before you can use it
  • Better buckets. When parsing a selector like self::*[self::p], the stronger name-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

03 Dec 10:34
Compare
Choose a tag to compare

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

29 Nov 15:35
Compare
Choose a tag to compare

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 and local-name functions can now be compiled into JavaScript.

Bugfixes

  • #434: Fix the outermost function returning wrong results when used with a descendant 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 the self::* and self::my-element returns the bucket for name-my-element instead of the first one. This may improve performance for a lot of nested and operators, or when using the bucket system. For more information on the bucket system, give our paper a read! Or watch us presenting it!