This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Each list definition that appears as an option on the Create page has its own Feature subfolder in Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES that includes a Schema.xml file. The Schema.xml file defines the views, forms, toolbar, and special fields for lists that are created through the list definition.

List Definition Tasks with Schema.xml

The following kinds of tasks can be performed in a Schema.xml file to customize a list definition:

  • Add custom fields built on the base field types defined in FldTypes.xml (You cannot create custom base field types.)

  • Create a custom view for lists created through the list definition

  • Specify custom form pages for working with list items

  • Specify the default description that is displayed for the list in the user interface (UI)

  • Define the Actions area that is displayed in the side navigational area of list views


Making changes to an originally installed Schema.xml file on a server running Windows SharePoint Services can break existing lists, and the changes may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version. Create a custom list definition Feature instead of modifying original schema files. For more information on the best practice to follow, see How to: Create a Custom List Definition.

File Format

List Element

The top-level List element specifies the internal name and display name for the list definition, as well as the direction of text used in lists, and the site-relative URL at which lists are created.


In all the XML examples in this topic, strings that begin "$Resources" are constants defined in an .resx file in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources.

  xmlns:ows="Microsoft SharePoint" 

Like most attributes of the List element in a Schema.xml file, specification of the site-relative URL is largely irrelevant because it is overridden by list settings in the Onet.xml file of the site definition. This element optionally specifies Microsoft SharePoint as an XML namespace. The BaseType attribute specifies a base list type that is defined within the BaseTypes element of an Onet.xml file. Use the VersioningEnabled attribute to specify whether versioning is enabled by default for document libraries created through the list definition.

MetaData Element

The MetaData element groups list metadata within the List element and may contain the following subelements.

ContentTypes Element

The ContentTypes element specifies content types to associate with lists that are created through the list definition.

      TargetName="Task" />
      ID="0x0120" />

Fields Element

The Fields element contains field definitions for special fields that may be required in a list definition.

      <MAPPING Value="1">$Resources:core,Priority_High;</MAPPING>
      <MAPPING Value="2">$Resources:core,Priority_Normal;</MAPPING>
      <MAPPING Value="3">$Resources:core,Priority_Low;</MAPPING>

Each Field element specifies a display name (DisplayName), an internal name (Name), a field type (Type) defined in FldTypes.xml on which the field is based, and other field properties as required.

For a programming task that shows how to add a custom field to a Schema.xml file, see How to: Create a Custom List Definition.

Views Element

The Views element contains the definitions for views that are available by default when a list is created.

    <Toolbar Type="Standard" />
      <FieldRef Name="LinkTitle" />
      <FieldRef Name="Status" /> 
      <FieldRef Name="Priority" /> 
      <FieldRef Name="DueDate" /> 
      <FieldRef Name="PercentComplete" /> 
        <FieldRef Name="AssignedTo" />
        <Value Type="Integer">
          <UserID />
      <FieldRef Name="Status" /> 
      <FieldRef Name="Priority" /> 

Each View element specifies the type of format used in the display (usually HTML) and a unique ID for the view. When the view is displayed in a Web Part, the View element also specifies the title of the view. The Url attribute is used in list creation to specify the base name of the ASPX page in which the view is displayed. View also specifies the Web Part zone ID of the Web Part in which the view is displayed.

The View element contains subelements that define the following:

  • The various parts of a view (including the header, body, and footer)

  • The Group By section

  • A limit on the number of rows, or items, to display

  • Rowsets that define how to display items when the number exceeds the row limit

  • What to display when no items are returned in the view

  • The toolbar area that is displayed above lists

  • The fields displayed in the view

  • The query that filters the view

The Toolbar element defines the kind of toolbar that is displayed in the navigational area of the list view. Possible values include the following:

  • RelatedTasks for the Actions section that is displayed in the side navigational area of list views

  • Standard for normal views

  • Freeform for summary views on home pages

Forms Element

The Forms element contains references to the forms used when working with individual list items.

  <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
  <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />

Each Form element specifies the form type, which can be DisplayForm, EditForm, or NewForm, as well as the name of the ASPX page used for the form and the Web Part zone ID of the Web Part in which the form is displayed on the page.

DefaultDescription Element

A DefaultDescription element specifies the description that is displayed for the list definition in the UI.


This element is overridden by the Description attribute of the List element corresponding to the current list definition that is specified within a configuration in Onet.xml.


A value for this element must be specified in custom list definitions.

See Also


List Schema

Guidelines for Using Custom Site Definitions, Configurations, and Templates