On 27/10/06, Andreas M. <[EMAIL PROTECTED]> wrote:

The frame is not a wrapper. It can hold text below the image, like:

+-------------------+
| +---------------+ |
| |               | |
| |               | |
| |               | |
| |               | |
| |               | |
| |               | |
| +---------------+ |
| Figure 1: blah    |
+-------------------+

and OpenOffice (for example) handles it as structural element,
auto-numbering "Figure N".

In html that is a following-sibling. Nothing special.


> The other way would be to only action the frame if not within a para tag.
> Two templates, one for p/frame another for frame without p ancestor.

I think I know what you mean. But this is inconsistant. There is no way
to make sure, the author did not want to have a frame at that position.
No. You can only process the xml you have.

What if there is para-text inside of it and a picture (like shown
above), right within a frame.

Ignore the frame and process the contents in document order.

This would mean a construct like this
(which is invalid): <span><img/><p>Figure 1: bla</p></span>. And I would
need to transform this, since it is valid content.
Except you wouldn't generate the span.
The only other option would be to start using div instead of p
to reflect the extract stuff you get in ODF p tags.



>> Also, I see no way as how to deliver the 'width' and 'height'
>> attributes to
>> the <img>,
[...]
> So don't, if it doesn't make sense.
> Let the image be its natural size.

It is a common habit to tell the web-browser the real size of the image
so it can use these values for correctly laying out the text, even
before the image has been received, without forcing the user to find the
passage again, after the images were downloaded and the text re-layouted
(jumping text)

<text:p text:style-name="Standard">
<draw:frame draw:style-name="fr1" draw:name="graphics1"
text:anchor-type="paragraph" svg:width="8.819cm" svg:height="16.016cm"
draw:z-index="0">
<draw:image xlink:href="Pictures/10000000000000FA000001C67196286F.jpg"
xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
   </draw:frame></text:p>

From that you have the width and height.

If you are processing the img from a template matching draw:image,
don't.

Process it from draw:frame[draw:image]
then you can access the sizes.


HTH




--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to