Compartir a través de


Content Type Definition Schema

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 element manifest that defines content types must adhere to the Content Type Definition Schema.

Following is a list of the elements in the Content Type Definition Schema.

<Elements Element (ContentType)>

   <ContentType Element (ContentType)>

      <Folder Element (ContentType)>

      <FieldRefs Element (ContentType)>

         <FieldRef Element (ContentType)>

         <RemoveFieldRef Element (ContentType)>

         <DocumentTemplate Element (FieldRefs)>

      <Forms Element (ContentType)>

         <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

            <Forms Element (ContentType)>

      <XmlDocuments Element (ContentType)>

         <XmlDocument Element (ContentType)>

      <DocumentTemplate Element (ContentType)>

Note

The Forms Element (ContentType) element is obsolete, as are its child elements. The DocumentTemplate Element (FieldRefs) child element of the FieldRefs Element (ContentType) element is obsolete as well.

Content Type Schema Example

Following is an example of the XML that defines the Document content type in Windows SharePoint Services 3.0. Elements have been edited for readability.

<?xml version="1.0" encoding="utf-8" ?>
<!-- _lcid="1033" _version="12.0.3008" _dal="1" -->
…
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
…
  <ContentType ID="0x0101"
      Name="$Resources:Document"
      Group="$Resources:Document_Content_Types"
      Description="$Resources:DocumentCTDesc"
      V2ListTemplateName="doclib"
      Version="0">
    <FieldRefs>
      <RemoveFieldRef ID=FID_Attachments Name="Attachments" /> <!-- Attachments -->
… 
      <FieldRef ID=FID_Created Name="Created" Hidden="TRUE" /> <!-- Created -->
      <FieldRef ID=FID_Title Name="Title" Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE"/> <!-- Title --> 
…
    </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>
  </ContentType>

</Elements>

See Also

Concepts

Introduction to Content Types

Custom Information in Content Types

Content Type Deployment Using Features

Other Resources

Provisioning Content Types in List Schemas