Page 1 of 1

XPath 3.1 map and array support in Schematron with queryBinding="xslt3"

Posted: Wed Aug 19, 2020 2:20 am
by Martin Honnen
When using Schematron with `queryBinding="xslt3"` and namespace declarations like `<sch:ns prefix="map" uri="http://www.w3.org/2005/xpath-functions/map"/>` I would like to see content completion for functions from that namespace like `map:merge`, `map:keys`. The same for the XPath 3.1 array functions.

Re: XPath 3.1 map and array support in Schematron with queryBinding="xslt3"

Posted: Wed Aug 19, 2020 3:05 pm
by tavy
Hello Martin,

In to see the functions in the content completion list you need to declare the namespace also on the Schematron root element. Something like this:

Code: Select all

<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt3"
    xmlns:array="http://www.w3.org/2005/xpath-functions/array"
    xmlns:map="http://www.w3.org/2005/xpath-functions/map">
Best Regards,
Octavian

Re: XPath 3.1 map and array support in Schematron with queryBinding="xslt3"

Posted: Fri Aug 21, 2020 6:12 pm
by Martin Honnen
Ah, I first had them declared on the root element but then found that Schematron needs the `ns` element, then I thought the namespace declaration would no longer be needed. So I need both to have the Schematron compiler happy and my failing memory happy to work with content completion.

Thanks.