Ian's books
| CPU Magazine
XSLT Part 5: Parameters, Variables and Conditional Branching
As described in the May 2003 issue of CPU - Computer Power User
magazine. This article builds on the examples described in the April 2003 issue. These examples are
found here (http://www.iangraham.org/writing/cpu-articles/apr03/)
Examples
A) Downloadable ZIP File
- There are lots of little examples here -- why not download the
whole lot as a ZIP file -- may03.zip --
and install them on your own machine?
B) The Raw Data
- demo.xml -- The simple example XML data
document used in the article -- this contains the raw data that
is transformed into HTML. A plain text version is available at
demo.txt. This is slightly different from
the demo file used in the
april '03
article, but the structure is the same.
- demo-withPI.xml -- This is basically
the same as demo.xml, but with an xml-stylesheet PI at the
beginning of the document referencng a style sheet named
transform.xsl . Note that you will need to edit this document
(and change the name of the stylesheet) to test out the examples
included here. Modern browsers (IE 6 / Mozilla 1+/Netscape 7+) are
able to take this XML data, apply the transform to it, and display
the generated HTML.
A plain text version of this document
is available at demo-withPI.txt.
C) The XSLT Stylesheets
Tutorials, Books, References, and Tools