[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] fo:basic-link to non-pdf file

Subject: Re: [xsl] fo:basic-link to non-pdf file
From: Mark Wilson <mark@xxxxxxxxxxxx>
Date: Sun, 24 Feb 2013 00:22:08 -0700

Thanks Ken,
That makes sense - I'll work with that idea and see what I come up with. I did search your book on XSL-fo
but found no answer there.

On 23/02/2013 20:32, G. Ken Holman wrote:
You are correctly specifying the HTML file from you XSL-FO, Mark.

Based on your evidence, I suspect the problem is with your reader supplying a base-uri that is different than the current directory in which the PDF file is being opened.

The following works for me, formatting it with Antenna House and opening it in Acrobat Reader:

<?xml version="1.0" encoding="US-ASCII"?><!--basic-link3.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
      font-family="Times" font-size="20pt">

    <simple-page-master master-name="frame"
                        page-height="297mm" page-width="210mm"
                        margin-top="15mm" margin-bottom="15mm"
                        margin-left="15mm" margin-right="15mm">
      <region-body region-name="frame-body"/>

<page-sequence master-reference="frame">
<flow flow-name="frame-body" xmlns="http://www.w3.org/1999/XSL/Format">
<block>This is a <basic-link external-destination="hello.htm">link test</basic-link>.</block>

When I click on "link test", Firefox opens up and shows the "hello.htm" file.

I hope this helps.

. . . . . . . . Ken

At 2013-02-23 16:08 -0700, Mark Wilson wrote:
I have been linking PDFs together for some time now, using both internal- and external- destination attributes. Is it possible to go from a pdf document to an html file in the same directory? I've tried several variations, but when I hold my cursor over the link in the PDF document, it always reports as the address:
and it does nothing when clicked.

My target is:
    concat(lower-case(@file-by), '.htm')

I have formulated the external-destination as:
<xsl:attribute name="external-destination" select="concat(lower-case(@file-by), '.htm')"/>
<xsl:value-of select="@data"/>

and as (the method I use to connect to another PDF document):
    <xsl:attribute name="external-destination">
           <xsl:value-of select="concat(@file-by, '.htm')"/>
    <xsl:value-of select="@data"/>

What is the correct method, if any?

Mark Wilson
Knihtisk Publishing

Public XSLT, XSL-FO, UBL and code list classes in Europe -- Apr 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ |
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers: http://www.CraneSoftwrights.com/legal |

-- Mark Wilson Knihtisk Publishing

Current Thread