RE: [xsl] Call perl script within xsl?

Subject: RE: [xsl] Call perl script within xsl?
From: Sabrina Fords <Sabrina.Fords@xxxxxxxxxx>
Date: Tue, 29 Jan 2002 11:58:48 -0000

I want to be able to call extension functions from my xslt stylesheet
written in Perl. I'm using saxon processor as it's much faster than xalan. I
know this is possible with Xalan but just want to know if I can do this with
saxon. 

I know this might not be the best way to go about doing this but I'm doing
some research for my new project and trying to look at best way to call an
extension function. 

S

> -----Original Message-----
> From: Steve Ball [mailto:Steve.Ball@xxxxxxxxx]
> Sent: 29 January, 2002 1:00 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] Call perl script within xsl?
> 
> 
> Sabrina Fords wrote:
> 
> > Can you call a perl script within xsl?
> 
> 
> Firstly, you don't say why you want to call Perl from XSLT.
> That may help refine exactly what help you need
> (it may be the case that what you are endeavouring to do
> can be achieved using XSLT alone).
> 
> I don't use Perl (thank God!), but I've written an interface
> to the Tcl scripting language from the Gnome libxslt library
> called TclXSLT.  Apart from being able to invoke an XSLT
> transformation from Tcl, this package also allows the XSLT
> stylesheet to call into Tcl code (and Tcl can then call
> C/C++/whatever).  See http://tclxml.sf.net/tclxslt.html
> for more information (but bear in mind that the Web page
> is very incomplete at the moment).
> 
> Now, the point of my telling you this is that the way
> in which this occurs is important.  TclXSLT hides the
> scripting from the stylesheet by using extension elements
> and functions.  This encourages portability of your
> stylesheet, and IMO actually makes writing both the
> XSLT stylesheet and scripts easier (since the interfaces
> must be well-defined).  Think of EXSLT; it doesn't matter
> whether the XSLT processor is implemented using Java or C,
> your stylesheet is portable.
> 
> However, I've seen some examples of AxKit where the Perl
> code appears embedded inside the stylesheet.
> I believe that's bad.  Keep the XSLT stylesheet and the
> scripting separate, and connect them together using extensions.
> 
> HTHs,
> Steve Ball
> 
> -- 
> Steve Ball            |   XSLT Standard Library   | Training 
> & Seminars
> Zveno Pty Ltd         |     Web Tcl Complete      |   XML XSL Schemas
> http://www.zveno.com/ |      TclXML TclDOM        | Tcl, Web 
> Development
> Steve.Ball@xxxxxxxxx  
> +---------------------------+---------------------
> Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 
> 6242 4099
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not an intended recipient, please notify info@xxxxxxxxxx
immediately. Please note that some of our communications may contain
confidential information which it could be a criminal offence for you to
disclose or use without authority. This email is not intended nor should it
be taken to create any legal relations contractual or otherwise.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread