[xep-support] Re: [docbook-apps] How to avoid a line break in a <phrase>

From: Ron Catterall <ron@catterall.net>
Date: Fri Feb 09 2007 - 06:01:42 PST
Re: [docbook-apps] How to avoid a line break in a <phrase>
I tried the customization (Docbook 4.5 xsl) below, but

<para>some long text <phrase role="keep-together">http://www.xxxxxxxxxxx.com/</phrase></para>

still gives:
..................................ht-
tp://www.xxxxxxxxxxx.com/


 <xsl:template name="inline.monoseq">
  
<xsl:param name="no-hyphenate" select="false()"/>
  
<xsl:param name="content">
    
<xsl:apply-templates/>
  
</xsl:param>
  
<fo:inline xsl:use-attribute-sets="monospace.properties">
<!-- Keith's customization: -->
    
<xsl:if test="@role[contains(., 'keep-together')]">
      
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
      
<xsl:attribute name="hyphenate">false</xsl:attribute>
    
</xsl:if>
    
<xsl:choose>
      
<xsl:when test="$no-hyphenate">
        
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
        
<xsl:attribute name="hyphenate">false</xsl:attribute>
      
</xsl:when>
       <xsl:otherwise>
         <xsl:attribute name="hyphenation-character">
          
<xsl:value-of select="'&#x200B;'"/>
        
</xsl:attribute>
      
</xsl:otherwise>
    
</xsl:choose>
    
<xsl:choose>
     
<xsl:when test="ancestor::footnote">
        
<xsl:attribute name="font-size">90%</xsl:attribute>
      
</xsl:when>
    
</xsl:choose>
<!-- end customization -->
    
<xsl:if test="@dir">
      
<xsl:attribute name="direction">
        
<xsl:choose>
          
<xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
          
<xsl:otherwise>rtl</xsl:otherwise>
        
</xsl:choose>
      
</xsl:attribute>
    
</xsl:if>
    
<xsl:copy-of select="$content"/>
  
</fo:inline>
 
</xsl:template>
Bob reports:
FOP has limited support for keep-together.  Version 0.93 now supports it for fo:block elements, but not for fo:inline.

I guess that Keith is using AntennaHouse.  I am using XEP 4.9, could it be that XEP also doesn't support keep-together for fo:inline - so this is posted to xep-support@renderx.com as well.


-- 
Ron Catterall, Phd, DSc                         email: ron@catterall.net
Prolongacion de Hidalgo 140                             http://catterall.net/
San Felipe del Agua                                        tel: +52 951 520 1821
Oaxaca      68020  Mexico                          fax: +1 530 348 8309
------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html Received on Fri Feb 9 06:29:07 2007

This archive was generated by hypermail 2.1.8 : Fri Feb 09 2007 - 06:29:12 PST