0

I am trying to rotate the header row of my CALS table 90 degrees. However, when compiling, the parameters are ignored and the formatting stays the same.

The table is in CALS format in an .xsl file, which is translated into DocBook, which is why I cannot use CSS to format.

This is what I have so far:

<table frame="all">
    <title>Title</title>
    <tgroup cols="3">
        <thead valign="bottom">
            <row>
                <entry>
                    <?dbfo orientation="90"?>
                    <?dbfo rotated-width="1in"?>
                    FirstCell
                </entry>
                <entry>
                    <?dbfo orientation="90"?>
                    <?dbfo rotated-width="1in"?>
                    SecondCell
                </entry>
                <entry>
                    <?dbfo orientation="90"?>
                    <?dbfo rotated-width="1in"?>
                    ThirdCell
                </entry>
            </row>
        </thead>
        <tbody>
            <row>
                <entry>1</entry>
                <entry>2</entry>
                <entry>3</entry>
            </row>
            <row>
                <entry>4</entry>
                <entry>5</entry>
                <entry>6</entry>
            </row>
        </tbody>
    </tgroup>
</table>

The table itself is being put out just fine, with the exception that the parameters

<?dbfo orientation="90"?>
<?dbfo rotated-width="1in"?>

are simply being ignored and the cells in the header row are still the same.

I have already tried to use to wrap the parameters with <xsl:text> and/or escape the characters, without any effect. Is there any other way to rotate the text direction, or is there anything I might have missed?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Johannes M.
  • 13
  • 1
  • 3
  • It works for me. I get rotated table entries (FOP 2.1). To identify what you might have missed, I think you need to provide a [mcve]. – mzjn Mar 25 '18 at 08:12
  • Btw, *"The table is in CALS format in an .xsl file, which is translated into DocBook"* does not really make sense. You don't put CALS tables in .xsl files, you put them in DocBook source XML files. – mzjn Mar 25 '18 at 08:13
  • So the thing is that I have the .xml where I write one part. The table however, is to be generated automatically independent of what the content might be. That way I can use the same stylesheet for different documents of the same type, if that makes sense? – Johannes M. Mar 26 '18 at 11:12
  • But you are right in the sense that it works perfectly if I would write the table into the .xml. What I might have to add is that the .xsl stylesheet is using the .xml to translate that into a docbook XML file, which is then processed further. But in this transformation, the orientation parameters are ignored and I just get a plain table. – Johannes M. Mar 26 '18 at 11:19
  • I cannot reproduce your problem. If you need more help, we need a [mcve]. – mzjn Mar 26 '18 at 13:07
  • I don't know if it helps, but this question actually looks a bit similar: https://stackoverflow.com/q/49578404/407651. It also involves generating DocBook tables and using a processing instruction. – mzjn Mar 31 '18 at 08:12

0 Answers0