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

<!-- $Id: extract-rfc.xsl,v 1.5 2007/06/06 10:14:30 bortzmeyer Exp $ -->

  <xsl:output method="xml"/>

  <xsl:param name="rfcs"/>

  <xsl:template match="//rfc">
    <xsl:if test="contains($rfcs, @num)">
    <xsl:copy> 
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
   </xsl:if>
  </xsl:template>

    <xsl:template match="@*|comment()|processing-instruction()">
      <xsl:copy/>
    </xsl:template>
    
    <xsl:template match="*">
      <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>                           
      <xsl:text>
      </xsl:text>
    </xsl:template>

  <xsl:template match="/">
    <bibliography><title>RFC</title>
    <xsl:apply-templates select="bibliography/rfc"/>
   </bibliography>
  </xsl:template>

</xsl:stylesheet>
