Re: [docbook-apps] DocBook 5 - different color for hyperlinks in PDF output

From
Johannes Katelaan <>
Date
2009-12-03T16:43:01+00:00
ID
Thread
Re: [docbook-apps] DocBook 5 - different color for hyperlinks in PDF output
Dean,

thanks for your reply. Inspired by your solution I created the following template for DocBook 5:

    <xsl:template match="d:link">

        <fo:basic-link external-destination="{@xlink:href}" text-decoration="underline" color="blue">

            <fo:inline>

                <xsl:choose>

                    <xsl:when test="count(child::node())=0">

                        <xsl:value-of select="@xlink:href" />                        

                    </xsl:when>

                    <xsl:otherwise>

                        <xsl:apply-templates/>

                    </xsl:otherwise>

                </xsl:choose>

            </fo:inline>

        </fo:basic-link>

    </xsl:template>

Regards,

Johannes

Am 03.12.2009 um 16:32 schrieb DeanNelson:

Johannes,

Here is what I use. It should be able to be run in DB5 (I am using DB4).

 

Regards,

Dean Nelson

 

    <!-- =========== Colored and hyphenated links ===================== -->
    <xsl:template match="ulink">
        <fo:basic-link external-destination="{@url}" xsl:use-attribute-sets="xref.properties"
            text-decoration="underline" color="blue">
            <xsl:choose>
                <xsl:when test="count(child::node())=0">
                    <xsl:value-of select="@url"/>
                </xsl:when>
    &nb
 sp;           <xsl:otherwise>
                    <xsl:apply-templates/>
                </xsl:otherwise>
            </xsl:choose>
        </fo:basic-link>
    </xsl:template>
   

 

 

In a message dated 12/03/09 05:48:36 Pacific Standard Time,  writes:

Hi, 

how can I change the color of hyperlinks created with 
<link xlink:href="some url">text I want in different color</link> 

Johannes 

--------------------------------------------------------------------- 
To unsubscribe, e-mail:  
For additional commands, e-mail: