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

  <xsl:output method="xml" version="1.0" encoding="US-ASCII" indent="yes"/>

  <!--
   *
   * This is a simple style sheet used to extract assertion IDs
   * and their descriptions from XML assertion documents.  The
   * XML documents may be spec or API assertion documents.  The
   * XML output of this transformation is then used as one of the
   * two inputs into the assertion coverage tool.
   *
   * To run the stylesheet on an XML assertion document cd to
   * $CTS_TOOLS_WS/tools/xsl-transformer/scripts
   * execute the run script and pass the xml file, the stylesheet, and
   * an optional output file (if no output file is specified the results
   * are written to standard output).  Example:
   *
   *   run xml_file xsl_stylesheet [output_file]
   *
   -->

  <xsl:template match="assertion">
    <xsl:element name="assertion">
      <xsl:element name="id">
	<xsl:value-of select="id"/>
      </xsl:element>
      <xsl:element name="description">
	<xsl:value-of select="description"/>
      </xsl:element>
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>

  <xsl:template match="/">
    <xsl:element name ="assertions">
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>

  <xsl:template match="@*|node()">
    <xsl:apply-templates/>
  </xsl:template>

</xsl:stylesheet>
