← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: [docbook-apps] PDF output should contain only the URL for ulinks

From
Lars Vogel <>
Date
2014-07-31T09:10:10+00:00
ID
CAOeJ3wsvyXgP0cKGwny9UuEB4tSMAJ1V5b3Lu=
Thread
Re: [docbook-apps] PDF output should contain only the URL for ulinks
Thanks Bob, works fine. Here is the templates:

   <xsl:template match="ulink">

        <fo:inline font-style="italic">

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

        </fo:inline>

    </xsl:template>

Best regards, Lars

2014-06-02 19:50 GMT+02:00 Bob Stayton <>:

Hi Lars,

This custom template won't work as written.  The context for the template is the matched element, which is ulink. In the XPath statement in the select attribute, the "." means the context element.  So the current statement is equivalent to this path:

<xsl:value-of select="ulink//ulink/@url"

Since the ulink does not contain a ulink as an descendant, that won't select anything.  Try:

select="./@url"

or just

select="@url"

Bob Stayton

Sagehill Enterprises



On 6/2/2014 12:11 AM, Lars Vogel wrote:

Hi,

I have the following statement in my Docbook 4.5 XML.

----------

You find it under the following URL: <ulink url="">
http://www.eclipse.org/legal/clafaq.php">Eclipse CLA FAQ</ulink>.

---------

For PDF output I would like to include only the link and not the text. I

though the following might work but it didn't.

<xsl:template match="ulink">

<fo:inline font-style="italic">

<xsl:value-of select=".//ulink/@url" />

</fo:inline>

</xsl:template>

Any suggestions how to solve that?

Best regards, Lars
← Prev in month ← Prev in thread
Next in thread → Next in month →