This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
You are not supposed to do it manually: stylesheets or other preprocessors
should be able to cope with the task. Our initial assumption was that a user can implement a line breaking algorighm of whatever complexity
by writing a separate preprocessor that would insert zero-width spaces and soft hyphens to control the formatter. Now it seems that the interface
is too low-level, and requires too much effort to leverage.
<?xml version="1.0" encoding="windows-1250"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" exclude-result-prefixes="exsl" version="1.0">
<xsl:template match="text()" mode="hyphenatize" priority="2"> <xsl:call-template name="string.subst"> <xsl:with-param name="string"> <xsl:call-template name="string.subst"> <xsl:with-param name="string"> <xsl:call-template name="string.subst"> <xsl:with-param name="string" select="."/> <xsl:with-param name="target" select="'.'"/> <xsl:with-param name="replacement" select="'.​'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="target" select="'\'"/> <xsl:with-param name="replacement" select="'\​'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="target" select="'/'"/> <xsl:with-param name="replacement" select="'/​'"/> </xsl:call-template> </xsl:template>
<xsl:template match="node()|@*" mode="hyphenatize"> <xsl:copy> <xsl:apply-templates select="node()|@*" mode="hyphenatize"/> </xsl:copy> </xsl:template>
-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. XML a Java 13.-14.4. XSL-FO 20.4. DocBook 18.-19.5. XSLT 24.-26.5. ------------------------------------------------------------------
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |