OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to get MS Word graphics into DocBook XML w/ OOo 2.0.3?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
darya
General User
General User


Joined: 10 Aug 2006
Posts: 24
Location: Germany

PostPosted: Fri Aug 11, 2006 12:31 am    Post subject: How to get MS Word graphics into DocBook XML w/ OOo 2.0.3? Reply with quote

Hi,

after solving my first problem, creating DocBook XML w/ OOo 2.0.3 at http://www.oooforum.org/forum/viewtopic.phtml?t=41154 I have now a problem when exporting MS Word documents which contain graphics Confused

Is there a way to get MS Word documents with graphics into a DocBook XML file through OpenOffice Writer 2.0.3 Question

Regards,
Darya
Back to top
View user's profile Send private message
darya
General User
General User


Joined: 10 Aug 2006
Posts: 24
Location: Germany

PostPosted: Fri Aug 11, 2006 1:54 am    Post subject: Reply with quote

It's very easy to reproduce.


  • Create MS Word Document with one line "Hello World" and one graphic of your choice.
  • Open new MS Word document in OpenOffice Writer.
  • Save the document As DocBook XML


The resulting DocBook XML will be someting like:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<article lang="de-DE">
  <para>Hello World!</para>
  <para/>
  <para>
    <inlinegraphic fileref="" width=""/>
  </para>
</article>


The line <inlinegraphic fileref="" width=""/> is empty Shocked

Any hints Question

Regards,
Darya
Back to top
View user's profile Send private message
darya
General User
General User


Joined: 10 Aug 2006
Posts: 24
Location: Germany

PostPosted: Fri Aug 11, 2006 2:30 am    Post subject: Maybe I can write myself the missing graphic transformation Reply with quote

Interestingly the transformation XSL for .doc to .odt did work fine, because here the graphic from my MS Word document is included. But Saving As DocBook (.xml) from .doc or .odt is doing nothing with these graphic Crying or Very sad .

The first step I would do is to check the transformation XSL for transforming OpenOffice's internal representation of my MS Word document to the DocBook XML. So far I've no clue how the internal OpenOffice representation looks like but shouldn't it be an XML by itself Question

I mean I use a transformation XSL always between an Input XML and and Output XML. So because the internal OpenOffice representation holds the reference to the graphic it must somehow be possible to transform this information into the output DocBook XML file Confused

Of course I prefer to take the line of the least resistance.

Any hints are welcome.

Regards,
Darya
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Fri Aug 11, 2006 6:57 am    Post subject: Re: Maybe I can write myself the missing graphic transformat Reply with quote

darya wrote:
... how the internal OpenOffice representation looks like but shouldn't it be an XML by itself ?


If you save a file as an .odt you can see the contents by renaming it .zip and then "unzipping" it.

You can look at the content.xml file in a text editor. If the images in the document have been saved with the link box unchecked you will find lines like these:
Code:
<draw:frame draw:style-name="fr1" draw:name="graphics1" text:anchor-type="paragraph" svg:width="14.649cm" svg:height="7.682cm" draw:z-index="1">
<draw:image xlink:href="Pictures/100000000000063E000003463ECDAB4F.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
</draw:frame>

and if you save with the link box checked:
Code:
<draw:frame draw:style-name="fr1" draw:name="graphics1" text:anchor-type="paragraph" svg:width="14.649cm" svg:height="7.682cm" draw:z-index="1">
<draw:image xlink:href="[RELATIVE_PATH_TO_PICTURE_FOLDER]/image.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="&lt;All formats&gt;"/>
</draw:frame>


Presumably you could edit one to the other and then re-zip the contents of the .odt back together again.
Back to top
View user's profile Send private message
darya
General User
General User


Joined: 10 Aug 2006
Posts: 24
Location: Germany

PostPosted: Mon Aug 14, 2006 3:22 am    Post subject: Reply with quote

I don't like the copy paste idea Crying or Very sad

Any more hints Question
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group