Re: Links to an external PDF file from XSL FO

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 UTC