Creating input overviews

From FlightGear wiki
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.
  • keyboard.xsl
  • adding the reference to this file into your <input>.xml file:
    <?xml-stylesheet href="keyboard.xsl" type="text/xsl" ?>
    


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" encoding="UTF-8"/> 
<xsl:variable name="language" select="'en'"/>

<!--  
	$file version: 1.1 alpha [2009/03/08] TeXnicer$
	$revision:     2.0 [2016/11/09] TeXnier$
	
	Created: 2009/03/08 in cooperation with irc.flightgear.org/flightgear
	Thanks to cptf and raazor.
	
	This file is not maintained but you may have luck contacting:
	texnicer@web.de
	
	Usage: 
		- copy this file into the same directory of keyboard.xml
		- add 
			<?xml-stylesheet href="keyboard.xsl" type="text/xsl" ?>
		  to keyboard.xml, usually 2nd line should do it
		- open keyboard.xml with a browser of your choice
	
-->



<xsl:template match="/">
  <html>
	<head>
		<title>Keyboard-Profile Overview</title>
		<style type="text/css" rel="stylesheet">
		
		body {
			width:19cm;
			padding-left:1.5cm;
		}
		
		* {	
			font-size:12pt;
		}
		
		
		span.title { 
			font-size:18pt;
			font-family:sans-serif;
			font-weight:bold;
			color:#0f0f0f;
		}
		
		span.subtitle { 
			font-size:12pt;
			font-family:sans-serif;
			font-weight:bold;
			color:#0f0f0f;
		}
			
		th.toprule {
			border-top: 2pt #000 solid;
		}
		
		th.midrule {
			border-top: 1pt #000 solid;
		}
		
		th.bottomrule {
			border-bottom: 2pt #000 solid;
		}
		
		th.headline {
			background-color: #000;
			color: #FFF;
			font-weight:bold;
			padding-left:2pt;
		}
		
		th {
			font-family:sans-serif;
			text-align:left;
			padding-right:1cm;
		}
		
		th.number {
			padding-right:2pt;
		}
		
		td {	
			padding-right:2em;
			vertical-align:top;	
			padding-bottom:.2em;
		}
		
		td.number {
			text-align:right;
			padding-right:2pt;
		}
		
		
		td.footnote {
			align:right;
			text-align:right;
			padding-right:0pt;			
		}
		
		span.footnote{
			font-size:10pt;
			font-family:sans-serif;
		}
		
		span.sup {
			font-size:7pt;
			vertical-align: 1.2ex;
			padding-left:2pt;
			font-weight:bold;
		}
		</style>
	</head>
  <body>
    <span class="title">Keyboard-Profile Overview</span><br/>
    <span class="subtitle">http://www.flightgear.org/</span><br/>
    <span class="footnote">keyboard.xsl 2.0 [2016/11/09]</span>
    <table>
		<tr><th colspan="3" class="headline">Keyboard-Configuration</th></tr>
		<tr><th colspan="3" class="toprule"></th></tr>
		<tr><th>Description</th><th>Action</th><th class="number">Number</th></tr>
		<tr><th colspan="3" class="midrule"></th></tr>
	<xsl:for-each select="PropertyList/key">
		<tr>
			<td><xsl:value-of select="name"/></td>
			<td><xsl:value-of select="desc"/></td>
			<td class="number"><xsl:value-of select="@n"/></td>
		</tr>
	</xsl:for-each>
	<tr><th colspan="3" class="bottomrule"></th></tr>
    </table>
 </body>
 </html>

</xsl:template>

</xsl:stylesheet>