xsl-list
[Top] [All Lists]

Re: [xsl] load-xquery-module(): Request for working code example of calling this standard XPath 3.1 function

2019-09-07 12:11:57
Thanks Martin.

Dimitre

On Sat, Sep 7, 2019 at 4:37 AM Martin Honnen 
martin(_dot_)honnen(_at_)gmx(_dot_)de <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Am 07.09.2019 um 04:00 schrieb Dimitre Novatchev 
dnovatchev(_at_)gmail(_dot_)com:
Could someone please, provide a working code example of calling the
standard XPath 3.1 function  load-xquery-module() ?


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     xmlns:xs="http://www.w3.org/2001/XMLSchema";
     xmlns:math="http://www.w3.org/2005/xpath-functions/math";
     xmlns:functx="http://www.functx.com";
     exclude-result-prefixes="xs math functx"
     version="3.0">

     <xsl:variable name="functx-module"
select="load-xquery-module('http://www.functx.com', map {
'location-hints' :
'http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq' })"/>

     <xsl:template name="xsl:initial-template" match="/">
         <xsl:sequence
select="$functx-module?functions(xs:QName('functx:word-count'))?1('This
is a test.')"/>
     </xsl:template>

</xsl:stylesheet>


is one of the first I tried. Requires Saxon EE.


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>