<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet 
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:iana="http://www.iana.org/assignments"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:import href="../_support/iana-registry.xsl" />

  <xsl:template name="iana:record_header">
    <tr>
      <th>Protocol/Registry</th>
      <th>Reference</th>
      <th>Registration Rule</th>
      <th>Expert</th>
    </tr>
  </xsl:template>

  <xsl:template match="iana:record">
    <xsl:apply-templates select="iana:registry"/>
    <xsl:apply-templates select="iana:registry/iana:registry"/>
  </xsl:template>

  <xsl:template match="/iana:registry/iana:record/iana:registry">
    <tr>
      <td><a href="{@id}"><b><xsl:value-of select="iana:title"/></b></a></td>
      <td><xsl:apply-templates select="iana:xref"/></td>
      <td></td>
      <td></td>
    </tr>
  </xsl:template>

  <xsl:template match="/iana:registry/iana:record/iana:registry/iana:registry">
    <xsl:if test = "iana:title">
      <tr>
        <td><a href="{../@id}/{../@id}.xml#{@id}"><xsl:value-of select="iana:title"/></a></td>
        <td><xsl:apply-templates select="iana:xref"/></td>
        <td><xsl:value-of select="iana:registration_rule"/></td>
        <td><xsl:value-of select="iana:expert"/></td>
      </tr>
    </xsl:if>
  </xsl:template>

</xsl:stylesheet>

