List Schema

Applies to: SharePoint Foundation 2010

The list schema of Collaborative Application Markup Language (CAML) is used to define the metadata for creating lists. The list schema includes field definitions (Field element), view definitions, and a toolbar definition, in addition to specifying content types, forms, and a default description for lists that are created. The definition for a list is contained in a Schema.xml file that is located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES or is included in sandboxed solutions.

You can create or modify lists programmatically through the object model (for example, members of the SPList class and the SPListCollection class), through the Lists web service (methods of the Lists class), and through the Remote Procedure Call (RPC) protocol (see SharePoint Foundation Methods).

List Schema Elements

<List>

  <MetaData>

      <Default>

      <Forms>

        <Form>

          <ListFormOpening>

          <ListFormButtons>

          <ListFormBody>

          <ListFormClosing>

      <ContentTypes>

        <ContentTypeRef>

          <Folder>

        <ContentType>

      <Fields>

        <Field>

          <FieldRefs>

            <FieldRef>

          <DisplayPattern>

          <DisplayBidiPattern>

          <CHOICES>

            <CHOICE>

          <MAPPINGS>

            <MAPPING>

          <Default>

          <Formula>

          <FormulaDisplayNames>

          <DefaultFormula>

          <DefaultFormulaValue>

          <Customization>

            <ArrayOfProperty>

              <Property>

          <Validation>

      <Forms>

        <Form>

          <ListFormOpening>

          <ListFormButtons>

          <ListFormBody>

          <ListFormClosing>

          <WebParts>

            <AllUsersWebPart>

      <DefaultDescription>

      <Toolbar>

      <DocumentLibraryTemplate>

      <Views>

        <View>

Note

The following subelements lay out the structure of a view, but Microsoft SharePoint Foundation 2010 uses XSLT to define rendering of view contents. For information about the XSLT that is used, see List Views. For the schema that Windows SharePoint Services 3.0 used to render the view contents, see View Schema.

          <Aggregations>

            <FieldRef>

          <GroupByFooter>

          <GroupByHeader>

          <Method>

            <Filter>

          <PagedClientCallbackRowset>

          <PagedRecurrenceRowset>

          <PagedRowset>

          <ParameterBindings>

            <ParameterBinding>

          <Query>

            [see Query Schema]

          <RowLimit>

          <RowLimitExceeded>

          <Toolbar>

          <ViewBidiHeader>

          <ViewBody>

          <ViewData>

            <FieldRef>

          <ViewEmpty>

          <ViewFields>

            <FieldRef>

          <ViewFooter>

          <ViewHeader>

          <ViewStyle>

          <XslLink>

See Also

Concepts

Query Schema

View Schema