<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="trip">
    <html>
      <head>
    	<title>
	  <xsl:value-of select="title"/>
    	</title>
      </head>
    <body>
      <h1><xsl:value-of select="title"/> (<xsl:value-of select="area"/>)</h1>
      <xsl:apply-templates select="route"/>
      <hr/>
    </body>
    </html>
  </xsl:template>

  <xsl:template match="route">
    <table border="1">
    <tr><th colspan="2">ルート</th></tr>
    <xsl:apply-templates/>
    </table>
  </xsl:template>

  <xsl:template match="unit">
    <tr><th colspan="1" bgcolor="skyblue">
    <xsl:number level="single" format="1" count="unit" />日目
    <xsl:value-of select="@date" />
    </th>
    <td>
    <xsl:apply-templates />
    </td></tr>
  </xsl:template>

  <xsl:template match="select">
    (<xsl:apply-templates select="option"/>)
  </xsl:template>

  <xsl:template match="option">
    <xsl:if test="position()>1" >または</xsl:if>
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="point">
    <xsl:if test="position()>1" >＝</xsl:if>
    <xsl:value-of select="name" />
  </xsl:template>

  <xsl:template match="between_points">
    [<xsl:value-of select="time" />]
  </xsl:template>


</xsl:stylesheet>

	

