<?xml version="1.0"?>
<?xml-stylesheet href="/pool/xslt_ht.xslt" type="application/xml"?>
<xsl:stylesheet
  xmlns = "http://www.w3.org/1999/xhtml"
  xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
  xmlns:d = "http://herbaer.de/xmlns/20051201/doc"
  xmlns:ht = "http://www.w3.org/1999/xhtml"
  xmlns:db = "http://docbook.org/ns/docbook"
  xmlns:xl = "http://www.w3.org/1999/xlink"
  version = "1.0"
  exclude-result-prefixes = "xl"
>

<d:info xmlns="http://herbaer.de/xmlns/20051201/doc">
  <title>langcodes_xhtml.xslt</title>
  <subtitle>XHTML-Dokument mit Bezeichnungen der Sprachen</subtitle>
  <date>2017-06-15</date>
  <author>
    <personname>
      <firstname>Herbert</firstname>
      <surname>Schiemann</surname>
    </personname>
    <email>h.schiemann@herbaer.de</email>
  </author>
</d:info>

<d:para>
Die ID der Tabelle
</d:para>
<xsl:param name="g_tabid" select="'tab_langcodes'"/>

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

<d:para>Wurzel</d:para>
<xsl:template match="/">
  <html xml:lang="de">
    <head>
      <title>Bezeichnungen der Sprachen</title>
    </head>
    <body>
      <xsl:apply-templates select="db:article/db:informaltable[@xml:id = $g_tabid]//db:row"
      />
    </body>
  </html>
</xsl:template>

<d:para>
Ein Satz für jede Tabellenzeile
</d:para>
<xsl:template match="db:row">
  <xsl:variable name="lang" select="db:entry[1]/db:literal"/>
  <p>
    Ich spreche
    <a>
      <xsl:attribute name="xml:id">
        <xsl:value-of select="concat ('l_', $lang)"/>
      </xsl:attribute>
      <xsl:value-of select="db:entry[2]"/>
    </a>
  </p>
</xsl:template>

</xsl:stylesheet>
