Skip to main content
10-Marble
December 7, 2010
Question

XSL FO Float for Table Titles

  • December 7, 2010
  • 6 replies
  • 1609 views

Has anyone has any success using the float-scope attribute on the fo:float element?

I'm currently working on setting up Table Title Continued lines and within the Table element. I need the float-scope to be set for the table element but am not having any luck getting it to work. All other attributes work as expected. I have the float-scope set to read the id of the table element and when I do a transform it is producing the correct id but when I print preview in arbortext it repeats the Title Continued line on every table throughout the entire section. Like the scope is set for the chapter element and not the table element.

Here is my code:

<xsl:template match="imm:table/imm:title">

<fo:block xsl:use-attribute-sets="space text" text-align="center" start-indent="0pt">

<xsl:value-of select="."/>

fo:block>

<fo:float atixslfoext:float-class-reference="tabtitle" atixslfoext:float-scope="{parent::imm:table/@id}">

<fo:block xsl:use-attribute-sets="space text" text-align="center" start-indent="0pt">

<xsl:value-of select="."/>

<xsl:text> Continuedxsl:text>

fo:block>

fo:float>

xsl:template>


Any help wouldbe greatly appreciately.


Sarah

    6 replies

    1-Visitor
    December 7, 2010
    Sarah,

    I haven't really messed with the Arbortext extensions for the FO, but one thing strikes me as seemingly out of place. What is the purpose of the 'ID' attribute here?

    atixslfoext:float-scope="{parent::imm:table/@id}"

    It seems you'd want to scope the element and not the attribute.

    Just my something way less than two cents.



    ---- Sarah Copley <sarah.r.copley@uscg.mil> wrote:
    > Has anyone has any success using the float-scope attribute on the fo:float element?
    > I'm currently working on setting up Table Title Continued lines and within the Table element. I need the float-scope to be set for the table element but am not having any luck getting it to work. All other attributes work as expected. I have the float-scope set to read the id of the table element and when I do a transform it is producing the correct id but when I print preview in arbortext it repeats the Title Continued line on every table throughout the entire section. Like the scope is set for the chapter element and not the table element.
    > Here is my code:
    > <xsl:template match="imm:table/imm:title">
    > <fo:block xsl:use-attribute-sets="space" text&quot;=" text-align="center" start-indent="0pt">
    > <xsl:value-of select="."/">
    > </fo:block>
    > <fo:float atixslfoext:float-class-reference="tabtitle" atixslfoext:float-scope="{parent::imm:table/@id}">
    > <fo:block xsl:use-attribute-sets="space" text&quot;=" text-align="center" start-indent="0pt">
    > <xsl:value-of select="."/">
    > <xsl:text> Continued</xsl:text>
    > </fo:block>
    > </fo:float>
    > </xsl:template>
    >
    > Any help would be greatly appreciately.
    >
    > Sarah
    >
    >      
    > ----------     
    18-Opal
    December 7, 2010
    Hi Sarah-



    You've double-checked that the corresponding ID is being written to the
    10-Marble
    December 7, 2010
    Based on the information from the "Arbortext XSL FO Extended float capability" you are suppose to use the id attribute. It is also set that way in the example that they provide. But just for giggles I'll try it without.

    Thanks, Sarah
    1-Visitor
    December 7, 2010
    I don't know nothing about FO, but in FOSI, you must also have the float declared on the page model. Is this also necessary in FO? If so, are you sure you are calling out the float on the page model?
    10-Marble
    December 7, 2010
    Yes it is declared on the fo:simple-page-master in the fo:region-body.



    Yes the corresponding ID is being written to the fo:table id attribute and the id is showing up in the float-scope attribute.



    I remove the @id and just set the scope to the imm:table element but it still didn't scope correctly.






    10-Marble
    December 8, 2010

    Thanks to PaulG. thisissue has been resolved.

    In order for thefloat-scope to workthetitle block has to be outside the table block. I had the title block inside the table block.

    Correct Way:

    <fo:block id="tabf1">

    <fo:block>The table title</fo:block>

    <fo:float atixslfoext:float-class-reference="tabtitle"&lt;/font">

    atixslfoext:float-scope="tabf1">

    The table title continued

    </fo:float>

    <fo:table>

    <fo:table-column ...=">

    ...

    </fo:table>

    </fo:block>

    Incorrect Way:

    <fo:table>

    <fo:block>The table title</fo:block>

    <fo:float atixslfoext:float-class-reference="tabtitle"&lt;/p">

    atixslfoext:float-scope="tabf1">

    The table title continued

    </fo:float>

    <fo:table-column ...=">

    ...

    </fo:table>

    Thanks so much for all the responses I got. I always have great success with Adepters.


    Sarah Copley