xsltでhtmlページを作成して、xmlをHTMLページにフォーマットしていますが、値が繰り返されていますが、xsl、xml、htmlの理由はわかりません。私は私の繰り返し値がどこに直接現れるのかを示しました。ありがとうございました!XSLT予期しない繰り返しのテキスト
<fieldset>
<legend>Joys of a MAD man</legend><ol>
Joys of a MAD man *********** Why is the title repeated? ************
<li>Slow Moving<a href="./Music/Splintz - Joys of a MAD Man/Slow Moving.mp3">
[Download]
</a></li>
</ol></fieldset>
マイXML
<albums>
<album>
<title>Joys of a MAD man</title>
<track>Slow Moving</track>
</album>
<album>
<title>Single</title>
<track>None</track>
</album>
</albums>
し、最終的に私のXSL
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="album">
<fieldset>
<legend><xsl:value-of select="title/text()" /></legend>
<ol>
<xsl:apply-templates />
</ol>
</fieldset>
</xsl:template>
<xsl:template match="track">
<li>
<xsl:value-of select="text()" />
<a>
<xsl:attribute name="href">
<xsl:text>./Music/Splintz - Joys of a MAD Man/</xsl:text>
<xsl:value-of select="text()"/>
<xsl:text>.mp3</xsl:text>
</xsl:attribute>
[Download]
</a>
</li>
</xsl:template>
</xsl:stylesheet>
また、タイトル要素に空のテンプレートを追加する: ' ' –
user268396