Miscellaneous
  Home arrow Miscellaneous arrow Transforming XML with XSLT and PHP
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Transforming XML with XSLT and PHP
By: bluephoenix
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 6
    2003-10-12

    Table of Contents:
  • Transforming XML with XSLT and PHP
  • The XML Document
  • The XSLT Template
  • Transforming the Document
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Transforming XML with XSLT and PHP


    (Page 1 of 5 )

    In this tutorial, Timothy shows you how to use XSLT to transform XML documents into HTML documents. Of course, the use of PHP XSLT functions are highlighted.

    In one of my previous tutorials, Processing XML with PHP, I introduced you to the expat XML parser. The parser is sufficient for extracting information from an XML document and manipulating it in a simple event based manner. However, there may be times when it's desired to transform the XML document into a different format using XML StyLesheet Transforms (XSLT).

    XSLT is essentially a series of templates and rules for XML. It processes a document by applying the template patterns according to the prescribed rules. XSLT can be used to generate pretty much any type of file from an XML document, such as .svg, .cvs, or .pdf. In this tutorial we will use XSLT to transform an XML document into an HTML document and use PHP’s XSLT functions to apply those rules.

    The XSLT functions are not made available with a default PHP compilation. The Sablotron and expat libraries need to be available and PHP must be compiled with the --enable-xslt and --with-xslt-sablot options. More information, as well as links to obtain Sablotron and expat, are available at http://www.php.net/xslt.

    More Miscellaneous Articles
    More By bluephoenix


       · Hi, under php5 I got this down to the following:<?php$xsltProc = new...
     

    MISCELLANEOUS ARTICLES

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway