Just a quick follow up question...

Is this the intended (permanent) behavior of
http://docbook.sourceforge.net/release/xsl/current/doc/fo/activate.external.olinks.html
in that it work only for <olink> elements and not also with elements having
the xlink:role="http://docbook.org/xlink/role/olink"; attribute?

(I was thinking of elements having the xlink:role="
http://docbook.org/xlink/role/olink"; attribute as being olinks, too.)

Regards,
Mark


On Wed, Jun 4, 2014 at 11:36 AM, Mark Craig <[email protected]> wrote:

> Thanks Nick!
>
> <olink> vs. <link xlink:role="http://docbook.org/xlink/role/olink";> is
> indeed what makes the difference.
> I was I guess mistakenly expecting them to work in the same way.
>
> In my example, your solution works fine both using xsltproc, fop, and the
> stylesheets directly and also using docbkx-tools with <olink
> targetdoc="book" targetptr="chapter">link to book's chapter</olink>, but
> not with <link> having xlink:role="http://docbook.org/xlink/role/olink";.
>
> I guess the workaround is then to transform all the links with olink roles
> into <olink> before processing the output.
>
> Regards,
> Mark
>
>
> On Wed, Jun 4, 2014 at 11:20 AM, Wood Nick <[email protected]>
> wrote:
>
>>  Mark,
>>
>>
>>
>> Then I doubt the <xsl:param name="activate.external.olinks" select="0" />
>> will work.  Have you tried linking using <olink targetdoc=”foodoc”
>> targetptr=”foochap />, if you haven’t there are some additional actions
>> required such as generating the target data files.
>>
>>
>>
>> I have a sample (on an internal network) if you need it.
>>
>>
>>
>> Regards
>>
>>
>>
>> Nick
>>
>>
>>
>> *From:* Mark Craig [mailto:[email protected]]
>> *Sent:* Wednesday, June 04, 2014 10:16 AM
>> *To:* Wood Nick
>> *Cc:* Bob Stayton; DocBook Apps
>>
>> *Subject:* Re: [docbook-apps] Coloring only internal links in FO?
>>
>>
>>
>> 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