ContentTypes Element (List)
Contains references to content types to associate with lists that are created through the list definition.
<ContentTypes>
<ContentTypeRef
ID = "Text">
<Folder
TargetName="Text">
</Folder>
</ContentTypeRef>
...
</ContentTypes>
ContentType as a Child Element of ContentTypes
According to wss.xsd from (12\Template\XML), ContentTypes also supports having ContentType element as a child, not only ContentTypeRef:
<xs:complexType name="ListMetaDataDefinition">
<xs:all>
...
<xs:element name="ContentTypes" type="ContentTypeReferences" minOccurs="0" maxOccurs="1" />
</xs:all>
</xs:complexType>
...
<xs:complexType name="ContentTypeReferences">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ContentTypeRef" type="ContentTypeReference" />
<xs:element name="ContentType" type="ContentTypeDefinition" />
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ListMetaDataDefinition">
<xs:all>
...
<xs:element name="ContentTypes" type="ContentTypeReferences" minOccurs="0" maxOccurs="1" />
</xs:all>
</xs:complexType>
...
<xs:complexType name="ContentTypeReferences">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ContentTypeRef" type="ContentTypeReference" />
<xs:element name="ContentType" type="ContentTypeDefinition" />
</xs:choice>
</xs:sequence>
</xs:complexType>
ContentType
Additional Info:
ContentType: http://msdn2.microsoft.com/en-us/library/aa544268.aspx
How to: Add a Content Type to a List: http://msdn.microsoft.com/en-us/library/aa543576.aspx
- 2/22/2007
- Daniel Flippance
- 2/5/2009
- austegard