RE: XSLT import/include errors

Robby Pelssers <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <[email protected]>
That is possible but the how-to part depends on the Saxon version you are using.  You will need to dive into how to write extension functions for that particular implementation.

I used it a number of times with Saxon 8.7

http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html

http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html

But i never tried with the latest version of Saxon which works differently.

Robby
________________________________
Van: gelo1234 [[email protected]]
Verzonden: vrijdag 21 juni 2013 15:23
To: Cocoon Users
Onderwerp: Re: XSLT import/include errors

OK, one more question. Is it possible with Saxon/Xalan in C3 to invoke external Java function ?
I can't get it working:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
        xmlns:utils="java:org.example.Utils"
        exclude-result-prefixes="utils">

        <xsl:template match="Page">

                     <xsl:variable name="fileName" select="file"/>

                     <Root>
                           <xsl:value-of select="utils:exists($fileName)"/>
                     </Root>
        </xsl:template>

</xsl:stylesheet>

Tried Xalan, tried Saxon. Both generates some strange errors with XML Document.

Greetings,
Greg


2013/6/20 gelo1234 <[email protected]<mailto:[email protected]>>
The latest Saxon got the same _global_ variable context scope and doesn't allow overriding xsl:variables.
OK, I will fix that :)

Greetings,
Greg


2013/6/20 gelo1234 <[email protected]<mailto:[email protected]>>

Thank you! I will try to bring back Saxon :)

Greetings,
Greg


This was discused before in the mailing list [1], it's a two step process

* Add saxon dependency to pom file. [2]

I think it's better to try Saxon directly if you used to work with it. Xalan is usually faster but as you have to migrate already made templates from Saxon IMO it's better to switch the engine.

[1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
[2] http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results






The Future Group, dé maat in ondernemen



[The Future Group]<www.the-future-group.com>    [The Future Group kantoor]              Röntgenlaan 27 | 2719 DX Zoetermeer     [Mobiel nummer]                 06 15879926
[Web-site]              http://www.the-future-group.com [E-mail adres]          [email protected]
[Telefoonnummer]                +31 (0)79 - 363 2905    [LinkedIn account]
[Twitteraccount]                http://twitter.com/futuregroup
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.