処理:<xsl:apply-templates>

基本的な構成例
<xsl:template match="/">
  <xsl:apply-templates select="start/top/other"/>・・・(1)
</xsl:template>

<xsl:template match="other">                     ・・・(2)
  <H4 style="color:blue"><xsl:value-of/></H4>
</xsl:template>

*(1)でテンプレートを適用する要素と、その表示位置を指定
*(2)でHTMLタグやCSSを使いそのテンプレート内容を定義する

[サンプルXML文書を表示](下のフレームに)

XMLソース

<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="kyhp03.xsl"?>
<start>
  <top>KodayanHomepageのサイト構成
    <web>
      <osaka>大阪日本橋DOS/Vプロムナード</osaka>
      <css>CSSとDynamicHTML</css>
      <cgi>PerlでCGI</cgi>
      <java_ap>Java Applet</java_ap>
      <java_sc>Java Script</java_sc>
      <vbscript>VB Script</vbscript>
    </web>
    <other>
      <link>お気に入りLinks</link>
      <etc>その他
    	<info>お知らせ</info>
    	<prof>自己紹介</prof>
    	<hist>ホームページの履歴</hist>
      </etc>
    </other>
  </top>
  <end>以上です(00/9/25)</end>
</start>

XSLソース

<?xml version="1.0"  encoding="Shift_JIS"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  <xsl:template match="/">
    <xsl:apply-templates select="start/top/web"/>  <!--テンプレートを適用する要素と表示位置を指定 @-->
    <H3>その他の内容</H3>
    <xsl:apply-templates select="start/top/other"/><!--テンプレートを適用する要素と表示位置を指定 A-->
    <H5>以上です(2000/9/26)</H5>
  </xsl:template>
  
  <xsl:template match="web">			<!--@のテンプレート内容を定義-->
    <H4>リンク集</H4>
    <H4 style="margin-left:30;color:blue"><xsl:value-of select="osaka"/></H4>
    <H4 style="margin-left:30;color:magenta"><xsl:value-of select="css"/></H4>
    <H4 style="margin-left:30;color:navy"><xsl:value-of select="cgi"/></H4>
    <H4 style="margin-left:30;color:green"><xsl:value-of select="java_ap"/></H4>
    <H5>・・・・・・・・・・・・・・・・・・・・・・</H5>
  </xsl:template>
  <xsl:template match="other">		<!--Aのテンプレート内容を定義-->
    <P>全ての内容は「<xsl:value-of/>」です</P>
    <H4 style="margin-left:30;color:blue"><xsl:value-of select="link"/></H4>
    <H4 style="margin-left:30;color:green"><xsl:value-of select="etc/prof"/></H4>
  </xsl:template>
</xsl:stylesheet>

end(00/9/25)