In one of my custom list schema, I have defined a custom view :
<View Type="HTML"
DisplayName="My wonderful view"
BaseViewID="2"
WebPartZoneID="Main"
DefaultView="FALSE"
TabularView="FALSE"
MobileView="TRUE"
MobileDefaultView="FALSE"
SetupPath="pages\viewpage.aspx"
ImageUrl="/_layouts/images/generic.png"
Url="wonderful.aspx">
<XslLink Default="TRUE">main.xsl</XslLink>
<Query>
<OrderBy>
<FieldRef Name="Created"
Ascending="FALSE" />
</OrderBy>
<GroupBy></GroupBy>
</Query>
<ViewFields>
<FieldRef Name="LinkTitle" />
<FieldRef Name="HistoryEntryType" />
<FieldRef Name="Field2" />
<FieldRef Name="Field3" />
</ViewFields>
<RowLimit Paged="TRUE">30</RowLimit>
<Aggregations Value="Off" />
<Toolbar Type="Standard" />
<ViewStyle ID="16"/>
</View>
The view definition looks like OK as I can see the view properly when I navigate to the list.
In another feature, I provision a webpart page file, with an xslt view web part to this list and this view :
<AllUsersWebPart ID="viewHistoryWebPart"
WebPartOrder="1"
WebPartZoneID="RightColumn"
>
<![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>$Resources:core,ImportErrorMessage;</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">My history</property>
<property name="Description" type="string">My WebPart</property>
<property name="ListUrl" type="string">Lists/mylist</property>
<property name="BaseViewID" type="int">2</property>
</properties>
</data>
</webPart>
</webParts>]]>
</AllUsersWebPart>
Unfortunately, when I run deploy the web part page the web part is displaying another view (the view with BaseType=0)
What am I making wrong?
PS: I don't want to use the <View> node in place of the <AllUserWebPart> because I'm also provisionning a Web Part connection, which is not working with <View>
[Edit], I've tested with <View> instead of <AllUsersWebPart>. This works, the correct view is applied. That let me think there is a problem with my xsltviewwebpart declaration.