One of the coolest features of Notes Migrator for SharePoint is the ability generate XML documents from Notes documents. A common use for this feature is, of course, generation of InfoPath forms for use in SharePoint applications. Customers who are trying to replace existing Notes applications often build new InfoPath form templates that reproduce the dynamic behavior of their Notes form, such as hide-when formulas, computed fields and validation logic. These InfoPath form templates can be integrated in a variety of ways with SharePoint to create powerful document management, workflow and other compelling solutions. Notes Migrator for SharePoint can rapidly migrate complex Notes documents to InfoPath forms for use with such solutions.
(Just to clear up the inevitable confusion, InfoPath calls the XML documents that contain the data "Forms" and the thing that developers build for entering these documents "Form Templates". So Notes documents map to InfoPath Forms and Notes forms map to InfoPath Form Templates. Go figure!)
Here are a few a screen shots: A typical rich text Notes document, an InfoPath Form Library on SharePoint populated with migrated documents, and that same document opened in the InfoPath client.

All the powerful data extraction capabilities of Notes Migrator for SharePoint will be available here, including:
- High-fidelity rich-text conversion
- Attachments
- Embedded images
- Embedded OLE objects conversion
- Dynamic @formulas for data conversion
- Multi-valued item handling
- Author name and access control mapping
- Writing additional "metadata" fields
- Versioning
- Migrating workflow state
The resulting generated XML documents can be saved into SharePoint as Document Library files, Form Library documents, or List Item fields.
The feature is fully covered in our user manual, but here is a recap of how the feature works:
Dynamic XML document generation is accomplished by substituting elements in a "template" XML document that you provide with values derived from each Notes document being migrated. The following diagram shows how certain elements of the XML "template" are substituted with live Notes data.
Applications such as InfoPath can be very sensitive to the schema version and other metadata such as form template location (i.e., the information expressed in the mso-infoPathSolution tag). A common best practice, therefore, is to first develop your InfoPath form template, publish to SharePoint, and fully verify the integrated solution. Then create your sample XML document in the context of your working Sharepoint application and use that as the basis for creating a Document Template in Notes Migrator for SharePoint.
First, you will need to add a namespace declaration for ‘ppm’ to map to the namespace “http://schemas.proposion.com/PortalMigrator/V4”. You can then add special <ppm:replace> tags to specify the parts of your XML document that you want to replace with data extracted from Notes documents. The ‘src’ attribute of the <ppm:replace> should refer to another column in the same Notes Source data definition.
Consider the following example, which is a standard InfoPath form, except for the highlighted sections:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution solutionVersion="1.0.0.12" productVersion="12.0.0" PIVersion="1.0.0.0"
href="file:///C:\Documents%20and%20Settings\Steve\Desktop\Connection.xsn"
name="urn:schemas-proposion-com:office:infopath:Connection:v1" ?>
<?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?>
<?mso-infoPath-file-attachment-present?>
<my:ServerConnection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-08-15T18:36:47"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xmlns:ppm="http://schemas.proposion.com/PortalMigrator/V4"
xml:lang="en-us">
<my:ConnectionType> <ppm:replace src='ConnectionType' /> </my:ConnectionType>
<my:PassthruServer> <ppm:replace src='PassthruServer' /> </my:PassthruServer>
<my:Destination> <ppm:replace src='Destination' /> </my:Destination>
…
<my:ConnectionLocations>
<my:ConnectionLocation> <ppm:replace src='ConnectionLocation' multi='repeat' /> </my:ConnectionLocation>
</my:ConnectionLocations>
…
<my:Comments> <ppm:replace src='CommentsHtml' encode='xhtml' images='CommentsImages' /> </my:Comments>
…
<my:Attachment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ppm:replace src='CommentsAttachments' multi='first' encode='attachment'/> </my:Attachment>
</my:ServerConnection>
The above example illustrates the declaration of the Notes Migrator for SharePoint namespace (gray) and several simple text replacement tags (blue), a repeating tag based on a multi-valued Notes item (green), a rich text item (red) and a binary attachment (purple).
To generate XML documents in Notes Migrator for SharePoint, add a column of type “Document” to your Notes Source Data Definition. The DocumentTemplate property of the column definition should be a complete XML document that contains all the declarations and tags you want in your generated documents. Users would typically create a sample document in their target application and use that as the starting point for their Document Template.
In the current release, a simple drop-down text editor is available for entering multi-line Document Templates. Don't use it! In practice, most users would prefer to use their favorite XML editor and copy/paste the results in Notes Migrator for SharePoint. A more powerful editor/designer is planned for future releases which will assist with loading a sample XML document, merging source columns, generating 'ppm' tags, etc.
To save your generated XML documents into a Document Library or Forms Library in SharePoint, simply map your new “Document” column to a File field in SharePoint, just as you would when extracting attachments or embedded images. You can also map Document columns to List Item text fields or List Item attachment fields.
You can control the name of generated XML files by mapping a dynamic source column to a FileName field in your target data definition. You can control the file extension used for generated files (by default, “xml”) by specifying the DocumentExtension property in your source Document column.

Here is a complete sample of this feature. We designed an InfoPath Form Template to look (sort of) like the standard Notes Server Connection form and a Notes Migrator for SharePoint job to migrate your connection documents to InfoPath. Truly a demo that only a Notes nerd could appreciate!
Sample InfoPath Form Template: [Connection.xsn]
Sample Migration Job: [Connections.pmjob]
Detailed encoding options...
To generate repeating entries (an array) based on the values in a Notes multi-valued item, add the multi=‘repeat’ attribute to your <ppm:replace> tag. This will cause the surrounding XML tag to be repeated once for each input value encountered. For example, the tag shown in green in the above sample might result in the following generated XML:
<my:ConnectionLocations>
<my:ConnectionLocation>value 1</my:ConnectionLocation>
<my:ConnectionLocation>value 1</my:ConnectionLocation>
<my:ConnectionLocation>value 1</my:ConnectionLocation>
</my:ConnectionLocations>
If you only wanted to extract the first or last value in a multi-valued item, use the multi=‘first’ or multi=‘last’ attributes instead. (If unspecified, the default is to use just the first value of any multi-valued item encountered.)
You can also specify multi='repeatparent' to repeat the surrounding XML tag and its parent once for every value encountered in the multi-valued item. This option is useful for encoding multiple attachments (see below) or other repeating group elements in InfoPath.
To generate rich text entries, add the encode=’xhtml’ attribute to your <ppm:replace> tag. This will cause the HTML markup extracted from your Notes documents to be saved into your generated document as XML tags rather than as plain text. For example, the tag shown in blue in the above sample might result in the following generated XML:
<my:Comments> <div xmlns="http://www.w3.org/1999/xhtml">This is a <strong> rich text</strong> example</div></my:Comments>
When using encode='xhtml' you can also add an 'images' attribute. This is similar to the 'src' attribute in that it should be the name of another source data definition column. The images are encoded right into the XHTML and you go not need to migrate them separately.
When using encode='xhtml' any Notes DocLink icons that are encountered are converted to encoded icons in your XML document. To disable this behavior, add the attribute linkicons=’false’ to your <ppm:replace> tag. This will cause Notes DocLink icons to be replaced with a simple text link instead.
If you wish the source data column to copied “as is” into the XML document, you can use encode=’xml’ rather than encode=’xhtml’. This might be useful if, for example, you have a Notes item that contains pure XML or you have created a formula column in your source data definition that emits an XML fragment. If you omit the encode attribute completely, the source data will be encoded as a Text element by default and any special characters (such as XML angle brackets) will be escaped.
To encode binary attachments in your generated documents, Notes Migrator for SharePoint offers two choices. To encode your attachment as an InfoPath attachment (using InfoPath’s proprietary format), add the encode=‘attachment’ attribute to your <ppm:replace> tag. To instead encode your attachment using standard base64 encoding, add the encode=‘base64’ attribute to your <ppm:replace> tag. This later choice is useful in some XML applications, but not for InfoPath.
Other possibilities for the encode attribute are 'commonname' and 'abbreviatedname' for formatting Notes names and 'datetime', 'dateonly' and 'timeonly' for formatting XML Date/Time values.
With all these encoding options, our customers have been able to target every single InfoPath data schema they wanted to target (and some of them come up with some pretty wild schemas!) If you think of any other XML constructs you would like to generate from Notes documents, definitely let us know.