[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] xsl-fo: fo:floats stay with prev element and next element starts after float


Subject: [xsl] xsl-fo: fo:floats stay with prev element and next element starts after float
From: Bryon Thomas <bthomas30@xxxxxxxxx>
Date: Thu, 26 Sep 2013 16:53:54 -0400

Hopefully Ill explain this clearly.

Using Oxygen 15 with DITA-OT 1.7, Antenna House 6, xsl-fo
xsl version 2.0. Non specialized DITA

I have many pages with instructions on left, and image on right. I
have placed the image inside the xml element I want it to be connected
to.
Every time  i have a new instruction with the image on the right, I
want the image top to start with the first line of text in the
element.
When I have multiple instructions and floats, I want the next float
to do the same as the first float, but start below the 1st image
float.

Right now, when I have multiple floats, the floats will all (mostly
starting from parent titles), group on the right under each other
starting at the top of the page. The xml elements on the left will all
bunch together on the top left (Meaning the text on the left is at the
top, and the images on right are from top to bottom.
Snippet of current code:Any help would be greatly appreciated, I can't
figure out the floats quickly enough.

<xsl:choose>
            <xsl:when test="not(@placement = 'inline')">
                <!--                <fo:float
xsl:use-attribute-sets="image__float">-->
                <fo:block xsl:use-attribute-sets="image__block">
                    <xsl:call-template name="commonattributes"/>
                    <xsl:apply-templates select="." mode="placeImage">
                        <xsl:with-param name="imageAlign" select="@align"/>
                        <xsl:with-param name="href" select="if (@scope
= 'external') then @href else concat($input.dir.url, @href)"/>
                        <xsl:with-param name="height" select="@height"/>
                        <xsl:with-param name="width" select="@width"/>
                    </xsl:apply-templates>
                </fo:block>
                <!--                </fo:float>-->
            </xsl:when>
            <xsl:when test="@outputclass= 'right'">
                <fo:float float="right" clear="end">
                    <xsl:call-template  name="commonattributes"/>
                    <fo:block xsl:use-attribute-sets="floatright">
                        <xsl:apply-templates select="."
mode="placeImage">
                            <xsl:with-param name="imageAlign" select="@align"/>
                            <xsl:with-param name="href" select="if
(@scope = 'external') then @href else concat($input.dir.url, @href)"/>
                            <xsl:with-param name="height" select="@height"/>
                            <xsl:with-param name="width" select="@width"/>
                        </xsl:apply-templates>
                    </fo:block>
                </fo:float>

    <xsl:attribute-set name="floatright">
        <xsl:attribute name="border-style">solid</xsl:attribute>
        <xsl:attribute name="border-color">black</xsl:attribute>
        <xsl:attribute name="border-width">1pt</xsl:attribute>
        <xsl:attribute name="keep-with-previous">always</xsl:attribute>
        <xsl:attribute name="space-after">5mm</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name="noboxright">
        <xsl:attribute name="keep-with-previous">always</xsl:attribute>
        <xsl:attribute name="space-after">5mm</xsl:attribute>
    </xsl:attribute-set>

xml code:
<body><ul><li><p> when performing operations, do x. <image href=....
outputclass="right" id=....:>


Current Thread
Keywords