← Prev in month
← Prev in thread
Next in thread →
Next in month →
Antwort: Re: [docbook-apps] DocBook 5 - different color for hyperlinks inPDF output
I am sorry, but I tried that in every possible constellation and with every xpath-expression known to man (me ;-) and it seems that every element and attribute can be resolved with the exeption of exactly the xlink:href-attribute. Have a look at this: <!-- macht die externen links in pdfs blau, xrefs grün, see also links in glossaries grau --> <xsl:attribute-set name="xref.properties"> <xsl:attribute name="color"> <xsl:choose> <xsl:when test="self::link and @linkend">grey</xsl:when> <xsl:when test="self::link and @xlink:href">blue</xsl:when> <xsl:when test="self::xref and @linkend">green</xsl:when> <xsl:when test="self::glossseealso and @otherterm">grey</xsl:when> <xsl:otherwise>black</xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set> What am I missing? Is it a namespace-problem with xlink: ? I put the namespace on top of my customization layer: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" exclude-result-prefixes="#default"> What is wrong? Regards, Benno Johannes Katelaan <> 04.12.2009 10:28 An Bob Stayton <> Kopie <> Thema Re: [docbook-apps] DocBook 5 - different color for hyperlinks in PDF output Yes, correct. So the DocBook-5-Version would be as follows: <xsl:attribute-set name="xref.properties"> <xsl:attribute name="color"> <xsl:choose> <xsl:when test="self::d:link and @xlink:href">blue</xsl:when> <xsl:otherwise>inherit</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="text-decoration"> <xsl:choose> <xsl:when test="self::d:link and @xlink:href">underline</xsl:when> <xsl:otherwise>inherit</xsl:otherwise> </xsl:choose> </xsl:attribute> </xsl:attribute-set> Thanks! Johannes Am 03.12.2009 um 18:02 schrieb Bob Stayton: > Yes, xref.properties usually affects all links. However, an xsl:choose statement inside the attribute body can be more selective, as the example in the referenced documentation shows. > > Bob Stayton > Sagehill Enterprises > > > > ----- Original Message ----- From: "Johannes Katelaan" <> > To: "Bob Stayton" <> > Cc: <> > Sent: Thursday, December 03, 2009 8:58 AM > Subject: Re: [docbook-apps] DocBook 5 - different color for hyperlinks in PDF output > > > Hi Bob, > > it's intended only for external links. I'm creating internal links using olink. These must not be affected by this customization. So I think I may not use xref.properties. Is this correct? > > Regards > > Johannes > > Am 03.12.2009 um 17:47 schrieb Bob Stayton: > >> Hi, >> The attribute-set named 'xref.properties' is available to add properties like color to links. See this reference: >> >> http://www.sagehill.net/docbookxsl/CustomXrefs.html#CustomXrefStyle >> >> However, it isn't clear from your message if you indent this for all links or only links to external documents. >> >> Bob Stayton >> Sagehill Enterprises >> >> >> >> ----- Original Message ----- From: "Johannes Katelaan" <> >> To: <> >> Sent: Thursday, December 03, 2009 5:47 AM >> Subject: [docbook-apps] DocBook 5 - different color for hyperlinks in PDF output >> >> >>> 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: >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> For additional commands, e-mail: >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- To unsubscribe, e-mail: For additional commands, e-mail:
← Prev in month
← Prev in thread
Next in thread →
Next in month →