Word XML & Paragraph Breaks
I was reviewing some of my notes from the Office 2003 beta time frame and I came across an interesting newsgroup posting from Brian Jones of the Microsoft Word team. He posted this explanation of how Word loads an XML file.
----------------------------
When Word opens an XML file that is not in Word's namespace, it must transform it into an XML file that is in Word's namespace (WordML). Word will look at the namespace of the file, and then reference the Schema Library to see if there is a transform registered for that namespace. If there is a transform, Word will apply the transform to the original XML file, and open the resulting WordML file. That transform will create Word elements, such as paragraphs, table, runs of text, etc. in order to represent the original XML file in a nice user friendly way. A paragraph is an element in WordML, and if you want to preserve line feeds, then you must create a paragraph element. Image you had the XML example you used earlier:
<pseudocode> if user is inside the firewall
allow self-registration
if user is outside the firewall
present access denied warning</pseudocode>
You would need to create this with your XSLT:
<pseudocode><w:p><w:r><w:t> if user is inside the firewall</w:t></w:r></w:p>
<w:p><w:r><w:t>allow self-registration</w:t></w:r></w:p>
<w:p><w:r><w:t>if user is outside the firewall</w:t></w:r></w:p>
<w:p><w:r><w:t> present access denied warning</w:t></w:r></w:p>
</pseudocode>