logo of blechtrottel.net blechtrottel.net
deutsch

XSLT in PHP4

How to get there

Since all the different methods for XSLT in PHP4 are deemed experimental they are not automatically included into a standard installation of PHP. (This, by the way, is also true for the methods that are available in PHP5.) Which of the methods mentioned here might work on your webspace depends on your provider. If you have websites on different servers at the same provider (which is usually something you have no influence upon), it may well be that a script runs perfectly on one site but fails on another.

First of all, therefore, you have to find out what your webspace is capable of. A first hint can be gathered by evoking the phpinfo() function, it offers some insight into the configuration of PHP for your webspace. Two sections are particularly interesting:

  1. The first one is called domxml and contains some interesting bottom lines. Without any mention of a module called libxslt you will not be able to use blechtrottel brodaktschns' favourite method.

    The domxml section
    Very promising: XSLT is active
  2. The second interesting section is xslt. If you find a listing of the Sablotron parser, you can use the second method explained below.

    The parser Sablotron
    Works too: Sablotron

Simpler way

A much simpler approach is to use php4xslttest.html from blechtrottel brodaktschns. This file shows you what method of XSLT should work on a certain webspace and will be discussed later.

Page 1 - Page 2 - Page 3 - Page 4