I have a problem when I publish my modspecs for pdf (XSL-FO). My tables have problems when the contents of a cell overflow its column into the next. How to force a text break so that a new line is created instead?
I cannot manually insert zero-space characters, since the entries in the table are entered programmatically. I am looking for a simple solution that I can simply add to docbook_pdf.xsl (either as an attribute xsl: param or xsl :).
EDIT: This is where I am now:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:import href="urn:docbkx:stylesheet"/> ...(the beginning of my stylesheet for pdf generation, eg header and footer content stuff) <xsl:template match="text()"> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="."/> </xsl:call-template> </xsl:template> <xsl:template name="intersperse-with-zero-spaces"> <xsl:param name="str"/> <xsl:variable name="spacechars"> 	
             ​ </xsl:variable> <xsl:if test="string-length($str) > 0"> <xsl:variable name="c1" select="substring($str, 1, 1)"/> <xsl:variable name="c2" select="substring($str, 2, 1)"/> <xsl:value-of select="$c1"/> <xsl:if test="$c2 != '' and not(contains($spacechars, $c1) or contains($spacechars, $c2))"> <xsl:text>​</xsl:text> </xsl:if> <xsl:call-template name="intersperse-with-zero-spaces"> <xsl:with-param name="str" select="substring($str, 2)"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>
At the same time, long words are successfully divided into table cells! Unfortunately, a side effect is that plain text in another place (for example, in interlinear X) now splits words so that they appear on separate lines. Is there a way to isolate the process described above with tables?
source share