List Info

Thread: wordml-* : missing whitespaces




wordml-* : missing whitespaces
user name
2007-01-27 01:30:58
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:ke
epLines/></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 ?

Thanks !


-- 
Mathieu


Steps used:
xsltproc -o normalised.xml wordml-normalise.xsl my-word.xml
xsltproc -o sections.xml wordml-sections.xsl normalised.xml
xsltproc -o blocks.xml wordml-blocks.xsl sections.xml
xsltproc -o my-docbook.xml wordml-final.xsl blocks.xml

$ xsltproc --version
Using libxml 20627, libxslt 10119 and libexslt 813
xsltproc was compiled against libxml 20627, libxslt 10119
and libexslt 813
libxslt 10119 was compiled against libxml 20627
libexslt 813 was compiled against libxml 20627

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: wordml-* : missing whitespaces
user name
2007-01-27 16:39:11
On 1/27/07, Mathieu Malaterre <mathieu.malaterregmail.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:ke
epLines/></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?lis
t=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

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Re: wordml-* : missing whitespaces
user name
2007-01-28 14:20:55
Hi Mathieu,

It would be good if you could submit a bug report on
SourceForge so  
that I can track this issue.

Please send me a complete sample Word document that
demonstrates this  
problem.  I'm currently working on a new set of conversion 

stylesheets and I will look at fixing this in that new
work.

Cheers,
Steve Ball

On 28/01/2007, at 9:39 AM, Mathieu Malaterre wrote:

> On 1/27/07, Mathieu Malaterre <mathieu.malaterregmail.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:ke
epLines/></ 
>> 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?lis
t=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
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis- 
> open.org
>
>


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Re: wordml-* : missing whitespaces
user name
2007-01-28 17:23:18
Hi Steve,

Done:
[ 1646648 ] w:br are not replaced properly
[ 1646657 ] w:tab not replaced correctly
[ 1646663 ] w:sym character are lost

I did not include the full word xml document because it's
too big. But
if you need it you can download it from (need to be
converted to xml
first):

http:/
/medical.nema.org/dicom/2007/07_03pu.doc

Thanks !
-Mathieu

On 1/28/07, Steve Ball <Steve.Ballexplain.com.au> wrote:
> Hi Mathieu,
>
> It would be good if you could submit a bug report on
SourceForge so
> that I can track this issue.
>
> Please send me a complete sample Word document that
demonstrates this
> problem.  I'm currently working on a new set of
conversion
> stylesheets and I will look at fixing this in that new
work.
>
> Cheers,
> Steve Ball
>
> On 28/01/2007, at 9:39 AM, Mathieu Malaterre wrote:
>
> > On 1/27/07, Mathieu Malaterre
<mathieu.malaterregmail.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:ke
epLines/></
> >> 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?lis
t=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
> >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail:
docbook-apps-unsubscribelists.oasis-open.org
> > For additional commands, e-mail:
docbook-apps-helplists.oasis-
> > open.org
> >
> >
>
>


-- 
Mathieu

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )