<?xml version="1.0" encoding="utf-8" ?> 
<!-- 
	xml_01.xsl
	made by pstrainer@gmx.net 
	XSL-Stylesheet fuer Demo-Datei daten_*.xml
	Erzeugt eine einfache HTML-Tabelle
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" /> 

<!-- root template -->
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="screen">
/* <![CDATA[ */	
	body{font-size:10pt; margin-left:20px;}
	td,th{font-size:10pt;}
	.datab{background-color:#EFE; font-family:'Courier New',Courier,mono; width:300px; text-align:center;}
/* ]]> */
</style>
</head>
<body>
<table border="1" class="datab">
	<colgroup><col style="width:40%;" /><col style="width:60%;" /></colgroup>
	<tr><th>Name</th><th>Daten</th></tr>
	<xsl:for-each select="meine_daten">
	<xsl:apply-templates /> 
	</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

<!-- template erzeugt 1 Tabellen-Zeile / person -->
<xsl:template match="person">
<tr>
<td>
<xsl:value-of select="vorname" /> <xsl:value-of select="zuname" />
<xsl:apply-templates select="@*"/>
</td>
<td>
<xsl:apply-templates select="groesse|hobby|gebdat"/>
</td>
</tr>
</xsl:template>

<!-- template ergaenzt Attribut sex -->
<xsl:template match="@sex">
<div style="color:#00F;">(<xsl:value-of select="." />)</div>
</xsl:template>

<!-- template fuer alle Daten ausser den Namen -->
<xsl:template match="groesse|hobby|gebdat">
<xsl:value-of select="name()" />=<xsl:value-of select="." /><br />
</xsl:template>

</xsl:stylesheet>

<!-- made by pstrainer@gmx.net -->
