This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PHP integration with XSLT



cutlass wrote:

>this is a cocoon specific problem, possibly u may have to supply the correct
>media type with <xsl:output/> tag though, but in general i would suggest
>asking the nice folks over at cocoon.
>
Ok, I've tried to specify the correct media type using

    <xsl:output method="html" media-type="application/x-httpd-php"/>

but, as I've seen in the Cocoon FAQ some time ago, the xsl:output is 
dropped by the XSLT transformer (using Cocoon).
For this reason, the output is produced as it was a text/html media-type 
encoded...
In every case, Apache is unable to recognize the type of document from 
the included media-type specification.

>there is also the problem that a mixed processing may generate invalid
>xml/xslt.
>
I'm sure my XSLT produce a legal XML[HTML] output.

>one way of getting around this is to create a generic PHP handler that sends
>possibly a HTTP call to a url that cocoon parses and gets the xslt result
>then evals that code.
>
Ok, I've done this. But this approach to the problem cause two related 
substantial problems:

   1. The client must request documents like xxxxx.php (then, the PHP
      script send the HTTP call to Cocoon, retrieve the transformed
      document and process the PHP result, including the generated file)
      and not like xxxxx .xml (that's the thing I want!)
   2. The overall functionality and lightness of the transformation
      process is strongly degraded, because the entire process require
      3/4 transformation of an original document...

I'm sure that other people have encountered the same problem...
Thanx for your help.

Alessio Mazzieri



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]