[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl-fo: fo:floats stay with prev element and next elem

Subject: 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
 xsl-fo: fo:floats stay with prev element and next elem
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.