1. Register and Download Xray, an XML, XSLT editor and processor.
2. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 2. A basic style sheet for the soccer results
use the XSLT as in the Listing 2 to transform the XML file as in the Listing 1.
(archive)
3. View the formatted HTML file.
4. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 3. A style sheet that computes team standings
compute the team standings in a table.
5. View the formatted HTML file.
=============================================
<META http-equiv="Content-Type" content="text/html">
<title>
Results of Group A</title></head>
<body><h1>
Results of Group A</h1>
<h2>Brazil versus Scotland</h2>
<p>Played on 10-Jun-1998</p>
<p>Result:
Brazil2,
Scotland1</p>
<h2>Morocco versus Norway</h2>
<p>Played on 10-Jun-1998</p>
<p>Result:
Morocco2,
Norway2</p>
<h2>Scotland versus Norway</h2>
<p>Played on 16-Jun-1998</p>
<p>Result:
Scotland1,
Norway1</p>
<h2>Brazil versus Morocco</h2>
<p>Played on 16-Jun-1998</p>
<p>Result:
Brazil3,
Morocco0</p>
<h2>Brazil versus Norway</h2>
<p>Played on 23-Jun-1998</p>
<p>Result:
Brazil1,
Norway2</p>
<h2>Scotland versus Morocco</h2>
<p>Played on 23-Jun-1998</p>
<p>Result:
Scotland0,
Morocco3</p>
==========================
<h1>Results of Group A</h1>
<table cellpadding="5">
<tr>
<td>Team</td>
<td>Played</td>
<td>Won</td>
<td>Drawn</td>
<td>Lost</td>
<td>For</td>
<td>Against</td>
</tr>
<tr>
<td>Brazil</td>
<td>3</td>
<td>2</td>
<td>0</td>
<td>1</td>
<td>6</td>
<td>3</td>
</tr>
<tr>
<td>Scotland</td>
<td>3</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>2</td>
<td>6</td>
</tr>
<tr>
<td>Morocco</td>
<td>3</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>Norway</td>
<td>3</td>
<td>1</td>
<td>2</td>
<td>0</td>
<td>5</td>
<td>4</td>
</tr>
</table>
沒有留言:
張貼留言