Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用xslt显示包含文件夹的点列表_Xslt_Sharepoint 2010 - Fatal编程技术网

如何使用xslt显示包含文件夹的点列表

如何使用xslt显示包含文件夹的点列表,xslt,sharepoint-2010,Xslt,Sharepoint 2010,我有自定义列表,需要使用XSLT在webPartPage中显示。我创建了视图,其中只有一个字段Title和setscope=“recursive”,但页面上只显示文件夹标题 <View BaseViewID="2" Type="HTML" TabularView="FALSE" Scope="Recursive"> <Toolbar Type="Standard" /> <ViewFields> <FieldRef Name=

我有自定义列表,需要使用XSLT在webPartPage中显示。我创建了视图,其中只有一个字段
Title
和set
scope=“recursive”
,但页面上只显示文件夹标题

<View BaseViewID="2" Type="HTML" TabularView="FALSE" Scope="Recursive">
    <Toolbar Type="Standard" />
    <ViewFields>
      <FieldRef Name="Title"/>
    </ViewFields>
    <RowLimit Paged="TRUE">10</RowLimit>
  </View>

10
我有链接它的功能

<File Path="MainPage/default.aspx" Url="default.aspx">
      <View WebPartOrder="1" WebPartZoneID="Main" BaseViewID="2" List="$Resources:core,lists_Folder;/RequestList">
        <![CDATA[
              <webParts>
                  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                      <metaData>
                          <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
                          <importErrorMessage>Невозможно импортировать эту веб-часть.</importErrorMessage>
                      </metaData>
                      <data>
                          <properties>
                              <property name="InitialAsyncDataFetch" type="bool">False</property>
                              <property name="ChromeType" type="chrometype">Default</property>
                              <property name="Title" type="string" />
                              <property name="Height" type="string" />
                              <property name="CacheXslStorage" type="bool">True</property>
                              <property name="ListDisplayName" type="string" />
                              <property name="AllowZoneChange" type="bool">True</property>
                              <property name="AllowEdit" type="bool">True</property>
                              <property name="XmlDefinitionLink" type="string" />
                              <property name="DataFields" type="string" />
                              <property name="Hidden" type="bool">False</property>
                              <property name="ListName" type="string">{39C129CE-1800-48EB-A8ED-1C304C1FE457}</property>
                              <property name="NoDefaultStyle" type="string" null="true" />
                              <property name="AutoRefresh" type="bool">False</property>
                              <property name="ViewFlag" type="string">8388621</property>
                              <property name="Direction" type="direction">NotSet</property>
                              <property name="AutoRefreshInterval" type="int">60</property>
                              <property name="AllowConnect" type="bool">True</property>
                              <property name="Description" type="string" />
                              <property name="AllowClose" type="bool">True</property>
                              <property name="ShowWithSampleData" type="bool">False</property>
                              <property name="ParameterBindings" type="string">
                                  &lt;ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/&gt;
                                  &lt;ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/&gt;
                                  &lt;ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/&gt;
                                  &lt;ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/&gt;
                                  &lt;ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" /&gt;
                                  &lt;ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" /&gt;
                                  &lt;ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" /&gt;
                                  &lt;ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" /&gt;
                                  &lt;ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" /&gt;
                                  &lt;ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /&gt;
                              </property>
                              <property name="Xsl" type="string" null="true" />
                              <property name="CacheXslTimeOut" type="int">86400</property>
                              <property name="WebId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
                              <property name="ListUrl" type="string" />
                              <property name="DataSourceID" type="string" />
                              <property name="FireInitialRow" type="bool">True</property>
                              <property name="ManualRefresh" type="bool">False</property>
                              <property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Html, TabularView, Hidden, Mobile</property>
                              <property name="ChromeState" type="chromestate">Normal</property>
                              <property name="AllowHide" type="bool">True</property>
                              <property name="PageSize" type="int">-1</property>
                              <property name="SampleData" type="string" null="true" />
                              <property name="BaseXsltHashKey" type="string" null="true" />
                              <property name="AsyncRefresh" type="bool">False</property>
                              <property name="HelpMode" type="helpmode">Modeless</property>
                              <property name="ListId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">39c129ce-1800-48eb-a8ed-1c304c1fe457</property>
                              <property name="DataSourceMode" type="Microsoft.SharePoint.WebControls.SPDataSourceMode, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">List</property>
                              <property name="AllowMinimize" type="bool">True</property>
                              <property name="TitleUrl" type="string">default.aspx</property>
                              <property name="CatalogIconImageUrl" type="string">/_layouts/images/itgen.png</property>
                              <property name="DataSourcesString" type="string" />
                              <property name="GhostedXslLink" type="string">main.xsl</property>
                              <property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
                              <property name="DisplayName" type="string" />
                              <property name="UseSQLDataSourcePaging" type="bool">True</property>
                              <property name="Width" type="string" />
                              <property name="ExportMode" type="exportmode">All</property>
                              <property name="XslLink" type="string">/_layouts/[]/xsl/archive.xsl</property>
                              <property name="ViewContentTypeId" type="string">0x</property>
                              <property name="HelpUrl" type="string" />
                              <property name="XmlDefinition" type="string" />
                              <property name="Default" type="string" />
                              <property name="TitleIconImageUrl" type="string" />
                              <property name="MissingAssembly" type="string">Невозможно импортировать эту веб-часть.</property>
                              <property name="SelectParameters" type="string" />
                          </properties>
                      </data>
                  </webPart>
              </webParts>
              ]]>
      </View>
    </File>

Невозможно импортировать эту веб-часть.
假的
违约
真的
真的
真的
假的
{39C129CE-1800-48EB-A8ED-1C304C1FE457}
假的
8388621
NotSet
60
真的
真的
假的
参数binding Name=“dvt\u sortdir”Location=“Postback;Connection”/
参数binding Name=“dvt\u sortfield”Location=“Postback;Connection”/
ParameterBinding Name=“dvt\U startposition”Location=“Postback”DefaultValue=“”/
ParameterBinding Name=“dvt\U firstrow”Location=“Postback;Connection”/
ParameterBinding Name=“OpenMenuKeyAccessible”Location=“资源(wss,OpenMenuKeyAccessible)”/
ParameterBinding Name=“打开菜单”Location=“资源(wss,打开菜单)”/
ParameterBinding Name=“select\u deselect\u all”Location=“Resource(wss,select\u deselect\u all)”/
ParameterBinding Name=“idPresEnabled”Location=“资源(wss,idPresEnabled)”/
ParameterBinding Name=“noannounces”Location=“资源(wss,noxinViewfy\u列表)”/
参数binding Name=“noannounceshowto”Location=“资源(wss,noxiveniewfy\u默认值)”/
86400
00000000-0000-0000-0000-000000000000
真的
假的
Html、表格视图、隐藏、移动
正常的
真的
-1
假的
无模式
39c129ce-1800-48eb-a8ed-1c304c1fe457
列表
真的
default.aspx
/_布局/图像/itgen.png
main.xsl
页面视图
真的
全部的
/_布局/[]/xsl/archive.xsl
0x
Невозможно импортировать эту веб-часть.
]]>
还有简单的xsl,就像这里一样

您需要将Scope=“Recursive”添加到第二个视图中(在其中定义WebPartZone等)

让我们试试:

<File Path="MainPage/default.aspx" Url="default.aspx">
  <View WebPartOrder="1" WebPartZoneID="Main" BaseViewID="2" List="$Resources:core,lists_Folder;/RequestList" Scope="Recursive">


不是所有熟悉XSLT的人都熟悉SharePoint文档和列表XML格式。如果您可以发布一个简短的XML示例,以演示XML的外观,并了解如何实现您想要的,并为您提供答案,这将非常有用。如果您可以发布当前正在使用的XSLT,这也将非常有用。