<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html"/>
 
 <xsl:template match="/">
  <html><head><title>PhotoLine Shortcuts</title> </head>
   <body>
     <xsl:apply-templates />
 </body>
 </html>

 </xsl:template>
 
 <!-- Sortierung nach Titel
  <xsl:template match="PhotoLineShortcut">
   <table >
     <tr style="vertical-align:top;">
      <th>ID</th>
	 <th>Titel</th>
      <th>Shortcuts</th>
     </tr>
     <xsl:for-each select="Tag">
       <xsl:sort select="Title" order="descending" data-type="text" />
       <tr>
	   <td style="vertical-align:top; padding:1em"><xsl:value-of select="@no" /></td>	       
        <td style="vertical-align:top; padding:1em"><xsl:value-of select="Title" /></td>
        <td>
   		 <xsl:for-each select="Shortcuts/Keys">
   		 <xsl:sort select="." order="ascending" data-type="text" />
      	    	<p><xsl:value-of select="."/></p> 
	   	 </xsl:for-each>		             
	   </td>
       </tr>
     </xsl:for-each>
   </table>   
 </xsl:template>
 -->

 <!-- Sortierung nach Shortcut -->
 <xsl:template match="PhotoLineShortcut">
   <table >
     <tr style="vertical-align:top;">
      <th>ID</th>
	 <th>Titel</th>
      <th>Shortcuts</th>
     </tr>
     <xsl:for-each select="Tag/Shortcuts/Keys"> 
         <xsl:sort select="." order="descending" data-type="text" />
       <tr>
	   <td style="vertical-align:top; padding-right:1em"><xsl:value-of select="../../@no" /></td>	       
        <td style="vertical-align:top; padding-right:1em"><xsl:value-of select="../../Title" /></td>
        <td style="vertical-align:top;"><xsl:value-of select="."/></td>
       </tr>
      </xsl:for-each>
   </table>   
 </xsl:template>
 
 </xsl:stylesheet>