I am using docbkx-tools with activate.external.links set to zero, and my 
external links are not coloured (nor hyperlinked) and my internal ones are 
coloured and hyperlinked. I am using olinks directly though. Maybe you could 
try replacing one of your links with an olink for a test, to see if this makes 
any difference.

Nat 

> On 4/06/2014, at 6:16 pm, Mark Craig <[email protected]> wrote:
> 
> Hi Nick,
> 
> The sample uses <link> with xlink:role set:
> 
> <link xlink:href="book#chapter"
> 
>       xlink:show="new"
> 
>       xlink:role="http://docbook.org/xlink/role/olink";>chapter</link>
> 
> 
> Regards,
> Mark
> 
> 
>> On Wed, Jun 4, 2014 at 9:12 AM, Wood Nick <[email protected]> wrote:
>> Mark,
>> 
>>  
>> 
>> Are you using the olink element in your source document, as I seem to recall 
>> in a post on the docbkx user forum that you was using link instead?
>> 
>>  
>> 
>> Regards
>> 
>>  
>> 
>> Nick
>> 
>>  
>> 
>>  
>> 
>> From: Mark Craig [mailto:[email protected]] 
>> Sent: Tuesday, June 03, 2014 9:41 PM
>> To: Bob Stayton
>> Cc: DocBook Apps
>> Subject: Re: [docbook-apps] Coloring only internal links in FO?
>> 
>>  
>> 
>> Hello again,
>> 
>>  
>> 
>> On the docbkx-tools list, Cedric suggested I try to reproduce the symptom of 
>> color showing up when <xsl:param name="activate.external.olinks" select="0" 
>> /> without using docbkx-tools, but instead using the 1.78.1 stylesheets 
>> directly.
>> 
>>  
>> 
>> That's actually easier said than done.
>> 
>>  
>> 
>> With 
>> https://github.com/markcraig/DOCS-47/commit/6b5ca793474887655dcfe95d585a8e0cbf5af9e5
>>  I can generate PDFs that do include olinks, and the inter-book olink does 
>> turn out blue. But I'm not sure the olinks are getting resolved correctly.
>> 
>>  
>> 
>> Where could I find a simpler example to read so I can see how turning off 
>> activate.external.olinks does deactivate the coloring?
>> 
>>  
>> 
>> Regards,
>> 
>> Mark
>> 
>>  
>> 
>> On Fri, May 2, 2014 at 11:34 PM, Mark Craig <[email protected]> wrote:
>> 
>> Thanks Bob, Chris,
>> 
>>  
>> 
>> At least I see what the expected behavior is.
>> 
>>  
>> 
>> No doubt a problem somewhere in my own code.
>> 
>>  
>> 
>> Mark
>> 
>>  
>> 
>>  
>> 
>> On Fri, May 2, 2014 at 7:53 PM, Bob Stayton <[email protected]> wrote:
>> 
>> Hi Mark,
>> Unless I'm misunderstanding what you are trying to do,
>> it should already work that way.  That is, if you are setting 
>> activate.external.olinks to zero, then the external olinks should render as 
>> plain text and not be formatted with the xref.properties attribute-set.  The 
>> xref.properties attribute-set is only applied when fo:basic-link is being 
>> output with @internal-destination, or if the element is an actual xref which 
>> also generates that output.
>> 
>> I just tried it with 1.78.1 and setting:
>> 
>> <xsl:param name="activate.external.olinks" select="0"/>
>> <xsl:param name="current.docid">shortbook</xsl:param>
>> 
>> 
>> 
>> <xsl:attribute-set name="xref.properties">
>>   <xsl:attribute name="color">#47a</xsl:attribute>
>> </xsl:attribute-set>
>> 
>> In my PDF, the internal olinks are colored, but my external olinks are not 
>> (and are not active).
>> 
>> Bob Stayton
>> Sagehill Enterprises
>> [email protected]
>> 
>> 
>> 
>> On 5/2/2014 12:07 AM, Mark Craig wrote:
>> 
>> Hello,
>> 
>> What is the right way with the 1.78.1 stylesheets to color only internal
>> links in FO?
>> 
>> I'd like to deactivate external olinks in PDF output with
>> activate.external.olinks, and then leave external links the same color as
>> surrounding text, but keep color on internal links (and URLs) because
>> without visual cues it can be difficult to notice that they're active.
>> 
>> At present I'm using the following customization, loosely based on
>> http://www.sagehill.net/docbookxsl/OlinkFormatting.html:
>> 
>>    <xsl:attribute-set name="xref.properties">
>>      <xsl:attribute name="color">#47a</xsl:attribute>
>>    </xsl:attribute-set>
>> 
>> This makes all the links blue... unfortunately including deactivated
>> external olinks.
>> 
>> I have tried setting olink.properties, too, with #000 as the color, but I
>> still see blue text in the PDF output for all links, including deactivated
>> external links.
>> 
>> Asking authors to add more attributes to external links is something I'd
>> like to avoid.
>> 
>> Thanks in advance for your time and your help.
>> 
>> Regards,
>> Mark
>> 
> 

Reply via email to