Document Converter Framework Sample (ECM)

This sample is composed of two related samples and supporting files that demonstrate the document converter framework, including a sample converter and Smart Client Authoring object model usage.

Note

This sample includes code intended to be saved into individual files and organized into a project. This topic describes the sample file structure and includes a procedure for saving sections of the code sample into the appropriate files and then building and running the samples.

Before compiling and running the samples, verify that the Document Converter Load Balancer service and the Document Conversions Launcher service are turned on.

The Feature folder contains files (listed as SampleXSLTApplicatorConverterFeatureElement and feature XML files in the Code section of this topic) that are needed to run the converter on an Office SharePoint Server 2007 computer.

The SmartClientAuthoringOM sample requires that the sample converter code (found in the XsltApplicator folder in the downloadable sample) be installed on an SharePoint Server 2010 server computer.

Ensure that the sample XSL and XML files included in the SampleData folder in the sample download are uploaded to the document library in a Web site where the SharePoint Server 2010 Publishing Feature is turned on.

Contains the SampleXSLTApplicatorConverterFeatureElement.xml and feature.xml files.

The contents of these files are reproduced later in this topic. These files are required to install the XsltApplicator sample on a server running SharePoint Server 2010.

SampleData

Contains sample XSL and XML files that the SampleOMUsage executable file requires. Upload these files to a server running SharePoint Server 2010, into a document library in a Web site where the Publishing Feature is turned on.

SampleOMUsage

Contains code that demonstrates the Smart Client Authoring object model. The code requires that the sample converter that is available in the XsltApplicator folder and files from the SampleData folder are installed on the server running SharePoint Server 2010, where you run this sample.

XsltApplicator

Contains code that demonstrates a Smart Client Authoring converter that applies an XSLT transformation to an XML file. This sample includes two code files (in subfolders in the SDK): XsltApplicator, which contains code for the converter, and SampleXslApplicatorSettings.ascx, which is the .ascx control that accompanies the converter and demonstrates how the IDocumentConverterControl interface is used.

This example reproduces the contents of files in the Feature and SampleData folders that are included with the Microsoft Office SharePoint Server 2007 SDK.

The following Code section contains code for three sample files: two Microsoft Visual C# files and one .ascx user control. These are the program files and .ascx user control file stored in the SampleOMUsage and XsltApplicator folders of the sample code that is included with the Microsoft Office SharePoint Server 2007 SDK download.

The following XML files are provided in two files stored in the Feature folder of the downloadable sample: SampleXSLTApplicatorConverterFeatureElement.xml and feature.xml.