| View previous topic :: View next topic |
| Author |
Message |
gandonova Newbie

Joined: 21 Mar 2005 Posts: 2
|
Posted: Mon Mar 21, 2005 6:23 am Post subject: OpenOffice conversions .sxw <-->.doc |
|
|
Hi, all!
Did someone know how OpenOffice performs conversions from .sxw to .doc file and the opposite? I convert "a.sxw" file to "a.doc" file and then I do the opposite - convert "a.doc" to "a1.sxw". Next I compare the "a.sxw" file with "a1.sxw" file, and I see that content.xml files on these two are different. Why is that?
I supposed that "a.sxw" must be exactly like "a1.sxw". I need to know how OpenOffice does these conversions, because I need to fix this.
Thanks!
Galya |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Mon Mar 21, 2005 10:38 am Post subject: |
|
|
Take an English phrase.
Ask a skilled translator to translate it into Russian.
Now ask a different skilled translator to translate the Russian version back into English.
Is the XML of the english phrase the same after the round trip?
The problem is that some subtlties of meaning are altered during the translation. _________________ Want to make OOo Drawings like the colored flower design to the left? |
|
| Back to top |
|
 |
gandonova Newbie

Joined: 21 Mar 2005 Posts: 2
|
Posted: Mon Mar 21, 2005 10:13 pm Post subject: |
|
|
Thank you, DannyB!
But I need to know how (with some xslt or something else?) OpenOffice converts .doc file to .sxw file and the opposite, because I want to change the way it works and adapt it to my needs. I will explain you the situation which I want to do:
I have xml webpage files for a company website, written in French language. I want someone else with good knowledge of French, to check and edit French translation (because I'm not so sure in my French). To do this I need to convert my xml webpage files to .doc format (because the other person can't edit webpage xml). Then when he returned .doc files to me, I want to trnasform them again to webpage xml files and use them when building company website in French. So I do the following:
1. With some xslt - webpage2article.xsl (written by me) I transform these xml webpage files to Docbook xml article files.
2. With OpenOffice I open received in previous step DocBook file and I save it like OpenOffice .sxw file. (This is posible with OpenOffice, rigtht?).
3. Then again with OpenOffice, I save received .sxw (1) file as .doc file.
4. I or someone else edit .doc file with Microsoft Word.
5. With OpenOffice I convert .doc file to .sxw file (2).
6. Then I use content.xml file from unzipped .sxw file and with "sofftodocbookheadings.xsl" (written by OpenOffice with some my changes) convert it to Docbook Article file.
7. With article2webpage.xsl (written by me) I transform docbook article file to webpage xml file and use it building website.
Well, the problem is that file (1) and file (2) are with different structure and styles (not the content), but I want to have the same structure, styles. So I need to know more about OpenOffice transformations from .sxw to .doc and the opposite.
I hope that you understand me.
Thanks!
Galya |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Fri Mar 25, 2005 8:43 am Post subject: |
|
|
I don't know where to learn what you want to know other than to point you to the source code.
Ultimately, the conversion is all about semantics.
OOo has its own internal document model for a Writer document. All of the filters are just different ways to save and load a Writer document into various formats.
The conversion from SXW to DOC is really two steps. 1. load the SXW into memory, as a Writer document. 2. Save a Writer document into DOC format.
There no direct conversion from SXW to DOC. It is a matter of using one filter to load a document into a Writer document model. Then use another filter to save a Writer document model into some other format.
Ultimately, whatever you have in any of those formats must be something that can be represented within the Writer document model.
The SXW and OOT formats are most closely going to represent on disk what can be represented by a loaded Writer document model. _________________ Want to make OOo Drawings like the colored flower design to the left? |
|
| Back to top |
|
 |
|