how to avoid loosing leading spaces in word text when xslt processing is done

Y

Yves

I have an XLST program which does XSLT on WordML files

Every goes fine except one important thing : leading spaces in <w:t> nodes (text nodes) are los
by XSLT. In the final word document a few words formerly separated by space are stuck together
Example
before : the brown do
inside xml : <w:t>the brown</w:t> then later on <w:t> dog</w:t
after xsl : <w:t>the brown</w:t> then later on <w:t>dog</w:t> (see the missing space ?
after : the browndo

Using <xsl:space-preserve elements="w:t"/> in the XSL program does not work because the XSL transforme
removes spaces when reading the xml document (this is the standard xslt specification)

Is there a simple way to ensure that my Word text will be left untouched by xsl processing

transforming <w:t> to <w:t xml:space="preserve"> in the original document prior to XSLT does the trick, bu
implies preprocessing the document : there should be a simpler way to do that
 
Y

Yves

Sorry guys, it turned out after much analysis that it was an Xpath transform upstream that created the problem

Actually Oracle PL/SQL Xpath does normalise space and looses leading blanks in text fields by default. I believ
this is the case for any Xpath parser

This should have been posted on another newsgroup actually
 

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