Document Parsing and Content Types
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.
When Windows SharePoint Services invokes a document parser to promote document properties, the parser writes all document properties to a property bag object. Windows SharePoint Services then determines which of these document properties to promote to matching document library columns. If the document has an assigned content type, then Windows SharePoint Services promotes the document properties that match the columns included in the content type.
For more information, see Document Parser Processing.
Parsing Content Types in Documents
Using the document parser interface, document parsers can access the content type assigned to the document and store the content type in the document itself. If, when Windows SharePoint Services invokes the parser to parse a document, the parser writes the document's content type to the property bag object as a document property, Windows SharePoint Services compares this content type to the content types associated with the document library to which the document is being uploaded. If the document's content type is one that is associated with the document library, Windows SharePoint Services promotes the appropriate document properties and saves the document.
However, in some cases the document’s content type may not actually be associated with the document library to which the user is uploading the document. For example, the user might have created the document from a document template that contained a content type; or the user might move a document from one document library to another.
If the document’s content type is not associated with the document library, Windows SharePoint Services takes the following actions:
If the document contains a document property for content type, but that document property is empty, Windows SharePoint Services invokes the parser to demote the default list content type for the document library into the document. Windows SharePoint Services then promotes the document properties that match columns in the default list content type and stores the document.
This occurs if the document has not yet been assigned a content type.
If the document is assigned a content type not associated with the document library, Windows SharePoint Services determines whether the document library allows any content type. If so, Windows SharePoint Services leaves the document’s content type unchanged. Windows SharePoint Services does not promote the document content type; however, it does promote any document properties that match document library columns.
You can set lists to allow any content type. To do this, you add the Unknown Document Type content type to the list, and then documents of any content type can be uploaded to the list without having their content types overwritten. This enables users to move a document to the list without losing the document's metadata, as would happen if the content type was overwritten.
If the document is assigned a content type that is not associated with the document library, and the document library does not allow any content types, Windows SharePoint Services invokes the parser to demote the default list content type for the document library into the document. Windows SharePoint Services then promotes the document properties that match columns in the default list content type and stores the document.
The following figure details the actions taken by Windows SharePoint Services if the parser includes the document's content type as a document property in the property bag returned to Windows SharePoint Services when the parser parses a document.
Windows SharePoint Services never promotes a document's content type onto a document library.
See Also
Concepts
Mapping Document Properties to Columns
Document Parsing and Content Types