Sharepoint MOSS内容查询Web部件itemstyle.xsl
我有一个内容查询Web部件(CQWP),从新闻链接列表中提取URL和标题。CQWP使用ItemStyle.xsl中定义的XSLT样式Orange.News.Links 我需要对标题@Title0字段进行如下注释的排序,因为它会导致错误 有人知道是什么导致了这个错误吗非常感谢。XSLT代码如下所示:Sharepoint MOSS内容查询Web部件itemstyle.xsl,sharepoint,xslt,sharepoint-2007,web-parts,Sharepoint,Xslt,Sharepoint 2007,Web Parts,我有一个内容查询Web部件(CQWP),从新闻链接列表中提取URL和标题。CQWP使用ItemStyle.xsl中定义的XSLT样式Orange.News.Links 我需要对标题@Title0字段进行如下注释的排序,因为它会导致错误 有人知道是什么导致了这个错误吗非常感谢。XSLT代码如下所示: <xsl:template name="Orange.News.Links" match="Row[@Style='Orange.News.Links']" mode="itemstyle"&g
<xsl:template name="Orange.News.Links" match="Row[@Style='Orange.News.Links']" mode="itemstyle">
<xsl:param name="CurPos" />
<xsl:param name="Last" />
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@URL"/>
<xsl:with-param name="UrlColumnName" select="'URL'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="LinkTarget">
<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
</xsl:variable>
<xsl:variable name="SafeImageUrl">
<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="Header">
<xsl:if test="$CurPos = 1">
<![CDATA[<ul class="list_Links">]]>
</xsl:if>
</xsl:variable>
<xsl:variable name="Footer">
<xsl:if test="$Last = $CurPos">
<![CDATA[</ul>]]>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$Header" disable-output-escaping="yes" />
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="substring-before($DisplayTitle,', ')"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="@Description"/>
</xsl:attribute>
<!-- <xsl:sort select="@Title0"/> -->
<xsl:value-of select="@Title0">
</xsl:value-of>
</a>
</li>
<xsl:value-of select="$Footer" disable-output-escaping="yes" />
</xsl:template>
_空白
]]>
]]>
我需要对title@Title0字段进行排序
正如下面所评论的,因为
导致错误
有人知道这是什么原因吗
错误
是,
只能是
或
的子节点(以及XSLT 2.0中
的子节点)
建议:至少学习一门XSLT和XPath的迷你课程,这样您至少可以摸索基本概念
我需要对title@Title0字段进行排序
正如下面所评论的,因为
导致错误
有人知道这是什么原因吗
错误
是,
只能是
或
的子节点(以及XSLT 2.0中
的子节点)
建议:至少学习一门XSLT和XPath的迷你课程,这样您至少可以摸索基本概念