Releases: FontoXML/fontoxpath
Releases · FontoXML/fontoxpath
3.17.0
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
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 ofdocument-node()
. This was mainly internal usage and only affects the recently added APIcreateTypedValueFactory
. This now needs to be passeddocument-node()
as well to create a typed value for a document node.
3.15.0
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 anevaluateXPath
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
Fixed bugs
- Clear measurements when starting a new profile
3.14.1
Fixed bugs
- Omit last argument from the Profiler#measure to prevent Edge legacy from throwing an error
3.14.0
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
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
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
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
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