-1

The problem i'm having is displaying two block tags on one line:

<fo:table-cell>
    <fo:block color="#808080" font-size="30px" font-weight="bold">
        <xsl:text>Lot: </xsl:text>
    </fo:block>
    <fo:block>
        <xsl:value-of select="$test/lot"></xsl:value-of>
        <xsl:text>&#xa;</xsl:text>
    </fo:block>
</fo:table-cell>

this shows up as:

LOT:

some_value

i want ti so show as:

LOT: some_value

*edit: < fo:inline > doesn't work at all. throws an error.

pecvari
  • 11
  • 3

1 Answers1

0

fo:table-cell contains only block-level FOs, so put them both in one fo:block that contains an fo:inline for 'Lot:':

<fo:table-cell>
    <fo:block>
        <fo:inline color="#808080" font-size="30px" font-weight="bold">Lot: </fo:inline>
        <xsl:value-of select="$test/lot" />
    </fo:block>
</fo:table-cell>
Tony Graham
  • 7,306
  • 13
  • 20
  • it worked! i still don't understand why it didn't, cause i tried with inline tags and never worked. well, now it works, and i've also successfully added inline to other parts of the code. nice, thanks :) – pecvari Jun 22 '22 at 08:01
  • It would not have worked if you put the `fo:inline` (or text) as a child of `fo:table-cell`. The definition of every FO includes its allowed contents. For `fo:table-cell`, it's `(%block;)+` (see https://www.w3.org/TR/xsl11/#fo_table-cell). You can get the expansion of `%block;`, etc., at https://www.w3.org/TR/xsl11/#d0e6532. – Tony Graham Jun 22 '22 at 21:35