Menu

#46 stop hyphenation of email address in fo

closed-fixed
nobody
XSL (122)
5
2002-06-29
2002-02-06
No

Below is a patch to fo/inline.xsl of the
docbook-xsl-1.48 package to tell FOP to not hyphenate
email addresses. It is kinda ugly in that the output
will look like:
<fo:inline font-family="Courier"><fo:inline
wrap-option="no-wrap">user@host.tld</fo:inline></fo:inline>
but at least the final printed output is right.

*** fo/inline.xsl.orig Wed Feb 6 17:14:21 2002
--- fo/inline.xsl Wed Feb 6 17:28:30 2002
***************
*** 675,683 ****
--- 675,685 ----
<xsl:template match="email">
<xsl:call-template name="inline.monoseq">
<xsl:with-param name="content">
+ <fo:inline wrap-option="no-wrap">
<xsl:text><</xsl:text>
<xsl:apply-templates/>
<xsl:text>></xsl:text>
+ </fo:inline>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

Discussion

  • Norman Walsh

    Norman Walsh - 2002-02-11

    Logged In: YES
    user_id=81663

    I'm not sure wrap-option is the right property. In
    particular, processors are only required to support it when
    linefeed-treatment is preserve. So I implemented this by
    setting keep-together=always and hyphenate=false, I believe
    that should have the same effect.

     
  • Norman Walsh

    Norman Walsh - 2002-02-11
    • status: open --> closed-fixed
     
  • William McArthur

    • status: closed-fixed --> pending-fixed
     
  • William McArthur

    Logged In: YES
    user_id=67048

    When reading the spec I noticed hyphenate but from my
    understanding of fo:inline and hyphenate
    http://www.w3.org/TR/xsl/slice6.html#fo_inline
    http://www.w3.org/TR/xsl/slice7.html#hyphenate
    It seemed to me hyphenate was not a valid property for
    fo:inline . It looks like your right about wrap-option and
    the keep-together.within-line="always".

     
  • William McArthur

    • status: pending-fixed --> open-remind
     
  • William McArthur

    Logged In: YES
    user_id=67048

    with FOP 0.20.3rc <fo:inline
    keep-together.within-line="always"> worked just fine.

     
  • Norman Walsh

    Norman Walsh - 2002-06-29

    Logged In: YES
    user_id=81663

    Thanks for the feedback.

     
  • Norman Walsh

    Norman Walsh - 2002-06-29
    • status: open-remind --> closed-fixed
     

Log in to post a comment.