While writing the text of the document template, you should use placeholders within the text to mark for yourself where to insert tags later. This method of developing your document template will help you divide the tasks of composing the document and coding it.
Each placeholder should mark where one piece of data should be inserted. For example, if you want the template to retrieve the first name of an Involved Contact for a Claim project, you would enter a placeholder in your template like this:
<First Name of Involved Contact for this Claim>
Tips on Formatting and Creating Placeholders
- Create placeholders that identify as specifically as possible what data should be retrieved, especially if you will be delivering the document to another individual for converting it to XML.
- All the formatting that you use in creating the text and placeholders of the document content, including line returns, will be carried over to the generated document. If you enter a line return in a series of nested tags, a line return will be added in the final generated document. For example, in the text and placeholders image, notice how the placeholder tags are on different lines. This is how the retrieved data will appear in the final generated document.
- You can also place tags within the header and footer sections of a Microsoft Word document, and/or within a table, as long as you make sure that the flow of the text in the word processing application places the tags in the correct order.
The following image is an example of text and placeholders that were created in Microsoft Word. This particular template was used in creating the claim notification letter shown in the finished letter image. Notice how the layout of the template is designed according to the desired format of the final document.