Hi, I am trying to transform an XML file into HTML with PHP and XSL. It works ok with just XML and XSL but when I try to use it with PHP nothing prints out to the screen.
My PHP version is 4.2.2 and it has just been reconfigured with XSLT support and the sablotron library.

I don't know how to put my XML and XSL files onto this forum so you can see them Could anyone please gve me any PHP code that would use both files together and give me back HTML? Please please.

    a year later

    (This is my first post)

    LOL, I know this response is a bit late :rolleyes: but I wanted to try out the forum. And besides, you actually asked a questioned I (think I) know something about 🙂

    I'm basically a newbie myself, but I am been working with trying to get php(xml+xslt) to work and maybe I can give you a push.

    But since you have written your post there have been some development with php and its support for xslt.

    If you are still using versions before php5 check out this tutorial:
    http://www.zend.com/zend/tut/tutorial-wong3.php

    They have the script you asked for. And if you still have problems with your output (blank screen) search for some install guides for sablotron; you need to have all dll files correctly installed. I (think I) had similare problems when I tried to use xslt with php<5.

    If you have installed the newest version of php (php5+) check out this tutorial: http://www.zend.com/php5/articles/php5-xmlphp.php

    This script uses, if I have understood this right, some form of DOM handler with a new xslt library (this script is not compatible with earlier php xslt libraries). Once again, look for install guides for the new library (e.g. my download of php5 didn't include all necessary dll files) and you should be set.

    Good luck.

      Write a Reply...