Export (0) Print
Expand All

3.5.2.1.1.1 contentTypeSchema (Schema for Content Type)

The attributes and children of this element collectively specify a schema for the custom XML data part that specifies properties related to the content type associated with the document on Windows SharePoint Services. Each child of this element is an xsd:schema element, possibly decorated with attributes from the http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes namespace, that describes one or more elements that appear in that custom XML data part.

In the following description, let the term 'content type' refer specifically to the root element of the Content Type Definition Type as described in Collaborative Application Markup Language (CAML) Structure Specification ([MS-WSSCAML] Subclause 2.4.1.1).

The contentTypeSchema element shall contain an xsd:schema child element which has an ma:root attribute (§3.5.2.2.1, Shared Attributes) with a value of true. This xsd:schema must have a targetNamespace attribute whose value is set to http://schemas.microsoft.com/office/2006/metadata/properties. The xsd:schema must declare and import any namespaces used by its child elements. It must also have an ma:fieldsID attribute (§3.5.2.2.1, Shared Attributes).

Additionally, this xsd:schema element must declare an element with a name attribute whose value is properties and which uses the following structure. The children of the xsd:all element are not shown, but instead described by the text that follows.

<xsd:element name="properties">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element name="documentManagement">
        <xsd:complexType>
          <xsd:all>
            ...
          </xsd:all>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

Let the term "fields" denote the list of all Field elements that are children of the Fields element, which is in turn a child of the ContentType element in the content type. The Field elements are the fields used in the content type, as described in Collaborative Application Markup Language (CAML) Structure Specification ([MS-WSSCAML] Subclause 2.3.2.6). Furthermore, let the term "filtered fields" denote the list of all filtered fields to be those Field elements from the fields that satisfy all of the following conditions:

The value of the Type attribute is not Computed, Calculated, or WorkflowStatus.

The value of the Name attribute is not Modified_x0020_By, Created_x0020_By, Modified, Created or FileLeafRef.

The value of the StaticName attribute is not Title, Subject, _Author, Keywords, _Comments, _Category, or ContentType.

The xsd:all element from the preceding structure must contain an xsd:element element for each Field element in the filtered fields set. This xsd:element must have a ref attribute. The value of the ref attribute must be a qualified reference to a type whose name is the value of the StaticName attribute of the Field element and which resides in the namespace identified by the SourceID attribute of the Field element. Furthermore, if the Required attribute is not present on the Field element; or if the attribute is present but its value is not TRUE; or if the value of the Type attribute is MultiChoice or LookupMulti, then a minOccurs attribute with value of 0 must be present on the xsd:element element.

For each unique string that appears as the value of the SourceID attribute on a Field element in the fields, the contentTypeSchema element must contain an xsd:schema child whose targetNamespace attribute has that same value. Each xsd:schema must contain one xsd:element element for each Field whose SourceID attribute matches the targetNamespace attribute of the xsd:schema.

Each xsd:element element must have a name attribute whose value is the value of the StaticName attribute on the corresponding Field element. Each xsd:element element must have an ma:index attribute (§3.5.2.2, Metadata Attributes) whose value is the number of Field elements that appear before the corresponding Field element within the Fields element in the content type. If the Required attribute is not present on the corresponding Field element; the Required attribute is present but its value is not TRUE; or the value of the Type attribute is MultiChoice or LookupMulti, then a nullable attribute with value of true must be present on the xsd:element element.

The following attributes can appear on each xsd:element element: ma:displayName (§3.5.2.2, Metadata Attributes); ma:decimals (§3.5.2.2, Metadata Attributes); ma:default (§3.5.2.2, Metadata Attributes); ma:description (§3.5.2.2, Metadata Attributes); ma:format (§3.5.2.2, Metadata Attributes); ma:hidden (§3.5.2.2, Metadata Attributes); ma:LCID (§3.5.2.2, Metadata Attributes); ma:list (§3.5.2.2, Metadata Attributes); ma:internalName (§3.5.2.2, Metadata Attributes); ma:readOnly (§3.5.2.2, Metadata Attributes); ma:showField (§3.5.2.2, Metadata Attributes); ma:percentage (§3.5.2.2, Metadata Attributes); ma:web (§3.5.2.2, Metadata Attributes); ma:requiredMultiChoice (§3.5.2.2, Metadata Attributes).

The contentTypeSchema element must have an xsd:schema child whose targetNamespace attribute has the value http://schemas.openxmlformats.org/package/2006/metadata/core-properties.

Attributes

Description

_ (Reserved)

Shall be empty.

The possible values for this attribute are defined by the XML Schema anySimpleType datatype.

_ (Reserved)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Shall be empty.

The possible values for this attribute are defined by the XML Schema anySimpleType datatype.

contentTypeDescription (Content Type Description)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Shall be the same value as the Description attribute of the ContentType element (as described in Collaborative Application Markup Language (CAML) Structure Specification ([MS-WSSCAML] Subclause 2.4.1.1) for the content type associated with this document.

The possible values for this attribute are defined by the XML Schema string datatype.

contentTypeID (Content Type ID)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Identifies the content type associated with this document.

The possible values for this attribute are defined by the ST_ContentTypeId simple type (§3.5.2.2.2.1, ST_ContentTypeId).

contentTypeName (Content Type Name)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Must be the same value as the Name attribute of the ContentType element (as described in Collaborative Application Markup Language (CAML) Structure Specification ([MS-WSSCAML] Subclause 2.4.1.1)) for the content type associated with this document.

The possible values for this attribute are defined by the XML Schema string datatype.

contentTypeScope (Content Type Scope)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Shall be empty.

The possible values for this attribute are defined by the XML Schema string datatype.

contentTypeVersion (Content Type Version)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

Shall be the same value as the Version attribute of the ContentType element (as described in Collaborative Application Markup Language (CAML) Structure Specification ([MS-WSSCAML] Subclause 2.4.1.1) for the content type associated with this document.

The possible values for this attribute are defined by the ST_IntNonNegative simple type (§3.5.2.2.2.2, ST_IntNonNegative).

versionID (Version ID)

Namespace: http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes

A string hash used to determine if the definition of the content type associated with this document has changed since the last time the content type was applied to the document.

The value is computed as an MD5 hash of the substring that represents the ContentType element (from <ContentType> to </ContentType>, inclusive) within the SOAP result of the GetListContentType Web service request, as described in Lists Web Service Protocol Specification ([MS-LISTSWS] Subclause 3.1.4.17).

The possible values for this attribute are defined by the XML Schema string datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_ContentTypeSchema">
  <sequence>
    <element ref="xsd:schema" maxOccurs="unbounded"/>
  </sequence>
  <attribute name="_"/>
  <attribute ref="ma:_"/>
  <attribute ref="ma:contentTypeName"/>
  <attribute ref="ma:contentTypeID"/>
  <attribute ref="ma:contentTypeVersion"/>
  <attribute ref="ma:contentTypeDescription"/>
  <attribute ref="ma:contentTypeScope"/>
  <attribute ref="ma:versionID"/>
</complexType>
Show:
© 2014 Microsoft