Sharepoint 2010 仅显示特定附件

Sharepoint 2010 仅显示特定附件,sharepoint-2010,Sharepoint 2010,我试图根据列表项的名称列出其附件。但是我不知道如何将name属性放入if条件: <xsl:if test="????????"> <xsl:element name="SharePoint:AttachmentsField"> <xsl:attribute name="runat">server</xsl:attribute> <xsl:attribute name=

我试图根据列表项的名称列出其附件。但是我不知道如何将name属性放入if条件:

<xsl:if test="????????">
  <xsl:element name="SharePoint:AttachmentsField">
      <xsl:attribute name="runat">server</xsl:attribute>                        
      <xsl:attribute name="FieldName">Attachments</xsl:attribute>
      <xsl:attribute name="ControlMode">Display</xsl:attribute>
      <xsl:attribute name="Visible">true</xsl:attribute>
      <xsl:attribute name="ItemId">
         <xsl:value-of select="@ID"/>
      </xsl:attribute>
  </xsl:element>
</xsl:if>

服务器
附件
展示
真的

谁能帮助我?

您想如何获取列表附件?OOTB Web部件还是自定义Web部件?您似乎正在尝试使用内容查询或dataview Web部件。您好,谢谢您的回答。我创建了一个新表单,用于在SharePoint Designer中显示列表项。然后我调整了代码并添加了上面的行。代码正在运行,并显示所附文档。if子句用于其他属性,但我不知道如何获取document元素的名称