[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: wordml-* : missing whitespaces
On 1/27/07, Mathieu Malaterre <mathieu.malaterre@gmail.com> wrote: > Hello there, > > I have been using xsltproc in conjunction with the wordml-*.xsl > stylesheet to try to produce a docbook document but I have a couple of > minor issues. Hopefully someone can tell me if I am doing something > wrong. > > The original Word document contains: > <w:pStyle w:val="TableEntry"/><w:keepNext/><w:keepLines/></w:pPr><w:r><w:t>Sex > of the named patient. Enumerated > Values:</w:t></w:r><w:r><w:br/></w:r><w:r><w:tab/><w:t>M = > male</w:t></w:r><w:r><w:br/></w:r><w:r><w:tab/><w:t>F = > female</w:t></w:r><w:r><w:br/></w:r><w:r><w:tab/><w:t>O = > other</w:t></w:r> > > Output docbook file contains: > <entry>Sex of the named patient. Enumerated Values:M = maleF = femaleO > = other</entry> > > Is there anything I should do to keep those whitespaces ? Dave Pawson suggested the following solution: http://xml.openoffice.org/servlets/ReadMsg?list=dev&msgNo=2915 ... Looks like you need to add <xsl:template match="text:line-break"> <xsl:text> </xsl:text> </xsl:template> ... My guess is that roundtrip/wordml-* is also missing something like: <xsl:template match="w:br"> <xsl:text> </xsl:text> </xsl:template> The only drawback to that solution is that it -sometime- add a final whitespace, but easily fixed with a normalize-space(). -M
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]