-1
xmlファイル内の要素を数え、最終出力にこの数値を表示する変数をxslドキュメントに作成する必要があります。ここでは変数宣言を正しく行ったと思います。どのように おかげXSL、要素数の変数
<xsl:template match="/">
<html>
<head>
<title>Albumy Burzum</title>
<style type="text/css">
h2 { font-size: 40px; font-family: arial; color: #000000; }
</style>
</head>
<body>
<h2>Albumy Burzum</h2>
<table border="5">
<tr>
<th>name</th>
<th>year</th>
<th>genre</th>
<th>label</th>
<th>songs_number</th>
<th>link</th>
</tr>
<xsl:apply-templates />
</table>
<h3>Number of elements:</h3>
</body>
</html>
</xsl:template>
<xsl:attribute-set name="reference">
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
</xsl:attribute-set>
<xsl:template match="link">
<xsl:element name="a" use-attribute-sets="reference"><xsl:value-of select="link"/></xsl:element>
<br/>
</xsl:template>
<xsl:template match="album">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="year"/></td>
<td><xsl:value-of select="genre"/></td>
<td><xsl:value-of select="label"/></td>
<td><xsl:value-of select="songs_number"/></td>
<td><xsl:value-of select="link"/></td>
</tr>
</xsl:template>
<xsl:variable name="countElements">
<xsl:value-of select="count(album)"/>
</xsl:variable>
お返事ありがとうございますが、私はただ考え出した – coldman1
答えが正しい場合は、それを合格とマークしてください。 –