Ask Your Question
0

Difference between MS Office and LibreOffice in saving file as Word 2003 XML [closed]

asked 2013-11-14 02:58:12 +0200

bager gravatar image

updated 2015-09-09 21:38:19 +0200

Alex Kemp gravatar image

I have a question. I save .doc document in MS Word as MS Word 2003 XML file and it looks like that:

<w:p>
    <w:r>
        <w:rPr>
            <w:i/>
            <w:b/>
        </w:rPr>
        <w:t xml:space="preserve">This is a </w:t>
    </w:r>
    <w:r>
        <w:rPr>
            <w:b/>
        </w:rPr>
        <w:t xml:space="preserve">bold </w:t>
    </w:r>
</w:p>

But when I save this .doc in LibreOffice (as a MS Word 2003 XML file, too) it looks different, like this:

<w:r>
    <w:rPr>
        <w:rStyle w:val="T15"/>
    </w:rPr>
    <w:t> 1.1.1.3 </w:t>
</w:r>
<w:r>
    <w:rPr>
    <w:rStyle w:val="T12"/></w:rPr>
    <w:t>Věty hlavní spojené spojovacím výrazem</w:t>
</w:r>

Am I doing something wrong ? Or a reason is compatibility between LibreOffice and MS Office. Is there any tutorial or xml schema ? How do I know which tag is bold or italic ?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-14 14:47:31.409359

1 Answer

Sort by » oldest newest most voted
0

answered 2013-11-14 04:49:04 +0200

oweng gravatar image

updated 2013-11-14 04:50:55 +0200

I save .doc document in MS Word as MS Word 2003 XML file

I think you mean an ".xml document in MS Word as MS Word 2003 XML" Sorry, I understand what you mean now, you are saving a DOC (Word 97-2003 format) to the Word 2003 XML format.

Am I doing something wrong ? Or a reason is compatibility between LibreOffice and MS Office.

It is unlikely you are doing something wrong. This is more likely a reflection of LO not comprehensively supporting this particular file format or simply writing out the code differently. Both methods are correct, just different.

Is there any tutorial or xml schema ?

The various LO to WordML XSLTs can be found here.

How do I know which tag is bold or italic ?

In the LO-generated XML this element: <w:rStyle w:val="T12"/> is a reference to a character text style (number 12) which will likely be where the bold definition is made e.g.,

<w:style w:styleId="T2" w:type="character">
    <w:name w:val="T2"/>
    <w:hidden w:val="on"/>
    <w:rPr>
        <w:b/>
    </w:rPr>
</w:style>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-11-14 02:58:12 +0200

Seen: 1,390 times

Last updated: Nov 14 '13