You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slightly modifying the example code in the documentation:
constfontoxpath=require("fontoxpath")// Register a function called 'there' in the 'hello' namespace:fontoxpath.registerCustomXPathFunction({namespaceURI: 'hello',localName: 'there'},['array(*)'],'xs:string',(_,str)=>`Hello there, ${str[0]}`);// and call it, using the BracedUriLiteral syntax (Q{})constout=fontoxpath.evaluateXPathToString('Q{hello}there(["General Kenobi"])');console.log(out);
This works fine, but if I change array(*) to array(xs:string), I get the error:
Error: XPST0081: Invalid prefix for input array(xs:string)
This is with version 3.17.4; with 3.17.2 I got the slightly different:
Error: XPST0081: The type array(xs:string) could not be found.
Thanks so much for fontoxpath, it's saving me a great deal of work in Node-land!
The text was updated successfully, but these errors were encountered:
Thanks for reaching out! What you are seeing is correct, we do not support the parameterized versions of types yet: such as function(xs:string) as xs:string, map(xs:integer) or array(xs:string). We usually 'work around' this by defaulting to more generic types: array(*) would be your work-around. Does this unblock you?
We are currently improving the type system to mainly perform better. After that is done, I will take a moment to see how we can best fit these parameterized types in the engine.
About the error you are getting. That is not a readable one. I will keep this issue open to address that.
Thanks so much for fontoxpath, it's saving me a great deal of work in Node-land!
Slightly modifying the example code in the documentation:
This works fine, but if I change
array(*)
toarray(xs:string)
, I get the error:This is with version 3.17.4; with 3.17.2 I got the slightly different:
Thanks so much for fontoxpath, it's saving me a great deal of work in Node-land!
The text was updated successfully, but these errors were encountered: