Compartilhar via


Site Schema

Applies to: SharePoint Foundation 2010

The Site schema of Collaborative Application Markup Language (CAML) is used to define metadata for creating Web sites, including the root site of site collections. A site definition specifies the navigation bars, list templates, document templates, list base types, configurations, modules, components, and server email footer for creating sites. The site definition is specified through an Onet.xml file located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates, and through a WebTemp*.xml file located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\1033\XML.

Sites can be created or modified programmatically through the object model (for example, members of the SPWeb and SPWebCollection classes, or members of the SPSite and SPSiteCollection classes). They can also be remotely created or modified through the Administration Web service (methods of the Admin class), the Document Workspace Web service (methods of Dws), or the Meetings Web service (members of Meetings).

Site Schema Elements

Onet.xml

<Project>

  <NavBars>

    <NavBar>

      <NavBarLink>

      <NavBarPage>

  <ListTemplates>

    <ListTemplate>

  <DocumentTemplates>

    <DocumentTemplate>

      <DocumentTemplateFiles>

        <DocumentTemplateFile>

  <BaseTypes>

    <BaseType>

      <MetaData>

  <Configurations>

    <Configuration>

      <ExecuteUrl>

      <Lists>

        <List>

          <Data>

            <Rows>

              <Row>

                <Field>

      <Modules>

       [See Module Schema] 

      <WebFeatures>

        <Feature>

          <Properties>

            <Property>

      <SiteFeatures>

        <Feature>

          <Properties>

            <Property>

  <Modules>

   [See Module Schema]

  <Components>

    <ExternalSecurityProvider>

    <FileDialogPostProcessor>

  <ServerEmailFooter>

Module Schema

    <Module>

      <File>

        <AllUsersWebPart>

        <BinarySerializedWebPart>

           <GUIDMap>

             <GUID>

           <WebPart>

        <NavBarPage>

        <Property>

        <View>

          <BinarySerializedWebPart>

             <GUIDMap>

                <GUID>

             <WebPart>

         <WebPartConnection>

           <WebPartTransformer>

WebTemp*.xml

<Templates>

  <Template>

    <Configuration>