cell in a table overflew to the next cell

Here should go questions about transforming XML with XSLT and FOP.
Nikky_zhang
Posts: 17

cell in a table overflew to the next cell

Thu May 05, 2016 9:41 am

Hi,

Oxygen version is 17.0 DITA-OT version is 1.8.5

My problem is some of the content in a cell of a table overflew to the next cell.

The part which overflew to next cell is tagged by <codeph> or <apiname> in <entry>,for example: <coddph> SYSTEM.QSG.TRANSMIT.QUEUE</codeph> or <codeph>SYSTEM_QSG_TRANSMIT_QUEUE</codeph>

I have added the hyphenate="true" and wrap-option="wrap" in table-attr.xsl,please see the code below.

How could I force them to break two lines?

Thanks

Code: Select all

<xsl:attribute-set name="table.tgroup">
   
    <xsl:attribute name="table-layout">fixed</xsl:attribute>
    <xsl:attribute name="writing-mode">lr-tb</xsl:attribute>
    <xsl:attribute name="inline-progression-dimension">auto</xsl:attribute>
    <xsl:attribute name="width">auto</xsl:attribute>
    <xsl:attribute name="space-before">5pt</xsl:attribute>
    <xsl:attribute name="space-after">5pt</xsl:attribute>
    <xsl:attribute name="table-omit-header-at-break">false</xsl:attribute>
    <xsl:attribute name="table-omit-footer-at-break">false</xsl:attribute>
    <xsl:attribute name="border-collapse">collapse</xsl:attribute>
    <!--xsl:attribute name="end-indent"><xsl:value-of select="$side-col-width"/></xsl:attribute-->
    <xsl:attribute name="overflow">hidden</xsl:attribute>
    <xsl:attribute name="orphans">3</xsl:attribute>
   
   
    <!--It is a table-->
    <!--xsl:attribute name="table-layout">fixed</xsl:attribute-->
    <!--xsl:attribute name="width">auto</xsl:attribute-->
    <!--xsl:attribute name=&quot;inline-progression-dimension&quot;&gt;auto&lt;/xsl:attribute-->
    <!--        &lt;xsl:attribute name=&quot;background-color&quot;&gt;white&lt;/xsl:attribute&gt;-->
    <!--xsl:attribute name="space-before">5pt</xsl:attribute-->
    <!--xsl:attribute name="space-after">5pt</xsl:attribute-->
  </xsl:attribute-set>

  <xsl:attribute-set name="common.table.body.entry">
    <xsl:attribute name="space-before">3pt</xsl:attribute>
    <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
    <xsl:attribute name="space-after">3pt</xsl:attribute>
    <xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
    <xsl:attribute name="start-indent">3pt</xsl:attribute>
    <xsl:attribute name="end-indent">3pt</xsl:attribute>
    [color=#FF4000]<xsl:attribute name="hyphenate">true</xsl:attribute>[/color]
    [color=#FF8000]<xsl:attribute name="wrap-option">wrap</xsl:attribute>[/color]
    <xsl:attribute name="overflow">visible</xsl:attribute>
  </xsl:attribute-set>
[Codebox=html4strict file=Untitled.html][/Codebox]
  <xsl:attribute-set name="tbody.row.entry__content" use-attribute-sets="common.table.body.entry">
    <xsl:attribute name="margin-top">5pt</xsl:attribute>
    <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
    <xsl:attribute name="space-before">3pt</xsl:attribute>
    <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
    <xsl:attribute name="space-after">3pt</xsl:attribute>
    <xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
    <!-- have to condensed the letter of the entry /JY -->
    <!--xsl:attribute name="font-size">6pt</xsl:attribute-->
    <!--body cell contents-->
  </xsl:attribute-set>
radu_pisoi
Posts: 310
Location: Craiova

Re: cell in a table overflew to the next cell

Thu May 05, 2016 1:29 pm

Hi,

An workaround is to use the 'Zero Width Space' character (&#x200b;) to mark the places where you want to insert a line break.

Code: Select all

<codeph>SYSTEM_QSG_&#x200b;TRANSMIT_&#x200b;QUEUE</codeph>
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Nikky_zhang
Posts: 17

Re: cell in a table overflew to the next cell

Fri May 06, 2016 4:01 am

Hi ,

Are there any other methods to do something in DITA-OT, instead of change the source .dita files? or How could I do it much more automatically?



Thanks
Radu
Posts: 5217

Re: cell in a table overflew to the next cell

Mon May 09, 2016 10:36 am

Hi,

I remember there was an older conversation about the same usecase on the DITA Users List, maybe it will give you more ideas:

https://groups.yahoo.com/neo/groups/dita-users/conversations/topics/35559

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Nikky_zhang
Posts: 17

Re: cell in a table overflew to the next cell

Mon May 09, 2016 12:00 pm

Hi Radu,

Thanks you!

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest