如何从通过XML生成的元素中删除空白行?

时间:2012-07-17 17:06:36

标签: html xml xslt

我正在修改xml.config文件,它在链接上方生成一个空行。不确定为什么会发生这种情况。我怎么能把它删除?

以下是list元素的xml.config代码:

            <li>
                <xsl:value-of select="$prefix" />
                <xsl:if test="number(ParentEntityID) != 0">
                    <!-- <span class="catMark">&gt;&gt;</span>&#160; -->
                </xsl:if>
                <a href="{concat('c-',EntityID,'-',ise:FormatStringForLink(SEName),'.aspx')}">
                    <xsl:if test="EntityID = $CategoryID or descendant::Entity/EntityID = $CategoryID">
                        <xsl:attribute name="style">font-weight:bold</xsl:attribute>
                    </xsl:if>
                    <xsl:value-of select="$eName"/>
                </a>


                <xsl:if test="count(child::Entity)&gt;0 and (EntityID = $CategoryID or descendant::Entity/EntityID = $CategoryID)">
                    <ul>
                        <xsl:apply-templates select="Entity">
                            <xsl:with-param name="prefix" select="concat($prefix, '&#160;&#0160;')"/>
                        </xsl:apply-templates>
                    </ul>
                </xsl:if>
            </li>

当页面加载时,它变为:

<li>
     &nbsp;&nbsp;
     <a href="c-56-holiday.aspx">Holiday</a>
</li>

enter image description here

0 个答案:

没有答案