Benno,
that's hard to say.
What about adding debug code like this to your xsl:attribute element:
<xsl:message>
<xsl:value-of select="concat('***
',local-name(.))"/>
</xsl:message>
<xsl:for-each select="@*">
<xsl:message>
<xsl:value-of select="concat('###
',namespace-uri(.),' - ',local-name(.))"/>
</xsl:message>
</xsl:for-each>
This should give you sufficient information to diagnose why it doesn't
work as expected.
Regards
Johannes
benno.wolf@gi-de.com schrieb:
OF0BD0BD51.49020C2A-ONC125768F.004DE368-C125768F.004EFAAB@gi-de.com"
type="cite">
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
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
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Johannes Katelaan"
<jk@e-integration.de>
> To: "Bob Stayton" <bobs@sagehill.net>
> Cc: <docbook-apps@lists.oasis-open.org>
> 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
>> bobs@sagehill.net
>>
>>
>> ----- Original Message ----- From: "Johannes Katelaan"
<jk@e-integration.de>
>> To: <docbook-apps@lists.oasis-open.org>
>> 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:
docbook-apps-unsubscribe@lists.oasis-open.org
>>> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org
>>>
>>>
>>
>>
>>
---------------------------------------------------------------------
>> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org
>>
>
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
|