Hi,
as mentioned in <[EMAIL PROTECTED]> I am trying
to create a odf2xhtml XSL-T. I came into some serious problems:
It seems, at least to my knowledge and skills, impossible to create a
clean ODF -> XHTML translation. Check this horrible result out. Of
course, this is completly invalid HTML and Mozilla gets the hickups.
"content.xml" (the source):
<text:h text:style-name="Heading_20_1" text:outline-level="1">
<draw:frame draw:style-name="fr2" draw:name="Grafik1"
text:anchor-type="paragraph" svg:x="2.27cm"
svg:y="2.057cm" svg:width="5.689cm" style:rel-width="22%"
svg:height="5.539cm" style:rel-height="scale"
draw:z-index="11">
<draw:image
xlink:href="Pictures/100000000000012C0000012CBED4AE2D.jpg" xlink:type="simple"
xlink:show="embed" xlink:actuate="onLoad"/>
</draw:frame>TITLE_TEXT
</text:h>
<text:p text:style-name="Text_20_body"><draw:frame draw:style-name="fr3"
draw:name="KaratekaPrincess" text:anchor-type="paragraph"
svg:x="15.727cm" svg:y="0.279cm"
svg:width="10.16cm" svg:height="7.17cm" draw:z-index="4">
<draw:image
xlink:href="Pictures/10000201000001800000010FE410B668.png" xlink:type="simple"
xlink:show="embed" xlink:actuate="onLoad" />
</draw:frame>SOME_PARAGRAPH_TEXT
<text:span
text:style-name="Emphasis">THIS_WILL_BE_EMPHASIZED</text:span>.PARAGRAPH_TEXT_CONTINUES
</text:p>
"content.html" (the result):
<div style="top:2.27cm;left:2.057cm;height:5.539cm;width:5.689cm;border:1px
solid black;">
<img src="Pictures/100000000000012C0000012CBED4AE2D.jpg"
alt="Pictures/100000000000012C0000012CBED4AE2D.jpg"/>
</div>TITLE_TEXT
<p>
<div
style="top:15.727cm;left:0.279cm;height:7.17cm;width:10.16cm;border:1px solid
black;">
<img src="Pictures/10000201000001800000010FE410B668.png"
alt="Pictures/10000201000001800000010FE410B668.png"/>
</div>SOME_PARAGRAPH_TEXT<span>THIS_WILL_BE_EMPHASIZED</span>.PARAGRAPH_TEXT_CONTINUES.
</p>
This is completly crazy!
Please note, that both images are outlined "at paragraph" in OpenOffice.
So it should not happen, imo, that the first image gets put into the
<text:h>, since there is clearly a new paragraph following the
heading. I mean, the title comes _before_ the image in the document,
which is aligned at the side to the paragraph following the heading.
I also have no clue as to what technique to use in order to get the
<text:p> and the <draw:frame> correct. In HTML the only element,
that would match a draw-frame would be a <div>, but a <div> is not
allowed within <p>. So, for the ODF this is perfectly fitting, also
it is perfectly legal to have an <img> within a <p> in HTML, but as
soon we get the frame, there seems to be a problem.
I would be very glad if someone would know of a solution, since right
now, I make all a <div> and this is surley not, how HTML should be marked up.
Also, I see no way as how to deliver the 'width' and 'height' attributes to
the <img>, since there is no such information in the ODF, except for the
frame surrounding it. But that is not the same and I do not want to rely on
such a frame. This could be achieved programatically with an export filter
maybe (I did not investigate those filters so far) or by including the XSL-T
into a makefile or ant-build, but that is not for the average user anymore then
and would rely on external utilities.
Thanks.
--
Bye,
Andreas M.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]