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  
Mobile Linux 
Case Studies 
iPad Development 
Download TestComplete 
Forums Sitemap 
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: 3 stars3 stars3 stars3 stars3 stars / 11
    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

    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC
    - Firefox Plugins You`re Not Using (and Should...
    - Working with MP3 ID3 Tags in FTP Server Usin...
    - How Switching to Linux Can Make Your Computi...
    - Set Up Your Home Office on Linux: a Guide fo...
    - Putty File Transfer Commands in SSH Protocol
    - Setting Up Ubuntu for Your Home Office
    - Installing Mint Linux





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 11 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek