扩展Sharepoint XSL模板

扩展Sharepoint XSL模板,sharepoint,xslt,Sharepoint,Xslt,感谢您的支持,我提出了以下模板:- <xsl:variable name="Doc"> <xsl:call-template name="OuterTemplate.GetTitle"> <xsl:with-param name="Title" select="@DocumentLink1"/> </xsl:call-template> </xsl:variable> <a href="{substring-be

感谢您的支持,我提出了以下模板:-

<xsl:variable name="Doc">
  <xsl:call-template name="OuterTemplate.GetTitle">
    <xsl:with-param name="Title" select="@DocumentLink1"/>
  </xsl:call-template>
</xsl:variable>

<a href="{substring-before($Doc,',')}">
  <xsl:value-of select="substring-after($Doc,',')" />
</a>
此模板嵌套在无序列表中,li标记见下文。由于这段代码在html页面中有物理和视觉存在,而不存在任何内容,因此我想将li标记和ul标记添加到模板中。有人能告诉我如何做到这一点吗

<ul>
<li>
    <xsl:variable name="Doc">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@DocumentLink1"/>
        </xsl:call-template>
    </xsl:variable>
<a href="{substring-before($Doc,',')}">
    <xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>
<li>
<xsl:variable name="Doc">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@DocumentLink2"/>
        </xsl:call-template>
    </xsl:variable>
<a href="{substring-before($Doc,',')}">
    <xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>
<li>
<xsl:variable name="Doc">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@DocumentLink3"/>
        </xsl:call-template>
    </xsl:variable>
<a href="{substring-before($Doc,',')}">
    <xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>

我假设从你的链接到另一篇文章,你正在使用这里的内容查询Web部件


您需要使用XSLT页眉/页脚技术包装对该变量的调用。在我看到的几篇文章中,我特别展示了如何使用CQWP实现这一点。

您可以尝试使用xsl:if元素有条件地输出内容。您可以找到有关xsl:if如何工作@的更多信息,或者只使用您最喜欢的搜索引擎。

我对使用什么测试感到非常困惑?