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

[XHTML export] Viewing with Internet Explorer

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


Joined: 03 May 2006
Posts: 9

PostPosted: Wed May 03, 2006 10:41 am    Post subject: [XHTML export] Viewing with Internet Explorer Reply with quote

Hi everibody,
i'm testing XHTML export from my odt document (with ooo 2.0.2), it is working well with Mozilla Firefox but Internet Explorer is printing me the xml file source.... I try to prune the file of <?xml tag but after that this dumb IE print me a blank page!
I know it is not directly related to OOo (i saw the question not answered in another thread) but it would be interesting to understand this behaviour, indeed, i use firefox but i need to be compatible with IE ...
Thans very much for any help
Back to top
View user's profile Send private message
elspliffo
General User
General User


Joined: 03 May 2006
Posts: 9

PostPosted: Thu May 04, 2006 4:09 am    Post subject: Reply with quote

Ok, i'm responding to myself Very Happy . I've made a few research concerning this problem :
*if the first tag is "<?XML" (like in OOo XHTML export), IE is displaying directly the source XML file. To display it in IE, you'll have to remove this tag.
*once this done, IE print a blank page, this seems to be due to the tag "<title />" which is generated in XHTML export. I don't know if this tag is right, for me, it should be "<title>title's name</title>". If you remove this tag then the page is printed correctly. Is anybody knows if there is a referenced bug concerning this?
Thanks
Back to top
View user's profile Send private message
elspliffo
General User
General User


Joined: 03 May 2006
Posts: 9

PostPosted: Tue May 09, 2006 12:48 pm    Post subject: Reply with quote

I finish my monologue, i made a shell script to remove IE problematic elements in OOo XHTML generated code :

Code:
 XHTMLTransform.sh
#!/bin/bash

FILENAME=$1

#FIRST transformation : remove xml tag
sed 's/<?xml version.*?>//g' $FILENAME > $FILENAME.bak1
#SECOND transformation remove : remove title tag
sed 's/<title \/>//g' $FILENAME.bak1 > $FILENAME.bak2
#THIRD transformation remove : remove img tag
sed 's/<img[^>]*>//g' $FILENAME.bak2 > $FILENAME.bak3

rm $FILENAME $FILENAME.bak1 $FILENAME.bak2;
mv $FILENAME.bak3 $FILENAME;

You'll have to paste this in a file and save it as XHTMLTransform.sh. Then :
Code:
chmod u+x XHTMLTransform.sh
XHTMLTransform.sh XHTMLFileToTransform

This will generate a file readable both with IE and Firefox. Hope this will help ...
Bye.
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