<?xml version="1.0"?>
<!-- Simplifies the output from from-relax.xsl. -->
<xsl:stylesheet
  version="1.0"
  xmlns="http://www.thaiopensource.com/trex"
  xmlns:trex="http://www.thaiopensource.com/trex"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  exclude-result-prefixes="trex">

<xsl:output encoding="iso-8859-1" indent="yes"/>

<xsl:strip-space elements="trex:*"/>

<xsl:template match="/|*|comment()">
  <xsl:copy>
   <xsl:copy-of select="@*"/>
   <xsl:apply-templates select="node()"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="trex:choice[count(*)=1]">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="trex:empty[count(../trex:*) != 1]">
</xsl:template>

</xsl:stylesheet>