Ian's books
| CPU Magazine
| Ian's CPU Articles -->
XSLT Part 10: XSLT Output and Namespace Control
As described in the October 2003 issue of
CPU - Computer Power User
magazine.
Examples and Bonus Materials
A) Downloadable ZIP File
- Why not download the
whole set of examples as a ZIP file -- oct03.zip --
and install them on your own machine?
B) The Examples
- Simple XML Output
Data: data.xml (Plain text: data.txt)
XSLT: transform.xsl (Plain text: transform.txt)
Note that data.xml contains a processing instruction referencing the
external stylesheet transform.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
- Reducing Unneeded Namespace Declaration
Data: data-1.xml (Plain text: data-1.txt)
XSLT: transform-1.xsl (Plain text: transform-1.txt)
Note that data-1.xml contains a processing instruction referencing the
external stylesheet transform-1.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
- Setting an XSLT Document Default Namespace
Data: data-2.xml (Plain text: data-2.txt)
XSLT: transform-2.xsl (Plain text: transform-2.txt)
Note that data-2.xml contains a processing instruction referencing the
external stylesheet transform-2.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
- Multiple Namespaces in the XSLT Listing
Data: data-3.xml (Plain text: data-3.txt)
XSLT: transform-3.xsl (Plain text: transform-3.txt)
Note that data-3.xml contains a processing instruction referencing the
external stylesheet transform-3.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
- Multiple Namespaces in the Source Data
Data: data-4.xml (Plain text: data-4.txt)
XSLT: transform-4.xsl (Plain text: transform-4.txt)
Note that data-4.xml contains a processing instruction referencing the
external stylesheet transform-4.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
- Aliasing Namespaces: XSLT creating XSLT
Data: data-5.xml (Plain text: data-5.txt)
XSLT: transform-5.xsl (Plain text: transform-5.txt)
Note that data-5.xml contains a processing instruction referencing the
external stylesheet transform-5.xsl. Mozilla and/or
Netscape 7 load this stylesheet and displays the results of
the transformation.
C) Martin Honnen's Mozilla/Netscape Serialization Viewer
See last month's article:
http://www.iangraham.org/writing/cpu-articles/sep03/index.html
D) Other XSLT Engines
Tutorials, Books, References, and Tools