3 Structure Examples

The following example shows a view returned through the ExportList method. See [MS-WSSCAP] section 3.1.4.9, for a specification of ExportList. The view contains a query that filters for items whose title equals "MyTitle" that display three fieldsAttachments, LinkTitle, and Modified.

 <View Name="{9C252FCA-B070-46DC-B89F-22FC1A01D40F}" Type="HTML" DisplayName="MyListView" Url="Lists/Announcements/MyListView.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/announce.png" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
   <Query>
     <Where>
       <Eq>
         <FieldRef Name="Title" />
         <Value Type="Text">MyTitle</Value>
       </Eq>
     </Where>
   </Query>
   <ViewFields>
     <FieldRef Name="Attachments" />
     <FieldRef Name="LinkTitle" />
     <FieldRef Name="Modified" />
   </ViewFields>
   <RowLimit Paged="TRUE">100</RowLimit>
   <Aggregations Value="Off" />
 </View>

The following example shows a list schema returned through the ExportList method. See [MS-WSSCAP] section 3.1.4.9 for a specification of ExportList. Some components that specify the rendering of views and fields, which are not specified in this document, have been removed for brevity and are marked as "[removed for brevity]".

  
 <List Name="{16DC665B-DC24-476A-A7FD-EB6C3B02527C}" Title="Some New Title" Description="" Direction="2" BaseType="0" FeatureId="{00BFEA71-DE22-43B2-A848-C05709900100}" ServerTemplate="100" Url="Lists/Some Custom List via RPC" OrderedList="TRUE" PublicList="TRUE" VersioningEnabled="TRUE" MajorVersionLimit="9" MajorWithMinorVersionsLimit="10" DraftVersionVisibility="2" DefaultItemOpen="1" HiddenList="TRUE" DisableAttachments="TRUE" FolderCreation="FALSE" EmailAssignTo="TRUE" ModerationType="TRUE" DisableDeployWithDependentList="TRUE" DisableDeployingList="TRUE" AllowDeletion="FALSE" EnableContentTypes="TRUE" AllowEveryoneViewItems="TRUE" CacheSchema="TRUE" Version="67">
   <MetaData>
     <Views>
       <View Name="{D24FB901-5836-4CC9-8F86-4CA4B53B5B51}" DefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="Lists/Some Custom List via RPC/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png">
         <ViewFields>
           <FieldRef Name="DocIcon" />
           <FieldRef Name="LinkTitle" />
           <FieldRef Name="_ModerationStatus" />
         </ViewFields>
         <GroupByHeader>
           [removed for brevity]
         </GroupByHeader>
  
         <GroupByFooter>
           [removed for brevity]
         </GroupByFooter>
  
         <ViewHeader>
           [removed for brevity]
         </ViewHeader>
  
         <ViewBidiHeader>
           [removed for brevity]
         </ViewBidiHeader>
  
         <ViewBody>
           [removed for brevity]
         </ViewBody>
  
         <ViewFooter>
           [removed for brevity]
         </ViewFooter>
  
         <RowLimitExceeded>
           [removed for brevity]
         </RowLimitExceeded>
         
         <PagedRowset>
           [removed for brevity]
         </PagedRowset>
  
         <PagedClientCallbackRowset>
           [removed for brevity]
         </PagedClientCallbackRowset>
  
         <PagedRecurrenceRowset>
           [removed for brevity]
         </PagedRecurrenceRowset>
  
         <RowLimit Paged="TRUE">100</RowLimit>
  
         <ViewEmpty>
           [removed for brevity]
         </ViewEmpty>
  
         <Toolbar Type="Standard" />
         
         <Script>
           [removed for brevity]
         </Script>
  
         <Query>
           <OrderBy>
             <FieldRef Name="ID" />
           </OrderBy>
         </Query>
       </View>
     </Views>
     <Fields>
       <Field ID="{03e45e84-1992-4d42-9116-26f756012634}" RowOrdinal="0" Type="ContentTypeId" Sealed="TRUE" ReadOnly="TRUE" Hidden="TRUE" DisplayName="Content Type ID" Name="ContentTypeId" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentTypeId" ColName="tp_ContentTypeId" FromBaseType="TRUE" />
       <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="Title" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" FromBaseType="TRUE" ColName="nvarchar1" />
       <Field ID="{34ad21eb-75bd-4544-8c73-0e08330291fe}" ReadOnly="TRUE" Type="Note" Name="_ModerationComments" DisplayName="Approver Comments" Hidden="FALSE" CanToggleHidden="TRUE" Filterable="FALSE" Sortable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_ModerationComments" FromBaseType="TRUE" ColName="ntext1" />
       <Field ID="{39360f11-34cf-4356-9945-25c44e68dade}" ReadOnly="TRUE" Hidden="TRUE" Type="Text" Name="File_x0020_Type" DisplaceOnUpgrade="TRUE" DisplayName="File Type" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="File_x0020_Type" FromBaseType="TRUE" ColName="nvarchar2" />
       <Field ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}" ColName="tp_ModerationStatus" RowOrdinal="0" ReadOnly="TRUE" Type="ModStat" Name="_ModerationStatus" DisplayName="Approval Status" Hidden="FALSE" CanToggleHidden="TRUE" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_ModerationStatus" FromBaseType="TRUE">
         <CHOICES>
           <CHOICE>0;#Approved</CHOICE>
           <CHOICE>1;#Rejected</CHOICE>
           <CHOICE>2;#Pending</CHOICE>
           <CHOICE>3;#Draft</CHOICE>
           <CHOICE>4;#Scheduled</CHOICE>
         </CHOICES>
         <Default>0</Default>
       </Field>
       <Field ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" ColName="tp_ID" RowOrdinal="0" ReadOnly="TRUE" Type="Counter" Name="ID" PrimaryKey="TRUE" DisplayName="ID" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ID" FromBaseType="TRUE" />
       <Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" RowOrdinal="0" Type="Text" DisplayName="Content Type" ReadOnly="TRUE" Name="ContentType" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentType" ColName="tp_ContentType" Group="_Hidden" PITarget="MicrosoftWindowsSharePointServices" PIAttribute="ContentTypeID" FromBaseType="TRUE" />
       <Field ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" ColName="tp_Modified" RowOrdinal="0" ReadOnly="TRUE" Type="DateTime" Name="Modified" DisplayName="Modified" StorageTZ="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Modified" FromBaseType="TRUE" />
       <Field ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" ColName="tp_Created" RowOrdinal="0" ReadOnly="TRUE" Type="DateTime" Name="Created" DisplayName="Created" StorageTZ="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Created" FromBaseType="TRUE" />
       <Field ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" ColName="tp_Author" RowOrdinal="0" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Author" DisplayName="Created By" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Author" FromBaseType="TRUE" />
       <Field ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" ColName="tp_Editor" RowOrdinal="0" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Editor" DisplayName="Modified By" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Editor" FromBaseType="TRUE" />
       <Field ID="{26d0756c-986a-48a7-af35-bf18ab85ff4a}" ColName="tp_HasCopyDestinations" RowOrdinal="0" Sealed="TRUE" Hidden="TRUE" ReadOnly="TRUE" Type="Boolean" Name="_HasCopyDestinations" DisplaceOnUpgrade="TRUE" DisplayName="Has Copy Destinations" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_HasCopyDestinations" FromBaseType="TRUE" />
       <Field ID="{6b4e226d-3d88-4a36-808d-a129bf52bccf}" ColName="tp_CopySource" RowOrdinal="0" Sealed="TRUE" Hidden="TRUE" ReadOnly="TRUE" Type="Text" Name="_CopySource" DisplaceOnUpgrade="TRUE" DisplayName="Copy Source" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_CopySource" FromBaseType="TRUE" />
       <Field ID="{d4e44a66-ee3a-4d02-88c9-4ec5ff3f4cd5}" ColName="tp_Version" RowOrdinal="0" Hidden="TRUE" ReadOnly="TRUE" Type="Integer" SetAs="owshiddenversion" Name="owshiddenversion" DisplayName="owshiddenversion" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="owshiddenversion" FromBaseType="TRUE" />
       <Field ID="{f1e020bc-ba26-443f-bf2f-b68715017bbc}" ColName="tp_WorkflowVersion" RowOrdinal="0" Hidden="TRUE" ReadOnly="TRUE" Type="Integer" Name="WorkflowVersion" DisplaceOnUpgrade="TRUE" DisplayName="Workflow Version" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="WorkflowVersion" FromBaseType="TRUE" />
       <Field ID="{7841bf41-43d0-4434-9f50-a673baef7631}" ColName="tp_UIVersion" RowOrdinal="0" ReadOnly="TRUE" Type="Integer" Name="_UIVersion" DisplaceOnUpgrade="TRUE" DisplayName="UI Version" Hidden="TRUE" CanToggleHidden="TRUE" Required="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_UIVersion" FromBaseType="TRUE" />
       <Field ID="{dce8262a-3ae9-45aa-aab4-83bd75fb738a}" ColName="tp_UIVersionString" RowOrdinal="0" ReadOnly="TRUE" Type="Text" Name="_UIVersionString" DisplaceOnUpgrade="TRUE" DisplayName="Version" CanToggleHidden="TRUE" Required="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_UIVersionString" FromBaseType="TRUE" />
       <Field ID="{67df98f4-9dec-48ff-a553-29bece9c5bf4}" ColName="tp_HasAttachment" RowOrdinal="0" Type="Attachments" Name="Attachments" DisplayName="Attachments" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Attachments" FromBaseType="TRUE" />
       <Field ID="{503f1caa-358e-4918-9094-4a2cdc4bc034}" ReadOnly="TRUE" Type="Computed" Name="Edit" Sortable="FALSE" Filterable="FALSE" DisplayName="Edit" ClassInfo="Icon" AuthoringInfo="(link to edit item)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Edit" FromBaseType="TRUE">
         <DisplayPattern>
           <IfHasRights>
             <RightsChoices>
               <RightsGroup PermEditListItems="required" />
             </RightsChoices>
             <Then>
               <HTML><![CDATA[<a href="]]></HTML>
               <URL Cmd="Edit" />
               <HTML><![CDATA[" onclick="GoToLink(this);return false;" target="_self">]]></HTML>
               <HTML><![CDATA[<img border="0" alt="]]></HTML>
               <HTML>Edit</HTML>
               <HTML><![CDATA[" src="/_layouts/images/edititem.gif">]]></HTML>
               <HTML><![CDATA[</a>]]></HTML>
             </Then>
             <Else>
               <HTML><![CDATA[&nbsp;]]></HTML>
             </Else>
           </IfHasRights>
         </DisplayPattern>
       </Field>
       <Field ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" ReadOnly="TRUE" Type="Computed" Name="LinkTitleNoMenu" DisplayName="Title" Dir="" DisplayNameSrcField="Title" AuthoringInfo="(linked to item)" EnableLookup="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitleNoMenu" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="Title" />
           <FieldRef Name="LinkFilenameNoMenu" />
         </FieldRefs>
         <DisplayPattern>
           <IfEqual>
             <Expr1>
               <LookupColumn Name="FSObjType" />
             </Expr1>
             <Expr2>1</Expr2>
             <Then>
               <Field Name="LinkFilenameNoMenu" />
             </Then>
             <Else>
               <HTML><![CDATA[<a onfocus="OnLink(this)" href="]]></HTML>
               <URL />
               <HTML><![CDATA[" ONCLICK="GoToLink(this);return false;" target="_self">]]></HTML>
               <Column HTMLEncode="TRUE" Name="Title" Default="(no title)" />
               <IfEqual>
                 <Expr1>
                   <GetVar Name="ShowAccessibleIcon" />
                 </Expr1>
                 <Expr2>1</Expr2>
                 <Then>
                   <HTML><![CDATA[<img src="/_layouts/images/blank.gif" class="ms-hidden" border=0 width=1 height=1 alt="]]></HTML>
                   <HTML>Use SHIFT+ENTER to open the menu (new window).</HTML>
                   <HTML><![CDATA[">]]></HTML>
                 </Then>
               </IfEqual>
               <HTML><![CDATA[</a>]]></HTML>
               <IfNew>
                 <HTML><![CDATA[<IMG SRC="/_layouts/1033/images/new.gif" alt="]]></HTML>
                 <HTML>New</HTML>
                 <HTML><![CDATA[">]]></HTML>
               </IfNew>
             </Else>
           </IfEqual>
         </DisplayPattern>
       </Field>
       <Field ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" ReadOnly="TRUE" Type="Computed" Name="LinkTitle" DisplayName="Title" DisplayNameSrcField="Title" ClassInfo="Menu" AuthoringInfo="(linked to item with edit menu)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkTitle" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="Title" />
           <FieldRef Name="LinkTitleNoMenu" />
           <FieldRef Name="_EditMenuTableStart" />
           <FieldRef Name="_EditMenuTableEnd" />
         </FieldRefs>
         <DisplayPattern>
           <FieldSwitch>
             <Expr>
               <GetVar Name="FreeForm" />
             </Expr>
             <Case Value="TRUE">
               <Field Name="LinkTitleNoMenu" />
             </Case>
             <Default>
               <Field Name="_EditMenuTableStart" />
               <SetVar Name="ShowAccessibleIcon" Value="1" />
               <Field Name="LinkTitleNoMenu" />
               <SetVar Name="ShowAccessibleIcon" Value="0" />
               <Field Name="_EditMenuTableEnd" />
             </Default>
           </FieldSwitch>
         </DisplayPattern>
       </Field>
       <Field ID="{b1f7969b-ea65-42e1-8b54-b588292635f2}" ReadOnly="TRUE" Type="Computed" Sortable="FALSE" Filterable="FALSE" Name="SelectTitle" Hidden="TRUE" CanToggleHidden="TRUE" DisplayName="Select" Dir="" AuthoringInfo="(web part connection)" HeaderImage="blank.gif" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="SelectTitle" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="ID" />
         </FieldRefs>
         <DisplayPattern>
           <IfEqual>
             <Expr1>
               <GetVar Name="SelectedID" />
             </Expr1>
             <Expr2>
               <Column Name="ID" />
             </Expr2>
             <Then>
               <HTML><![CDATA[<img border="0" align="absmiddle" style="cursor: pointer" src="/_layouts/images/rbsel.gif" alt="]]></HTML>
               <HTML>Selected</HTML>
               <HTML><![CDATA[">]]></HTML>
             </Then>
             <Else>
               <HTML><![CDATA[<a href="javascript:SelectField(']]></HTML>
               <GetVar Name="View" />
               <HTML><![CDATA[',']]></HTML>
               <ScriptQuote NotAddingQuote="TRUE">
                 <Column Name="ID" />
               </ScriptQuote>
               <HTML><![CDATA[');return false;" onclick="javascript:SelectField(']]></HTML>
               <GetVar Name="View" />
               <HTML><![CDATA[',']]></HTML>
               <ScriptQuote NotAddingQuote="TRUE">
                 <Column Name="ID" />
               </ScriptQuote>
               <HTML><![CDATA[');return false;" target="_self">]]></HTML>
               <HTML><![CDATA[<img border="0" align="absmiddle" style="cursor: pointer" src="/_layouts/images/rbunsel.gif"  alt="]]></HTML>
               <HTML>Normal</HTML>
               <HTML><![CDATA[">]]></HTML>
               <HTML><![CDATA[</a>]]></HTML>
             </Else>
           </IfEqual>
         </DisplayPattern>
       </Field>
       <Field ID="{50a54da4-1528-4e67-954a-e2d24f1e9efb}" Name="InstanceID" DisplayName="Instance ID" ColName="tp_InstanceID" RowOrdinal="0" ReadOnly="TRUE" Hidden="TRUE" Type="Integer" Min="0" Max="99991231" Filterable="TRUE" Sortable="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="InstanceID" FromBaseType="TRUE" />
       <Field ID="{ca4addac-796f-4b23-b093-d2a3f65c0774}" ColName="tp_ItemOrder" RowOrdinal="0" Name="Order" DisplayName="Order" Type="Number" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Order" FromBaseType="TRUE" />
       <Field ID="{ae069f25-3ac2-4256-b9c3-15dbc15da0e0}" ColName="tp_GUID" RowOrdinal="0" ReadOnly="TRUE" Hidden="TRUE" Type="Guid" Name="GUID" DisplayName="GUID" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="GUID" FromBaseType="TRUE" />
       <Field ID="{de8beacf-5505-47cd-80a6-aa44e7ffe2f4}" ColName="tp_WorkflowInstanceID" RowOrdinal="0" ReadOnly="TRUE" Hidden="TRUE" Type="Guid" Name="WorkflowInstanceID" DisplaceOnUpgrade="TRUE" DisplayName="Workflow Instance ID" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="WorkflowInstanceID" FromBaseType="TRUE" />
       <Field ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}" Name="FileRef" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" Type="Lookup" DisplayName="URL Path" List="Docs" FieldRef="ID" ShowField="FullUrl" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="FileRef" FromBaseType="TRUE" />
       <Field ID="{56605df6-8fa1-47e4-a04c-5b384d59609f}" Name="FileDirRef" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" Type="Lookup" DisplayName="Path" List="Docs" FieldRef="ID" ShowField="DirName" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="FileDirRef" FromBaseType="TRUE" />
       <Field ID="{173f76c8-aebd-446a-9bc9-769a2bd2c18f}" Name="Last_x0020_Modified" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" DisplayName="Modified" Type="Lookup" List="Docs" FieldRef="ID" ShowField="TimeLastModified" Format="TRUE" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Last_x0020_Modified" FromBaseType="TRUE" />
       <Field ID="{998b5cff-4a35-47a7-92f3-3914aa6aa4a2}" Name="Created_x0020_Date" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" DisplayName="Created" Type="Lookup" List="Docs" FieldRef="ID" ShowField="TimeCreated" Format="TRUE" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Created_x0020_Date" FromBaseType="TRUE" />
       <Field ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}" Name="FSObjType" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="Item Type" List="Docs" FieldRef="ID" ShowField="FSType" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="FSObjType" FromBaseType="TRUE" />
       <Field ID="{ba3c27ee-4791-4867-8821-ff99000bac98}" Name="PermMask" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" RenderXMLUsingPattern="TRUE" ShowInFileDlg="FALSE" Type="Computed" DisplayName="Effective Permissions Mask" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="PermMask" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="ID" />
         </FieldRefs>
         <DisplayPattern>
           <CurrentRights />
         </DisplayPattern>
       </Field>
       <Field ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Hidden="TRUE" ShowInFileDlg="FALSE" ShowInVersionHistory="FALSE" Type="File" Name="FileLeafRef" DisplaceOnUpgrade="TRUE" DisplayName="Name" AuthoringInfo="(for use in forms)" List="Docs" FieldRef="ID" ShowField="LeafName" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="FileLeafRef" FromBaseType="TRUE" />
       <Field ID="{4b7403de-8d94-43e8-9f0f-137a3e298126}" Name="UniqueId" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="Unique Id" List="Docs" FieldRef="ID" ShowField="UniqueId" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="UniqueId" FromBaseType="TRUE" />
       <Field ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Name="ProgId" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="ProgId" List="Docs" FieldRef="ID" ShowField="ProgId" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ProgId" FromBaseType="TRUE" />
       <Field ID="{dddd2420-b270-4735-93b5-92b713d0944d}" Name="ScopeId" DisplaceOnUpgrade="TRUE" ReadOnly="TRUE" Hidden="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="ScopeId" List="Docs" FieldRef="ID" ShowField="ScopeId" JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ScopeId" FromBaseType="TRUE" />
       <Field ReadOnly="TRUE" ID="{4ef1b78f-fdba-48dc-b8ab-3fa06a0c9804}" Hidden="TRUE" Type="Computed" Name="HTML_x0020_File_x0020_Type" DisplaceOnUpgrade="TRUE" DisplayName="HTML File Type" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="HTML_x0020_File_x0020_Type" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="File_x0020_Type" />
         </FieldRefs>
         <DisplayPattern />
       </Field>
       <Field ID="{3c6303be-e21f-4366-80d7-d6d0a3b22c7a}" Hidden="TRUE" ReadOnly="TRUE" Type="Computed" Name="_EditMenuTableStart" DisplaceOnUpgrade="TRUE" DisplayName="Edit Menu Table Start" ClassInfo="Menu" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_EditMenuTableStart" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="FileLeafRef" />
           <FieldRef Name="FileDirRef" />
           <FieldRef Name="FSObjType" />
           <FieldRef Name="ID" />
           <FieldRef Name="ServerUrl" />
           <FieldRef Name="HTML_x0020_File_x0020_Type" />
           <FieldRef Name="File_x0020_Type" />
           <FieldRef Name="PermMask" />
           <FieldRef Name="_HasCopyDestinations" />
           <FieldRef Name="_CopySource" />
           <FieldRef Name="ContentType" />
           <FieldRef Name="ContentTypeId" />
           <FieldRef Name="_ModerationStatus" />
           <FieldRef Name="_UIVersion" />
         </FieldRefs>
         <DisplayPattern>
           [removed for brevity]
         </DisplayPattern>
       </Field>
       <Field ID="{2ea78cef-1bf9-4019-960a-02c41636cb47}" Hidden="TRUE" ReadOnly="TRUE" Type="Computed" Name="_EditMenuTableEnd" DisplaceOnUpgrade="TRUE" DisplayName="Edit Menu Table End" ClassInfo="Menu" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_EditMenuTableEnd" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="ID" />
         </FieldRefs>
         <DisplayPattern>
           <HTML><![CDATA[</td><td><img src="/_layouts/images/blank.gif" width=13 style="visibility:hidden" alt=""></td></tr></table>]]></HTML>
         </DisplayPattern>
       </Field>
       <Field ID="{9d30f126-ba48-446b-b8f9-83745f322ebe}" ReadOnly="TRUE" Type="Computed" Name="LinkFilenameNoMenu" DisplaceOnUpgrade="TRUE" DisplayName="Name" Hidden="TRUE" DisplayNameSrcField="FileLeafRef" Filterable="FALSE" AuthoringInfo="(linked to document)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkFilenameNoMenu" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="FileLeafRef" />
           <FieldRef Name="FSObjType" />
           <FieldRef Name="Created_x0020_Date" />
           <FieldRef Name="FileRef" />
           <FieldRef Name="File_x0020_Type" />
           <FieldRef Name="ContentTypeId" />
           <FieldRef Name="PermMask" />
         </FieldRefs>
         <DisplayPattern>
           [removed for brevity]
         </DisplayPattern>
       </Field>
       <Field ID="{5cc6dc79-3710-4374-b433-61cb4a686c12}" ReadOnly="TRUE" Type="Computed" Name="LinkFilename" DisplaceOnUpgrade="TRUE" Hidden="TRUE" DisplayName="Name" DisplayNameSrcField="FileLeafRef" Filterable="FALSE" ClassInfo="Menu" AuthoringInfo="(linked to document with edit menu)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="LinkFilename" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="LinkFilenameNoMenu" />
           <FieldRef Name="_EditMenuTableStart" />
           <FieldRef Name="_EditMenuTableEnd" />
         </FieldRefs>
         <DisplayPattern>
           <FieldSwitch>
             <Expr>
               <GetVar Name="FreeForm" />
             </Expr>
             <Case Value="TRUE">
               <Field Name="LinkFilenameNoMenu" />
             </Case>
             <Default>
               <Field Name="_EditMenuTableStart" />
               <SetVar Name="ShowAccessibleIcon" Value="1" />
               <Field Name="LinkFilenameNoMenu" />
               <SetVar Name="ShowAccessibleIcon" Value="0" />
               <Field Name="_EditMenuTableEnd" />
             </Default>
           </FieldSwitch>
         </DisplayPattern>
       </Field>
       <Field ID="{081c6e4c-5c14-4f20-b23e-1a71ceb6a67c}" Type="Computed" ReadOnly="TRUE" Name="DocIcon" DisplaceOnUpgrade="TRUE" DisplayName="Type" TextOnly="TRUE" ClassInfo="Icon" AuthoringInfo="(icon linked to document)" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="DocIcon" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="File_x0020_Type" />
           <FieldRef Name="FSObjType" />
           <FieldRef Name="FileRef" />
           <FieldRef Name="FileLeafRef" />
           <FieldRef Name="HTML_x0020_File_x0020_Type" />
           <FieldRef Name="PermMask" />
         </FieldRefs>
         <DisplayPattern>
           [removed for brevity]
         </DisplayPattern>
       </Field>
       <Field ID="{105f76ce-724a-4bba-aece-f81f2fce58f5}" ReadOnly="TRUE" Hidden="TRUE" Type="Computed" Name="ServerUrl" DisplaceOnUpgrade="TRUE" DisplayName="Server Relative URL" Filterable="FALSE" RenderXMLUsingPattern="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ServerUrl" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="FileRef" />
         </FieldRefs>
         <DisplayPattern>
           <HTML>/</HTML>
           <LookupColumn Name="FileRef" />
         </DisplayPattern>
       </Field>
       <Field ID="{7177cfc7-f399-4d4d-905d-37dd51bc90bf}" ReadOnly="TRUE" Hidden="TRUE" Type="Computed" Name="EncodedAbsUrl" DisplaceOnUpgrade="TRUE" DisplayName="Encoded Absolute URL" Filterable="FALSE" RenderXMLUsingPattern="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="EncodedAbsUrl" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="FileRef" />
         </FieldRefs>
         <DisplayPattern>
           <HttpHost URLEncodeAsURL="TRUE" />
           <HTML>/</HTML>
           <LookupColumn Name="FileRef" URLEncodeAsURL="TRUE" />
         </DisplayPattern>
       </Field>
       <Field ID="{7615464b-559e-4302-b8e2-8f440b913101}" ReadOnly="TRUE" Hidden="TRUE" Type="Computed" Name="BaseName" DisplaceOnUpgrade="TRUE" DisplayName="File Name" Filterable="FALSE" RenderXMLUsingPattern="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="BaseName" FromBaseType="TRUE">
         <FieldRefs>
           <FieldRef Name="FileLeafRef" />
           <FieldRef Name="FSObjType" />
         </FieldRefs>
         <DisplayPattern>
           <IfEqual>
             <Expr1>
               <LookupColumn Name="FSObjType" />
             </Expr1>
             <Expr2>1</Expr2>
             <Then>
               <LookupColumn Name="FileLeafRef" HTMLEncode="TRUE" />
             </Then>
             <Else>
               <UrlBaseName HTMLEncode="TRUE">
                 <LookupColumn Name="FileLeafRef" />
               </UrlBaseName>
             </Else>
           </IfEqual>
         </DisplayPattern>
       </Field>
       <Field ID="{687c7f94-686a-42d3-9b67-2782eac4b4f8}" Name="MetaInfo" DisplaceOnUpgrade="TRUE" Hidden="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="Property Bag" List="Docs" FieldRef="ID" ShowField="MetaInfo" JoinColName="DoclibRowId" JoinType="INNER" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="MetaInfo" FromBaseType="TRUE" />
       <Field ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" ColName="tp_Level" RowOrdinal="0" ReadOnly="TRUE" Type="Integer" Name="_Level" DisplaceOnUpgrade="TRUE" DisplayName="Level" Hidden="TRUE" Required="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_Level" FromBaseType="TRUE" />
       <Field ID="{c101c3e7-122d-4d4d-bc34-58e94a38c816}" ColName="tp_IsCurrentVersion" DisplaceOnUpgrade="TRUE" RowOrdinal="0" ReadOnly="TRUE" Type="Boolean" Name="_IsCurrentVersion" DisplayName="Is Current Version" Hidden="TRUE" Required="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_IsCurrentVersion" FromBaseType="TRUE" />
     </Fields>
     <ContentTypes>
       <ContentType ID="0x01003056A1FBD7AB3B43BA55FA8F5AC76D6A" Name="Item" Group="List Content Types" Description="Create a new list item." Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
         <FieldRefs>
           <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />
           <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="TRUE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
         </FieldRefs>
         <XmlDocuments>
           <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
             <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
               <Display>ListForm</Display>
               <Edit>ListForm</Edit>
               <New>ListForm</New>
             </FormTemplates>
           </XmlDocument>
         </XmlDocuments>
         <Folder TargetName="Item" />
       </ContentType>
       <ContentType ID="0x01200009BBE0546A19524F9D32D2C92AE60FDF" Name="Folder" Group="Folder Content Types" Description="Create a new folder." Sealed="TRUE" Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
         <FieldRefs>
           <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />
           <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" Hidden="TRUE" />
           <FieldRef ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" Hidden="FALSE" Required="TRUE" />
         </FieldRefs>
         <XmlDocuments>
           <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
             <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
               <Display>ListForm</Display>
               <Edit>ListForm</Edit>
               <New>ListForm</New>
             </FormTemplates>
           </XmlDocument>
         </XmlDocuments>
       </ContentType>
     </ContentTypes>
     <Forms>
       <Form Type="DisplayForm" Name="{3247C226-DA6D-40D2-AC6E-635A33F2DBFF}" Url="Lists/Some Custom List via RPC/DispForm.aspx" Default="TRUE" />
       <Form Type="EditForm" Name="{A8C98402-6DF3-4A9F-9853-54216A85140A}" Url="Lists/Some Custom List via RPC/EditForm.aspx" Default="TRUE" />
       <Form Type="NewForm" Name="{C81F208E-F5BD-421D-B8C4-BBD73A0221C8}" Url="Lists/Some Custom List via RPC/NewForm.aspx" Default="TRUE" />
     </Forms>
     <Security>
       <ReadSecurity>1</ReadSecurity>
       <WriteSecurity>2</WriteSecurity>
       <SchemaSecurity>0</SchemaSecurity>
     </Security>
   </MetaData>
 </List>

The following example shows a content type schema.

 <ContentTypes>
   <ContentType ID="0x010100151D6E9AAB0A8E43B94916DB521E696C" Name="Document" Group="Document Content Types" Description="Create a new document." V2ListTemplateName="doclib" Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
     <FieldRefs>
       <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType"/>
       <FieldRef ID="{5f47e085-2150-41dc-b661-442f3027f552}" Name="SelectFilename"/>
       <FieldRef ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" Required="TRUE"/>
       <FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" Hidden="TRUE"/>
       <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE"/>
       <FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Name="Modified" Hidden="TRUE"/>
       <FieldRef ID="{822c78e3-1ea9-4943-b449-57863ad33ca9}" Name="Modified_x0020_By" Hidden="FALSE"/>
       <FieldRef ID="{4dd7e525-8d6b-4cb4-9d3e-44ee25f973eb}" Name="Created_x0020_By" Hidden="FALSE"/>
     </FieldRefs>
     <XmlDocuments>
       <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
         <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
           <Display>DocumentLibraryForm</Display>
           <Edit>DocumentLibraryForm</Edit>
           <New>DocumentLibraryForm</New>
         </FormTemplates>
       </XmlDocument>
     </XmlDocuments>
     <Folder TargetName="Forms/Document"/>
   </ContentType>
   <ContentType ID="0x0120007DAE54352CCF27408D0C1505674612EC" Name="Folder" Group="Folder Content Types" Description="Create a new folder." Sealed="TRUE" Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
     <FieldRefs>
       <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType"/>
       <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" Hidden="TRUE"/>
       <FieldRef ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" Hidden="FALSE" Required="TRUE"/>
     </FieldRefs>
     <XmlDocuments>
       <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
         <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
           <Display>ListForm</Display>
           <Edit>ListForm</Edit>
           <New>ListForm</New>
         </FormTemplates>
       </XmlDocument>
     </XmlDocuments>
   </ContentType>
 </ContentTypes>