[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sablotron and PHP
On Thu, 13 Nov 2003 19:17:25 -0500, "Wendell Piez" <wapiez@xxxxxxxxxxxxxxxx> said: > Anything on topic -- that is, having to do with XSL -- is welcome. If it's > a product pitch, and therefore not about XSL but about the product, it'll > be less welcome. Fair enough. Then, mostly for the benefit of anyone searching the archives, I'll just say: a number of limitations of XSLT and XPath 1 can be overcome by use of scheme handlers if you're using PHP's XSLT functions via the Sablotron engine. The relevant function is xslt_set_scheme_handlers; it enables you to create custom functions to handle the document() function. Some ideas I've had since I stumbled across it: - document('sql:SELECT * FROM mytable') to run an SQL query inside an XSLT stylesheet - document('exists:myfile.xml') to see if a file exists - document('calc:(-b+sqrt(4*a*c))/(2*a)') to perform arbitrary calculations - document('seq:A-Z') to generate a sequence of letters or numbers ... but basically the sky's the limit. I'll be happy to talk directly to anyone who, like me a week ago, desperately needs this sort of functionality and can't find any doco. This is not a commercial service or plug for any product; I'm just doing what I can to help out my fellow geek. > But be warned -- one of the things that distinguishes an *XSL* application > (or XSLT or XPath application) is that it's portable to any conformant > processing environment. This is, indeed, the point, and the reason why I will say no more here, in the interests of brevity. Although it's not pure XSL, this trick is useful enough to be worth considering if your project is a good match and you're in need of some extra power. I wonder, tho, if other XSL engines have a similar callback capability. : Bat : ------------------------------------------------------------ Fruitbat PO Box 1269, Belconnen ACT 2616 Eric TF Bat http://flurf.net/ Paul Sleigh bat@xxxxxxxxx Karl Faustus von Aachen 0407-468-244 ------------------------------------------------------------ It all sounds rather naive and sentimental to be talking about children laughing and dancing and singing together when we all know perfectly well that what children do in real life is snarl and take drugs. - Douglas Adams, _The Salmon Of Doubt_ ------------------------------------------------------------ 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
|