<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" mode="summary"/>
      <hr/>
      <xsl:apply-templates select="route"/>
    </body>
    </html>
  </xsl:template>

  <xsl:template match="route" mode="summary">
    <table border="1">
    <tr><th>名称</th><th>時刻</th></tr>
    <xsl:apply-templates mode="summary"/>
    </table>
  </xsl:template>

  <xsl:template match="route">
    <xsl:apply-templates select="unit"/>
  </xsl:template>

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

  <xsl:template match="unit">
    ■<xsl:number level="single" format="1" count="unit" />日目
    <xsl:value-of select="@date" />
    <xsl:apply-templates select="point"/>
  </xsl:template>

  <xsl:template match="point" mode="summary">
    <tr>
    <td><xsl:value-of select="name"/></td>
    <td><xsl:value-of select="time"/></td>
    </tr>
  </xsl:template>

  <xsl:template  match="point">
    <p>【<xsl:value-of select="name"/>】
    <xsl:value-of select="text"/></p>
  </xsl:template>

</xsl:stylesheet>

	

