This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Advice on marking up ulinks
- From: Jirka Kosek <jirka at kosek dot cz>
- To: Marc Baaden <baaden at smplinux dot de>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 14 Apr 2003 15:12:41 +0200
- Subject: Re: [docbook-apps] Advice on marking up ulinks
- References: <200304141017.MAA02399@apex.ibpc.fr>
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 at kosek dot cz
http://www.kosek.cz
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org