[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Advice on marking up ulinks
Marc Baaden wrote:
> But when I produce print output with ulink.show=1, the URLs are repeated
> very often, which is annoying.
>
> Is there a kind of middle way, eg having the proper links more or less
> everywhere in the html output, but less frequently in the print output ?
You can customize stylesheets to output URL only on a first occurence of
link. Try to add following template to your customization stylesheet:
<xsl:template match="ulink[preceding::ulink/@url=./@url]">
<fo:basic-link xsl:use-attribute-sets="xref.properties">
<xsl:attribute name="external-destination">
<xsl:call-template name="fo-external-image">
<xsl:with-param name="filename" select="@url"/>
</xsl:call-template>
</xsl:attribute>
<xsl:choose>
<xsl:when test="count(child::node())=0">
<xsl:call-template name="hyphenate-url">
<xsl:with-param name="url" select="@url"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</fo:basic-link>
</xsl:template>
--
-----------------------------------------------------------------
Jirka Kosek
e-mail: jirka@kosek.cz
http://www.kosek.cz
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]