Using PHP 5s XSL Extension to Perform XSL Transformations
By Tony Marston2005-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"?>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".
<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>
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
