Skip to content

Releases: FontoXML/fontoxpath

3.17.0

09 Mar 14:54
Compare
Choose a tag to compare

New features

Implement a new Function Name Resolver that can be used to implement XForms and standards like XForms.

Fixed bugs

Durations are a lot more stable now. Seems like we outputted some invalid durations before.

3.16.0

23 Feb 09:54
Compare
Choose a tag to compare

New features

Added support for external functions. You can now use an external function in an XQuery as long as the external function is being registered before the module is being used.

Example:

registerXQueryModule(`
	module namespace x = 'http://www.example.com';

	declare function x:external-1 () as item() external;

	(: Should not throw as the function is declared to be external :)
	declare %public function x:uses-external-1() as item() {
		x:external-1()
	};
`);

// Now register it
registerCustomXPathFunction(
	{
		namespaceURI: 'http://www.example.com',
		localName: 'external-1',
	},
	[],
	'item()',
	() => 'foo'
);

// We can now use the module as the external function has been registered
evaluateXPathToString(
	`import module namespace x = "http://www.example.com";
	x:uses-external-1()`,
	null,
	undefined,
	undefined,
	{ language: evaluateXPath.XQUERY_3_1_LANGUAGE }
)

Fixed bugs

  • Fixed a bug where document() was used as type instead of document-node(). This was mainly internal usage and only affects the recently added API createTypedValueFactory. This now needs to be passed document-node() as well to create a typed value for a document node.

3.15.0

11 Feb 13:34
Compare
Choose a tag to compare

New features

  • Introduced a createTypedValueFactory to convert JavaScript values into typed values. These typed values are to be considered a blackbox, but when passed as a variable to an evaluateXPath it will be of the specified value type.

Fixed bugs

  • Fixed a bug where whitespace in a collation was not parsed properly

3.14.2

03 Dec 13:21
Compare
Choose a tag to compare

Fixed bugs

  • Clear measurements when starting a new profile

3.14.1

03 Dec 13:20
Compare
Choose a tag to compare

Fixed bugs

  • Omit last argument from the Profiler#measure to prevent Edge legacy from throwing an error

3.14.0

03 Dec 13:19
Compare
Choose a tag to compare

New functionality

  • We implemented the FLWOR order by clause, improving our spec coverage by another big step!
  • We implemented a performance profiler. The README explains how to use it!

3.13.6

10 Oct 13:00
Compare
Choose a tag to compare

Fixed bugs

  • Getting the parent node of a detached node no longer throws an error

Other improvements

  • A more specific bucket for elements-or-attributes is added, improving performance in some specific scenarios

3.13.5

24 Sep 12:06
Compare
Choose a tag to compare

Fixed issues:

  • Array:sort did not sort correctly when one or more of the members of the sorted array contained a non-singleton sequence
  • The ESM build threw errors when loaded in the browser

3.13.3

31 Aug 13:43
Compare
Choose a tag to compare

Fixed issues

  • During the integration of FontoXPath 3.13 in the Fonto editor, we spotted a significant performance regression in all areas where XPath is used. This turned out to be caused by the inclusion of polyfills (or rather the omittance of them). Enabling polyfills again improved performance, so this version of FontoXPath has them enabled again.

3.13.0

20 Aug 14:53
Compare
Choose a tag to compare

New functionality:

  • Build FontoXPath as an ES6 module
  • Add a number of uri/iri-related functions
  • Allow setting the default namespace uri through the JavaScript API

Fixed bugs

  • Fixed the specificity of some specific selectors

Performance optimizations

  • Optimized the union operator in specific situations
  • Fix the stackTraceGenerator from disabling some optimizations when debugging XPaths