title: How do I select which view when adding document library web part to a page in my site definition?
body: <p>In my custom SharePoint 2010 site definition:</p>
  
  <ol>
  <li>I have a custom list instance in my site definition with multiple views...</li>
  <li>I have a page that I want to display one of the views on...</li>
  <li>In the page's Elements.xml definition, where can I select to show either the "Correspondence" or "Accounting" views shown in the list instance's Schema.xml below?</li>
  </ol>
  
  <p>XML has been cleaned up for simplicity of reading.</p>
  
  <p><strong>List Instance's Schema.xml</strong></p>
  
  <pre><code>&lt;List Title="Client Documents" Direction="none" Url="Client Documents" BaseType="1" Type="101" BrowserFileHandling="Permissive" EnableContentTypes="TRUE" DisableAttachments="TRUE" Catalog="FALSE" VersioningEnabled="TRUE" SendToLocation="|" ImageUrl="/_layouts/images/itdl.png" xmlns:ows="Microsoft SharePoint" xmlns:spctf="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms" xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
    &lt;MetaData&gt;
      &lt;ContentTypes&gt;...&lt;/ContentTypes&gt;
      &lt;Fields&gt;...&lt;/Fields&gt;
      &lt;Forms /&gt;
      &lt;Views&gt;
        ...
        &lt;View DisplayName="CORE Client - Accounting" BaseViewID="1" Type="HTML" MobileView="TRUE" ImageUrl="/_layouts/images/dlicon.png" XslLink="main.xsl" WebPartZoneID="Main" WebPartOrder="1" Url="Forms/CORE Client  Accounting.aspx" SetupPath="pages\viewpage.aspx"&gt;
          &lt;XslLink&gt;main.xsl&lt;/XslLink&gt;
          &lt;Query&gt;
            &lt;Where&gt;
              &lt;Eq&gt;
                &lt;FieldRef Name="ContentType" /&gt;
                &lt;Value Type="Computed"&gt;Client - Accounting&lt;/Value&gt;
              &lt;/Eq&gt;
            &lt;/Where&gt;
          &lt;/Query&gt;
          &lt;ViewFields&gt;...&lt;/ViewFields&gt;
          &lt;RowLimit Paged="TRUE"&gt;30&lt;/RowLimit&gt;
          &lt;Aggregations Value="Off" /&gt;
        &lt;/View&gt;
        &lt;View DisplayName="CORE Client - Correspondence" BaseViewID="1" Type="HTML" MobileView="TRUE" ImageUrl="/_layouts/images/dlicon.png" XslLink="main.xsl" WebPartZoneID="Main" WebPartOrder="1" Url="Forms/CORE Client  Correspondence.aspx" SetupPath="pages\viewpage.aspx"&gt;
          &lt;XslLink&gt;main.xsl&lt;/XslLink&gt;
          &lt;Query&gt;
            &lt;GroupBy Collapse="TRUE" GroupLimit="30"&gt;
              &lt;FieldRef Name="Client_x0020_Correspondence_x0020_Type" /&gt;
            &lt;/GroupBy&gt;
            &lt;Where&gt;
              &lt;Eq&gt;
                &lt;FieldRef Name="ContentType" /&gt;
                &lt;Value Type="Computed"&gt;Client - Correspondence&lt;/Value&gt;
              &lt;/Eq&gt;
            &lt;/Where&gt;
          &lt;/Query&gt;
          &lt;ViewFields&gt;...&lt;/ViewFields&gt;
          &lt;RowLimit Paged="TRUE"&gt;30&lt;/RowLimit&gt;
          &lt;Aggregations Value="Off" /&gt;
        &lt;/View&gt;
        ...
      &lt;/Views&gt;
    &lt;/MetaData&gt;
  &lt;/List&gt;
  </code></pre>
  
  <p><strong>Module's Elements.xml</strong></p>
  
  <pre><code>&lt;File Url="ClientDocumentsCorrespondence.aspx" Path="default.aspx" Type="GhostableInLibrary" &gt;
      &lt;Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/PLClientDocuments.aspx" /&gt;
      &lt;Property Name="Title" Value="GASOP Client Documents - Correspondence" /&gt;
      &lt;Property Name="ContentType" Value="Welcome Page" /&gt;
      &lt;AllUsersWebPart WebPartOrder="0" WebPartZoneID="zone1"&gt;...&lt;/AllUsersWebPart&gt;
      &lt;AllUsersWebPart WebPartOrder="1" WebPartZoneID="zone1"&gt;...&lt;/AllUsersWebPart&gt;
      &lt;View List="Client Documents"
          DisplayName=""
          Url=""
          DefaultView="FALSE"
          BaseViewID="1"
          Type="HTML"
          WebPartOrder="0"
          WebPartZoneID="zone2"
          ContentTypeID="0x"
          ID="g_4d8c86ec_b324_4f6a_a2e9_ba1a36466c68"
          Hidden="TRUE"&gt;
      &lt;![CDATA[&lt;webParts&gt;
          &lt;webPart xmlns="http://schemas.microsoft.com/WebPart/v3"&gt;
              &lt;metaData&gt;
              &lt;type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt;
              &lt;importErrorMessage&gt;Cannot import this Web Part.&lt;/importErrorMessage&gt;
              &lt;/metaData&gt;
              &lt;data&gt;
              &lt;properties&gt;...&lt;/properties&gt;
              &lt;/data&gt;
          &lt;/webPart&gt;
      &lt;/webParts&gt;]]&gt;
      &lt;/View&gt;
  &lt;/File&gt;
  </code></pre>