Re: FO->Area as XSLT extension function

On 03/19/2013 09:42 PM, Liam R E Quin wrote:
> On Tue, 2013-03-19 at 21:01 -0300, Arved Sandstrom wrote:
>> On 03/19/2013 10:46 AM, Jirka Kosek wrote:
> [...]
>>> http://saxonica.com/documentation/extensibility/integratedfunctions.xml
>>>
>> Maybe I'm missing something here, but how do you call one of these
>> integration functions from a stylesheet,
> http://saxonica.com/documentation/extensibility/integratedfunctions/ext-full-J.xml
> has an example using XQuery -
>     declare namespace eg="http://example.com/saxon-extension";
>     for $i in 1 to 10 return eg:shift-left(2, $i)"
>
> In XSLT you might use <xsl:value-of select="my:sock-count() div 2" />
>
> In other words the function is available anywhere you could use an XPath
> expresion.
>
> Liam
>
Appreciate the help and patience of you and Jirka. In this case, 
following the link you provided and now reading it more carefully, it 
looks like with Saxon 9HE you'd have to write an initializer class that 
implements net.sf.saxon.Initializer, I do the extension registration 
with the configuration in that initializer class, and the -init option 
is used when then running Saxon 9HE on the C.L.

It was the way the docs were written that threw me off some, not to 
mention not at first seeing that little HE/PE/EE capabilities table. The 
above approach, albeit not nearly as simple as the reflexive one, is 
straightforward.

Arved

Received on Wednesday, 20 March 2013 08:28:40 UTC