[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|