H
hawat.thufir
Just for posterity:
[thufir@localhost w3school]$ pwd
/home/thufir/xalon/w3school
[thufir@localhost w3school]$ whoami
thufir
[thufir@localhost w3school]$ ll
total 24
-rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
-rw-rw-r-- 1 thufir thufir 546 Feb 19 09:18 foo.xsl
-rw-rw-r-- 1 thufir thufir 73 Feb 19 09:23 notes.txt
[thufir@localhost w3school]$ cat notes.txt
adapted from:
<http://www.w3schools.com/xsl/xsl_transformation.asp>
[thufir@localhost w3school]$ java -cp
/usr/share/java/xalan-j2.jar:/usr/share/java/xalan-j2-serializer.jar
org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.html
[thufir@localhost w3school]$ ll
total 32
-rw-rw-r-- 1 thufir thufir 224 Feb 19 09:24 foo.html
-rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
-rw-rw-r-- 1 thufir thufir 546 Feb 19 09:18 foo.xsl
-rw-rw-r-- 1 thufir thufir 73 Feb 19 09:23 notes.txt
[thufir@localhost w3school]$ cat foo.xml -n
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <catalog>
3 <cd>
4 <title>Empire Burlesque</title>
5 <artist>Bob Dylan</artist>
6 <country>USA</country>
7 <company>Columbia</company>
8 <price>10.90</price>
9 <year>1985</year>
10 </cd>
11 </catalog>
[thufir@localhost w3school]$ cat foo.xsl -n
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:template match="/">
7 <html>
8 <body>
9 <h2>My CD Collection</h2>
10 <table border="1">
11 <tr bgcolor="#9acd32">
12 <th align="left">Title</th>
13 <th align="left">Artist</th>
14 </tr>
15 <xsl:for-each select="catalog/cd">
16 <tr>
17 <td><xsl:value-of
select="title"/></td>
18 <td><xsl:value-of
select="artist"/></td>
19 </tr>
20 </xsl:for-each>
21 </table>
22 </body>
23 </html>
24 </xsl:template>
25
26 </xsl:stylesheet>
[thufir@localhost w3school]$ cat foo.html -n
1 <html>
2 <body>
3 <h2>My CD Collection</h2>
4 <table border="1">
5 <tr bgcolor="#9acd32">
6 <th align="left">Title</th><th align="left">Artist</th>
7 </tr>
8 <tr>
9 <td>Empire Burlesque</td><td>Bob Dylan</td>
10 </tr>
11 </table>
12 </body>
13 </html>
[thufir@localhost w3school]$ date
Sun Feb 19 09:25:04 EST 2006
[thufir@localhost w3school]$
-Thufir
[thufir@localhost w3school]$ pwd
/home/thufir/xalon/w3school
[thufir@localhost w3school]$ whoami
thufir
[thufir@localhost w3school]$ ll
total 24
-rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
-rw-rw-r-- 1 thufir thufir 546 Feb 19 09:18 foo.xsl
-rw-rw-r-- 1 thufir thufir 73 Feb 19 09:23 notes.txt
[thufir@localhost w3school]$ cat notes.txt
adapted from:
<http://www.w3schools.com/xsl/xsl_transformation.asp>
[thufir@localhost w3school]$ java -cp
/usr/share/java/xalan-j2.jar:/usr/share/java/xalan-j2-serializer.jar
org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.html
[thufir@localhost w3school]$ ll
total 32
-rw-rw-r-- 1 thufir thufir 224 Feb 19 09:24 foo.html
-rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
-rw-rw-r-- 1 thufir thufir 546 Feb 19 09:18 foo.xsl
-rw-rw-r-- 1 thufir thufir 73 Feb 19 09:23 notes.txt
[thufir@localhost w3school]$ cat foo.xml -n
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <catalog>
3 <cd>
4 <title>Empire Burlesque</title>
5 <artist>Bob Dylan</artist>
6 <country>USA</country>
7 <company>Columbia</company>
8 <price>10.90</price>
9 <year>1985</year>
10 </cd>
11 </catalog>
[thufir@localhost w3school]$ cat foo.xsl -n
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:template match="/">
7 <html>
8 <body>
9 <h2>My CD Collection</h2>
10 <table border="1">
11 <tr bgcolor="#9acd32">
12 <th align="left">Title</th>
13 <th align="left">Artist</th>
14 </tr>
15 <xsl:for-each select="catalog/cd">
16 <tr>
17 <td><xsl:value-of
select="title"/></td>
18 <td><xsl:value-of
select="artist"/></td>
19 </tr>
20 </xsl:for-each>
21 </table>
22 </body>
23 </html>
24 </xsl:template>
25
26 </xsl:stylesheet>
[thufir@localhost w3school]$ cat foo.html -n
1 <html>
2 <body>
3 <h2>My CD Collection</h2>
4 <table border="1">
5 <tr bgcolor="#9acd32">
6 <th align="left">Title</th><th align="left">Artist</th>
7 </tr>
8 <tr>
9 <td>Empire Burlesque</td><td>Bob Dylan</td>
10 </tr>
11 </table>
12 </body>
13 </html>
[thufir@localhost w3school]$ date
Sun Feb 19 09:25:04 EST 2006
[thufir@localhost w3school]$
-Thufir