View Single Post

  #9 (permalink)  
Old 09-06-2004
Berislav Lopac
 
Posts: n/a
Default Re: XSLT processing instruction to use PHP

Hayko Riemenschneider wrote:
> On 06.09.2004 00:31, Janwillem Borleffs wrote:
>
>> If you want to use PHP functions in your XSLT stylesheet, you can do
>> this through the document() function.

>
> I started on the examples. But it seems awefully complicated. Isn't
> there an another way to PHP parse the XML or XSL file before it gets
> XML/XSLT parsed?


Sure, just give them an .php extension.

If you do your transformations client-side, chance is that some browsers,
like IE, won't recognize the files as XML -- in that case, and if you're
running the scripts off Apache with MultiView enabled, add the .php
extension to their normal extensions (i.e. file.xml.php and file.xslt.php)
and call them without the .php (e.g. file.xml).

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.


Reply With Quote