garlik-gag / dokuwiki-plugin-odt2dw

Import odt file in dokuwiki page
10 stars 10 forks source link

Spacing gets lost #16

Open c0nnex opened 9 years ago

c0nnex commented 9 years ago

Trying to import a ODT file created with MS Word a lot of spacing gets lost. E.g.:

<text:p text:style-name="Standard">
                <text:span text:style-name="T236">Unpacking the downloaded</text:span>
                <text:span text:style-name="T237">
                    <text:s/>installation file<text:s/>
                </text:span>
                <text:span text:style-name="T238">"</text:span>
                <text:span text:style-name="T239">SPAD.neXt.setup.zip</text:span>
                <text:span text:style-name="T240">"</text:span>
                <text:span text:style-name="T241">
                    <text:s/>
                </text:span>
                <text:span text:style-name="T242">provides</text:span>
                <text:span text:style-name="T243">
                    <text:s/>a</text:span>
                <text:span text:style-name="T244">
                    <text:s/>setup wizard</text:span>
                <text:span text:style-name="T245">
                    <text:s/>
                </text:span>
</text:p>

becomes

Unpacking the downloadedinstallation file“SPAD.neXt.setup.zip”providesasetup wizard 

Any idea how to fix this?

c0nnex commented 9 years ago

Best problems are those you solve yourself ;)

Fixed it by adding

<xsl:template match="//text:s">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:template>

to the xsl

andyboeh commented 9 years ago

IMHO this shouldn't be closed but the relevant lines added by default to the xsl. I'm facing the same problem and I'm very glad that I found this issue!

c0nnex commented 9 years ago

Working on some more XSL improvements for e.g. insertion for specific formats