Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Using PHP 5s XSL Extension to Perform XSL Transformations

By Tony Marston
2005-04-19


A Sample XML File

Here is a sample XML document. It can either be created by an external process, or it can be created by a PHP script such as by the procedure documented in Using PHP 5's DOM functions to create XML files from SQL data.

<?xml version="1.0"?>

<xample.person>
<person>
<person_id>PA</person_id>
<first_name>Pamela</first_name>
<last_name>Anderson</last_name>
<initials>pa</initials>
<star_sign>Virgo</star_sign>
</person>
<person>
<person_id>KB</person_id>
<first_name>Kim</first_name>
<last_name>Basinger</last_name>
<initials>kb</initials>
<star_sign>Sagittarius</star_sign>
</person>
<person>
.....
</person>
<actbar>
<button id="person_search.php">SEARCH</button>
<button id="reset">RESET</button>
<button id="finish">FINISH</button>
</actbar>
</xample.person>
An XML file contains a collection of nodes which must have an opening tag (<node>) and a corresponding closing tag (</node>). A node can contain either text or any number of child nodes. A node's opening tag may also contain any number of attributes in the format id="value".

Tutorial Pages:
» Intended Audience
» Prerequisites
» A Sample XML File
» XML File Contents
» A Sample XSL File
» XSL File Contents
» XSL Include Files
» Performing the XSL Transformation
» Sample Output
» References


 | Bookmark
Related Tutorials:
» Starting with XML
» Performing Client-Side XSL Transformations
» Create a Google Sitemap for your Web Site
» XML and Scripting Languages
» Parsing Comma-Separated Values
» XML Security Suite: Increasing the Security of E-Business

Ask A Question
characters left.