<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns="http://www.w3.org/1999/xhtml" 
		version="1.0">
<!-- 
Add the following line as the second one in keyboard.xml
<?xml:stylesheet type="text/xsl" href="Keyboard.xsl" ?>

This is for IE 5.01 The namespace might need changing for other versions.
IE 5.01 implements a draft XSLT spec
-->
<xsl:template match="/">
<html>
<head>
	<title>KeyBoard Bindings</title>
</head>
<body>
<h2>FlightGear Keyboard Bindings</h2>
<xsl:apply-templates />
</body>
</html>
</xsl:template>

<xsl:template match="PropertyList">
	<table style="background-color:#D0D0D0;" cellspacing="2"> 
		<tr style="background-color:#C0C0C0">
			<td> <strong> Key Value </strong> </td>
			<td> <strong> Key </strong> </td>
			<td> <strong> Description </strong> </td>
			<td> <strong> Property Bindings </strong> </td>
		</tr>
		<xsl:apply-templates/>
	</table>
</xsl:template>

<xsl:template match="key">
	<tr style="background-color: white" valign="top">
		<td> <strong><xsl:value-of select="@n"/></strong> </td>
		<td> <strong><xsl:value-of select="name"/></strong> </td>
		<td> <em><xsl:value-of select="desc"/></em> </td>
		<td> <xsl:apply-templates select="binding" /> </td>
	</tr>
	<xsl:apply-templates select="mod-shift"/>
	<xsl:apply-templates select="mod-up"/>
</xsl:template>

<xsl:template match="mod-shift">
	<tr style="background-color: white" valign="top">
		<td> <strong><xsl:value-of select="../@n"/></strong> </td>
		<td><strong>Shift+<xsl:value-of select="../name"/></strong></td> 
		<td><em><xsl:value-of select="desc"/></em></td>
		<td><xsl:apply-templates select="binding"/></td>
	</tr>
</xsl:template>

<xsl:template match="mod-up">
	<tr style="background-color: white" valign="top">
		<td> <strong><xsl:value-of select="../@n"/></strong> </td>
		<td><strong>Release key <xsl:value-of select="../name"/></strong></td> 
		<td><em><xsl:value-of select="desc"/></em></td>
		<td><xsl:apply-templates select="binding"/></td>
	</tr>
</xsl:template>

<xsl:template match="binding">
	<xsl:apply-templates select="command"/>
	<xsl:value-of select="property"/> 
	<xsl:apply-templates select="step"/>
	<xsl:apply-templates select="value"/><br/>
</xsl:template>

<xsl:template match="command">
	<strong><xsl:value-of select="../command"/>:</strong>
</xsl:template>

<xsl:template match="step">
        <strong> step by </strong> <xsl:value-of select="../step"/>.
</xsl:template>

<xsl:template match="value">
	Set to <xsl:value-of select="../value"/>.
</xsl:template>

</xsl:stylesheet>

