Word 2003 XML - Carriage Return

C

cidu

I am using Word 2003 new features to transform XML file to DOC file using XLST. Everything works great except Word ignored all the carriage returns winthin tags. I can see the carriage returns in WORDPAD without wrapping. But in WORD I can't see the returns. Anyone can help me find out why?
Much thanks,
Cidu
 
K

Kriz

Try adding xml:space="preserve" to your <wordDocument> tag, i.e.

<xsl:template match="/"><w:wordDocument xml:space="preserve"



</w:wordDocument></xsl:template>
 
M

Mark Baird

A paragraph is an element in WordML which is why Word ignores carriage returns when XML is transformed in Word

If you want to preserve line feeds, then you must create a paragraph element for each line or use <w:br/> which is a line break in Word.

Mark Bair

<pseudocode> if user is inside the firewal
allow self-registratio
if user is outside the firewal
present access denied warning</pseudocode><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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top