OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Improving ulink fo rendering


Hi Camille,

Submit at Sourceforge, please.
Either as a feature request or as a patch -

  http://sourceforge.net/tracker/?func=add&group_id=21935&atid=373750
  http://sourceforge.net/tracker/?func=add&group_id=21935&atid=373749

Camille B?gnis <camille@neodoc.biz> writes:

> hello,
> 
> These are two modifications I suggest: in FO XSL stylesheets:
> 
> 1) make the url text an actual link
> It is frustrating not to be able to click on a URL but only on the ulink text.
> This can be done simply by moving down the fo:basic-link closing tag down in 
> the <xsl:template match="ulink" name="ulink">
> 
> 2) allow URL hyphenation on a custom list of characters.
> This relies on adding of a new param:
>   <xsl:param name="ulink.hyphenate.chars" select="':/@&amp;?.'"/>
> 
> and modification of the hyphenate-url template as follows:
> 
>   <xsl:template name="hyphenate-url">
>     <xsl:param name="url" select="''"/>
>     <xsl:choose>
>       <xsl:when test="$ulink.hyphenate = ''">
>         <xsl:value-of select="$url"/>
>       </xsl:when>
>       <xsl:when test="not(string-length($url) = 1)">
>         <xsl:variable name="char" select="substring($url, 0, 2)"/>
>         <xsl:value-of select="$char"/>
>         <xsl:if test="contains($ulink.hyphenate.chars,$char)">
>           <xsl:copy-of select="$ulink.hyphenate"/>
>         </xsl:if>
>         <xsl:call-template name="hyphenate-url">
>           <xsl:with-param name="url" select="substring($url, 2, 1 div 0)"/>
>         </xsl:call-template>
>       </xsl:when>
>       <xsl:otherwise>
>         <xsl:value-of select="$url"/>
>       </xsl:otherwise>
>     </xsl:choose>
>   </xsl:template>
> 
> 

smime.p7s



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]