Ian's books
| CPU Magazine
XSLT Part 11: XSLT Keys and Indexes
As described in the Nobember 2003 issue of CPU - Computer Power User
magazine.
Examples
A) Downloadable ZIP File
- There are several examples here -- why not download the
whole lot as a ZIP file -- nov03.zip --
and install them on your own machine?
B) The Data and Stylesheets
- data.xml -- The original XML data file. There
is not <?xml-stylesheet ...?> in this file. A plain text version is
available also:
data.txt.
- data-1.xml -- This is basically
the same as data.xml, but with an xml-stylesheet PI at the
beginning of the document referencng a style sheet named
transform-1.xsl . Mozilla-based browsers (Mozilla 1+/Netscape 7+)
are able to take this XML data file, apply the transform to it, and
display the generated HTML.
A plain text version of this document
is available at data-1.txt.
The stylesheet is also available, as XML data at
transform-1.xsl and as plain text
(transform-1.txt).
- data-2.xml -- This is basically
the same as data.xml, but with an xml-stylesheet PI at the
beginning of the document referencng a style sheet named
transform-2xsl , and with an added <item> elemnt at the end
nested inside <a>, <b>, and <c> elements.
Mozilla-based browsers (Mozilla 1+/Netscape 7+)
are able to take this XML data file, apply the transform to it, and
display the generated HTML.
A plain text version of this document
is available at data-2.txt.
The stylesheet is also available, as XML data at
transform-2.xsl and as plain text
(transform-2.txt).