| View previous topic :: View next topic |
| Author |
Message |
elspliffo General User

Joined: 03 May 2006 Posts: 9
|
Posted: Wed May 03, 2006 10:41 am Post subject: [XHTML export] Viewing with Internet Explorer |
|
|
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 |
|
 |
elspliffo General User

Joined: 03 May 2006 Posts: 9
|
Posted: Thu May 04, 2006 4:09 am Post subject: |
|
|
Ok, i'm responding to myself . 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 |
|
 |
elspliffo General User

Joined: 03 May 2006 Posts: 9
|
Posted: Tue May 09, 2006 12:48 pm Post subject: |
|
|
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 |
|
 |
|