View Single Post

Old 06-21-2007, 10:10 PM   #2 (permalink)
cleopatraugly
Junior Member
 
Join Date: Jun 2007
Posts: 1
Rep Power: 0 cleopatraugly is on a distinguished road
In my last article I covered the use of the expat functions available to PHP for parsing XML documents using the SAX method. The sample code was a class that read the XML document and generated the HTML to present the data in a nice table. This example was far from perfect due to the fact that the presentation of the data was not separate from the class code that had to parse the XML document. This meant that a slight modification to the HTML generated by the class could break the actual parsing functionality of the class. This is not the ideal way of doing things in a production environment, hence the purpose of this article in explaining how to parse XML documents using XSLT (eXtensible Stylesheet Language Transformations). XSLT is a language for transforming XML documents into other XML documents or HTML documents. I will not discuss XML, XSL or XSLT syntax in this article, for a good introduction to these please refer to the links at the end of this article.The focus of this article is on how to transform XML documents with XSLT using the Sablotron XSLT processor. More details at http://www.buzzycode.com/ShowArticles-id_328.aspx
__________________
cleopatraugly is offline   Reply With Quote