Miscellaneous

  Home arrow Miscellaneous arrow Transforming XML with XSLT and PHP
MISCELLANEOUS

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

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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    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

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - 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


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap