Hi Husseinthanks for the info. I wanted to examine the <xyz>.fo file to understand what i need to do to keep a topic title together with an imagine following it.
I found more or less by hacking that what is required is that both the fig template and image container along with the section# title include the "keep-together.within-page" attribute formally shown below.
<xsl:attribute name="keep-together.within-page">always</xsl:attribute>The inclusion of a "keep-together.within-page" in a custome_fo.xsl file would like this
<!-- Topic formating --> <xsl:attribute-set name="section1-title" use-attribute-sets="topic-title"> <xsl:attribute name="break-before">page</xsl:attribute> <xsl:attribute name="font-size">180%</xsl:attribute> <xsl:attribute name="border-bottom">1.0pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section2-title" use-attribute-sets="topic-title"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> <xsl:attribute name="font-size">160%</xsl:attribute> <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> <xsl:attribute name="border-bottom">0.8pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section3-title" use-attribute-sets="topic-title"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> <xsl:attribute name="font-size">140%</xsl:attribute> <xsl:attribute name="border-bottom">0.6pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section4-title" use-attribute-sets="topic-title"> <xsl:attribute name="font-size">120%</xsl:attribute> <xsl:attribute name="border-bottom">0.4pt solid blue</xsl:attribute> </xsl:attribute-set> <!-- fig ============================================================== --> <xsl:attribute-set name="fig" use-attribute-sets="display-style"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> </xsl:attribute-set><!-- image ============================================================= -->
<xsl:attribute-set name="image-container"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> </xsl:attribute-set>Perhaps you may know a more elegant solution than the one i found you would like to share with me. If not my solution works.
Attached to this email you will find the "Riddle.fo" file to show how the "keep-together.within-page" is being applied to XSL-FO
Regards, Alberto----- Original Message ----- From: "Hussein Shafie" <[email protected]>
To: "Alberto Perri" <[email protected]> Cc: <[email protected]> Sent: Monday, April 16, 2012 10:30 AMSubject: Re: [ditac] How to prevent the automatic deletion of <xyz>.fo, ditac_lists.ditac_lists, <xyz>.ditac files
On 04/15/2012 07:41 PM, Alberto Perri wrote:is there a way of preventing the XMLmind XSL Utility from automatically deleting the <xyz>.fo, ditac_lists.ditac_lists, <xyz>.ditac files when converting from ditaToPDF using Apache FOP.I would like to examine the <xyz>.fo output before the utility deletes it.[1] Keep ditac_lists.ditac_lists, <xyz>.ditac?No, not using XMLmind XSL Utility. Instead please use the ditac command-line utility and pass it option "-preprocess".More information: http://www.xmlmind.com/ditac/_distrib/doc/manual/commandLine.html#commandLine__option-preprocess [2] Keep <xyz>.fo? Sure. Please select then edit ditaToPDF.[a] "Description" Tab: Rename ditaToPDF to ditaToFO (doing this will create a new conversion specification called ditaToFO and will not change anything in ditaToPDF)[b] "Description" Tab: While at it, please change the description and icon of ditaToFO.[c] "Description" Tab: Specify that the output file has a "fo" extension. [d] "Process" Tab: Select "No processing".More information: http://www.xmlmind.com/foconverter/_distrib/doc/help/com.xmlmind.xslutil.ConversionEditor.html
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0"> <!-- <xsl:import href="ditac-xsl:fo/fo.xsl"/> --> <xsl:import href="../../fo/fo.xsl"/> <!-- Topic formating --> <xsl:attribute-set name="section1-title" use-attribute-sets="topic-title"> <xsl:attribute name="break-before">page</xsl:attribute> <xsl:attribute name="font-size">180%</xsl:attribute> <xsl:attribute name="border-bottom">1.0pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section2-title" use-attribute-sets="topic-title"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> <xsl:attribute name="font-size">160%</xsl:attribute> <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> <xsl:attribute name="border-bottom">0.8pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section3-title" use-attribute-sets="topic-title"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> <xsl:attribute name="font-size">140%</xsl:attribute> <xsl:attribute name="border-bottom">0.6pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section4-title" use-attribute-sets="topic-title"> <xsl:attribute name="font-size">120%</xsl:attribute> <xsl:attribute name="border-bottom">0.4pt solid blue</xsl:attribute> </xsl:attribute-set> <!-- fig ============================================================== --> <xsl:attribute-set name="fig" use-attribute-sets="display-style"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> </xsl:attribute-set> <!-- image ============================================================= --> <xsl:attribute-set name="image-container"> <xsl:attribute name="keep-together.within-page">always</xsl:attribute> </xsl:attribute-set> <!-- Paragraphs --> <xsl:attribute-set name="p" use-attribute-sets="block-style"> <xsl:attribute name="font-size">110%</xsl:attribute> <!-- <xsl:attribute name="text-indent">1em</xsl:attribute> --> </xsl:attribute-set> <!-- Align text in tables left --> <xsl:template name="alignAttribute"> <xsl:if test="@align = 'left'"> <xsl:attribute name="text-align"> <xsl:choose> <xsl:when test="@align = 'char'"> <xsl:choose> <xsl:when test="@align/../@char"> <xsl:value-of select="@align/../@char"/> </xsl:when> <xsl:otherwise>.</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="@align"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:if> </xsl:template> </xsl:stylesheet>
Riddle.fo
Description: Binary data
-- XMLmind DITA Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/ditac-support

