W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2011

Re: Links to an external PDF file from XSL FO

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue, 25 Oct 2011 11:15:57 -0400
Message-Id: <7.0.1.0.2.20111025111302.025c84e0@wheresmymailserver.com>
To: www-xsl-fo@w3.org
At 2011-10-25 07:18 -0700, Kenbla wrote:

>Thanks a lot for your reply!
>Now I have another question! I need to create the content of the
>"External-destination" programmatically with information from my XML file! I
>want to concatenate a couple of node values and some hardocded values as
>well. Is that possible? I want it to look something like this:
>external-destination=Concat(nodevalue1, nodevalue2, '.pdf')

external-destination="{concat(ndoevalue1, nodevalue2, '.pdf')}"

>but this doesn't work. How do I achieve what I want?

Brace brackets inside of an attribute form an attribute value 
template, the contents of which are an XPath expression just like an 
<xsl:value-of>.

An equivalent in XSLT 1.0 is:

   <basic-link>
     <xsl:attribute name="external-destination">
       <xsl:value-of select="concat(ndoevalue1, nodevalue2, '.pdf')"/>
     </xsl:attribute>
   </basic-link>

An equivalent in XSLT 2.0 is:

   <basic-link>
     <xsl:attribute name="external-destination"
                    select="concat(ndoevalue1, nodevalue2, '.pdf')"/>
   </basic-link>

I have a book on XSLT (v1.0 and V2.0) and a book on XSL-FO (v1.0 and 
v1.1) available for free download trial preview on my web site linked 
in my trailer below.  You may find those books helpful.

I hope the above helps as well.

. . . . . . . . . Ken


--
Contact us for world-wide XML consulting and instructor-led training
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
G. Ken Holman                   mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal
Received on Tuesday, 25 October 2011 15:16:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 25 October 2011 15:16:45 GMT