Hi,
I think it is best for you to try and see how the generated FO file looks like.
Edit the Oxygen DITA Map transformation scenario and in the
Parameters tab add a new parameter:
retain.topic.fo with the value
yes.
At the end of the transformation you should have in the output directory a FO file called
topic.fo which you can open in Oxygen.
Also, the XSLT stylesheet which generates the FO elements for images is this one:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl
Search in it for the XSL template called:
<xsl:template match="*[contains(@class,' topic/image ')]">
That template uses the attribute sets you are modifying in the
commons-attr.xsl.
In the generated FO file you can search after each transformation for
fo:external-graphic and see how the attributes are set to them.
So I don't know exactly if you are using simple images or images embeded inside figures but for the first case the generated FO file should look like:
Code: Select all
<fo:block id="" space-after="0.6em" space-after.optimum="3pt"
space-before="0.6em" text-indent="0em">
<fo:inline id="">
<fo:external-graphic
content-width="50%" keep-with-previous.within-page="always" src="url(images\Iris_sanguinea.jpg)"/>
</fo:inline>
</fo:block>
Your approach of using
keep-with-previous.within-page should work BUT:
From what I've tested it should be set on the
fo:block and not on the internal
fo:inline or
fo:external-graphic elements. The idea would be that the
fo:block to which it is set has a previous sibling block which contains one of the previous paragraphs.
I don't think this can be done only modifying the
commons-attr.xsl. You will probably have to edit the
commons.xsl and set the value hard-coded to some
fo:block there.
You can add some
xsl:message's to see how the image FO content is generated for your case (depending also on the attributes set on the image from the DITA XML).
Sorry I cannot help further. Maybe you can also write on the DITA Users list about this:
http://tech.groups.yahoo.com/group/dita-users/
Regards,
Radu