<?xml version="1.0" encoding="iso-2022-jp"?>
<s:stylesheet
  xmlns:s="http://www.w3.org/1999/XSL/Transform"
  xmlns=""
  xmlns:h1="http://www.w3.org/1999/xhtml"
  xmlns:h2="http://www.w3.org/2002/06/xhtml2"
  xmlns:d="http://suika.fam.cx/~wakaba/-temp/2004/04/21/nama#"
  version="1.0">
<s:output
  encoding="iso-2022-jp"
  method="html"/>

<s:template match="/d:diary">
  <html>
    <s:if test="@xml:lang">
      <s:attribute name="lang"><s:value-of select="@xml:lang"/></s:attribute>
    </s:if>
    <head>
      <title><s:apply-templates select="child::h2:h"/></title>
      <meta name="author" content="$B$A$e!<$V9b9;$J$^$b$NIt(B" />
      <link rev="made" href="mailto:chuubu@suika.fam.cx" />
      <link rel="stylesheet" href="/s/default/xhtml1" media="all" />
      <link rel="shortcut icon" href="/chuubu/favicon.ico" type="application/vnd.microsoft.icon" />
      <link rel="next" href="http://fuyuki.jugem.cc/" />
    </head>
    <body>
      <h1><s:apply-templates select="child::h2:h"/></h1>

      <s:apply-templates select="child::d:day"/>
    </body>
  </html>
</s:template>

<s:template match="d:day">
  <div class="section day">
    <h2 id="D{@year}-{@month}-{@day}">
      <s:value-of select="concat (@year, '$BG/(B', @month, '$B7n(B', @day, '$BF|(B')"/>
    </h2>

    <div class="body">
      <div class="main">
        <s:apply-templates select="child::h2:section"/>
      </div>
      
      <s:if test="child::d:comment">
        <dl class="comments">
          <s:apply-templates select="child::d:comment"/>
        </dl>
      </s:if>
    </div>
  </div>
</s:template>

<s:template match="h2:section">
  <div class="section">
    <h3>
      <s:apply-templates select="child::h2:h"/>
    </h3>

    <div class="body">
      <s:apply-templates select="child::*[not (local-name() = 'h' or local-name() = 'author')]"/>
    </div>
  </div>
</s:template>

<s:template match="d:comment">
  <dt><s:apply-templates select="child::d:author"/></dt>
  <dd><s:apply-templates select="child::*[not (local-name() = 'author')]"/></dd>
</s:template>

<s:template match="h2:p">
  <p><s:apply-templates/></p>
</s:template>

<s:template match="d:fig">
  <div class="fig">
    <div class="body"><s:apply-templates select="child::d:figBody"/></div>
    <div class="caption"><s:apply-templates select="child::d:caption"/></div>
  </div>
</s:template>

<s:template match="h2:a">
  <a href="{@href}" title="URI $B;2>H(B: &lt;{@href}>"><s:apply-templates/></a>
</s:template>

<s:template match="h1:img">
  <img src="{@src}" alt="{@alt}"/>
</s:template>

</s:stylesheet>
