我有一张XSL表,可以很好地返回所有内容,然后在HTML文件的空div
中输出它。
如果我使用
<i class="material-icons circle">folder</i>
它工作正常,但如果我尝试做
<img src="images/yuna.jpg" alt="" class="circle">
我收到此错误:
NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
以下是我实际想要使用的行注释掉的代码。
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<ul class="collection">
<xsl:for-each select="lfm/tracks/track">
<xsl:sort order="descending" data-type="number" select="playcount"/>
<li class="collection-item avatar">
<i class="material-icons circle">folder</i> -
<!-- <img src="images/yuna.jpg" alt="" class="circle">-->
<span class="title">
<xsl:value-of select="name"/>
</span>
<p>
<xsl:value-of select="artist/name"/>
</p>
<p>
Playcount:
<xsl:value-of select="playcount"/>
</p>
<!--<a href="#!" class="secondary-content"><i class="material-icons">grade</i></a>-->
</li>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
</xsl:stylesheet>