xsl-list
[Top] [All Lists]

Re: [xsl] fo:basic-link

2009-11-06 21:46:57
At 2009-11-06 18:26 -0800, Mark Wilson wrote:
I have been reviewing <fo:basic-link> and have learned how to use the external- and internal- destination properties. Two test code fragments are listed below. Is there a way to make
   <fo:basic-link external-destination="s.pdf">
take me directly to
   <xsl:attribute name="id">block1</xsl:attribute>

within the s.pdf document rather than just opening the "s.pdf" document?
If so, how would I change
   <fo:basic-link external-destination="s.pdf">
to do that?

First of all, the syntax should be:

  external-destination='url("----uri-here----")'

... but that isn't the answer to your question.

The semantics of now to resolve external URI specifications are outside of the XSL-FO specification. Section 7.23.6 reads:

  "How the destination (sub-)resource is used and/or displayed is
   application and implementation-dependent. In typical browsing
   applications, the destination resource is displayed in the
   browser positioned so that some rendered portion resulting from
   the processing of some part of the specific destination
   sub-resource indicated by the fragment identifier is in view."

Therefore it is up to (a) the vendor's software creating the output from your XSL-FO and (b) the software that is engaged by the reader that is reading your published XSL-FO to you. If you are publishing to PDF then this would be (a) the vendor of the XSL-FO to PDF creation tool and (b) the platform (probably the browser) that is engaged when clicking on a link, and I suppose, the reader engaged by the browser to catch the link that was clicked.

I would experiment with:

  external-destination='url("s.pdf#block1")'

.... but I don't know of any browser/reader that supports such a syntax but perhaps your platform combination described above supports that (it has been many years since I've tried).

I hope this helps. I would appreciate anyone on the list who knows of a more reliable syntax to relate their own experiences, but I'm not sure we'll hear from anyone.

. . . . . . . . . . . Ken


--
Upcoming:  hands-on XSLT, XQuery and XSL-FO Washington DC Nov 2009
Interested in other classes?  http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--