May 2001
Intermediate to advanced
1088 pages
30h 13m
English
The best way to get a feel for how XSL style sheets work is to see one in action. Listing 23.1 shows an XML file describing two people. Notice the <?xml-stylesheet?> processing instruction that specifies the name of the XSL style sheet that accompanies this XML file.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="PersonToHTML.xsl"?>
<people>
<person>
<firstName>Samantha</firstName>
<middleName>Lauren</middleName>
<lastName>Tippin</lastName>
<age>7</age>
</person>
<person>
<firstName>Kaitlynn</firstName>
<middleName>Dawn</middleName>
<lastName>Tippin</lastName>
<age>4</age>
</person>
</people>
|
Listing 23.2 shows the PersonToHTML.xsl style sheet that translates ...
Read now
Unlock full access