Listing 8: AirWings_xslt.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mc="http://www.airwings.org/register/">
<xsl:output method="html" version="4.01"
encoding="ISO-8859-1" indent="yes" media-type="text/html" />
<xsl:template match="/company">
<xsl:param name="CompanyName" select="child::company-name" />
<html>
<body bgcolor="#FFF2EC">
<font face="arial" size="2"><b><i>Air-Wings</i>
</b></font>
<p><font face="arial" size="1"><b>Available aircrafts:</b></font></p>
<table border="2" cellpadding="3" bgcolor="#FFC1A4">
<tr bgcolor="#FF8000">
<th><font face="verdana" size="1">Name</font></th>
<th><font face="verdana" size="1">Code</font></th>
<th><font face="verdana" size="1">Id</font></th>
<th><font face="verdana" size="1">Fly From</font></th>
<th><font face="verdana" size="1">Price</font></th>
<th><font face="verdana" size="1">Photo</font></th>
</tr>
<xsl:for-each select="//available-aircrafts" >
<tr align="center">
<td>
<font face="arial" size="1" color="#BD0000"><b><xsl:value-of
select="child::aircraft/attribute::name" /></b></font>
</td>
<td>
<font face="arial" size="1"><xsl:value-of
select="child::aircraft/attribute::code" /></font>
</td>
<td>
<font face="arial" size="1"><xsl:value-of
select="child::aircraft/attribute::id"/></font>
</td>
<td>
<font face="arial" size="1"><xsl:value-of
select="child::fly-from/attribute::year" /></font>
</td>
<td>
<font face="arial" size="1"><xsl:value-of
select="child::price/attribute::ammount" /></font>
<font face="arial" size="1"><xsl:value-of
select="child::price/attribute::currency" /></font>
</td>
<td>
<img>
<xsl:attribute name="src">
<xsl:value-of select=
"child::photo/child::image/attribute::src" /> </xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select=
"child::photo/child::image/attribute::alt" />
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="65" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="65" />
</xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.