<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/pool/xslt_ht.xslt" type="application/xml"?>
<?install location = "admin/pinw_help_keys.xslt"?>
<xsl:stylesheet
  xmlns = "http://www.w3.org/1999/xhtml"
  xmlns:d = "http://herbaer.de/xmlns/20051201/doc"
  xmlns:ht = "http://www.w3.org/1999/xhtml"
  xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
  xmlns:xl = "http://www.w3.org/1999/xlink"
  version = "1.0"
  exclude-result-prefixes = "d xl"
>
<!--
  Liste der Hilfe-Schlüssel zur Pinwand-Darstellung
  2020-06-13 Herbert Schiemann <h.schiemann@herbaer.de>
  Borkener Str. 167, 46284 Dorsten, Germany
  GPL Version 2 oder neuer
-->
<d:info xmlns="http://herbaer.de/xmlns/20051201/doc">
  <title>pinw_help_keys.xslt</title>
  <subtitle>Hilfe-Schlüssel zu Pinwand-Darstellung</subtitle>
  <date>2020-06-13</date>
  <author>
    <personname>
      <firstname>Herbert</firstname>
      <surname>Schiemann</surname>
    </personname>
    <email>h.schiemann@herbaer.de</email>
  </author>
</d:info>

<d:para>URI der Hilfe-Dateien</d:para>
<xsl:param name="p_helpfile" select="'/h/pinw/h.xhtml'"/>
<xsl:param name="p_keyfile" select="'/h/pinw/k.xhtml'"/>

<xsl:output method="xml" encoding="utf-8"/>

<d:para>Rahmen</d:para>
<xsl:template match="/">
  <html>
    <head>
      <title>Hilfe-Schlüssel zu Pinwand-Darstellung</title>
    </head>
    <body>
      <h1>Liste der Hilfe-Schlüssel</h1>
      <xsl:call-template name="list">
        <xsl:with-param name="file" select="$p_helpfile"/>
      </xsl:call-template>
      <xsl:call-template name="list">
        <xsl:with-param name="file" select="$p_keyfile"/>
      </xsl:call-template>
    </body>
  </html>
</xsl:template>

<d:para>
Liste der Hilfe-Schlüssel einer Hilfe-Datei
</d:para>
<xsl:template name="list">
  <xsl:param name="file"/>
  <div>
    <h2>
      <xsl:value-of select="$file"/>
    </h2>
    <ul>
      <xsl:apply-templates select="document($file)/ht:html/ht:body/ht:div/@id">
        <xsl:with-param name="file" select="$file"/>
        <xsl:sort/>
      </xsl:apply-templates>
    </ul>
  </div>
</xsl:template>

<d:para>
Listeneintrag zu einem Schlüssel
</d:para>
<xsl:template match="@id">
  <xsl:param name="file"/>
  <li>
    <a href="{$file}#{.}">
      <code><xsl:value-of select="."/></code>
    </a>
  </li>
</xsl:template>

</xsl:stylesheet>
