Re: [xsl] XSLFO - fo:basic-link

Subject: Re: [xsl] XSLFO - fo:basic-link
From: Chris_Graham@xxxxxxxxxxx
Date: Mon, 12 Feb 2007 12:49:10 +1100
"Chris Graham [WarpSpeed]" <chrisg@xxxxxxxxxxxxxxxx> wrote on 11/02/2007 

> On Sat, 10 Feb 2007 14:45:24 +0100, J.Pietschmann wrote:
> >Chris Graham [WarpSpeed] wrote:
> >>    I'd like to be able to parameterize the value of the
> >> external-destination. Can it be done?
> >
> >Get your favorite source of XSLT facts and check it for
> >the term "attribute value template", or AVT for short.
> >
> >It means that for attributes which aren't evaluated
> >as XPath by default, you can use braces to denote
> >XPath expressions:
> >  <fo:basic-link
> >    external-destination="{$parameter}">...</fo:basic-link>
> >
> >J.Pietschmann
> Thanks for that. I'll look into it.

Cleaning out the cobwebs, it's been a while. Just for completeness, this 
is the solution that I've used:

<!-- Generate the basic-link -->
<xsl:template name="basicLink">
    <xsl:param name="id"/>
<fo:basic-link external-destination=
ID: <xsl:value-of select="$id"/>

Add here is how I called it:

    <xsl:call-template name="basicLink">
        <xsl:with-param name="id">
            <xsl:value-of select="//PDBID" />

CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information. 

If you are not the intended recipient of this message you must: 
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer immediately.

Internet emails are not necessarily secure. Australian Associated Motors Insurers Limited ABN 92 004 791 744 (AAMI), and its related entities, do not accept responsibility for changes made to this message after it was sent.

Unless otherwise stated, views expressed within this email are the author's own and do not represent those of AAMI.

Current Thread