xsl-list
[Top] [All Lists]

Re: [xsl] Internal Linking

2007-04-24 04:09:16
At 2007-04-23 15:35 -0700, Horace Burke wrote:
I am doing something that I would consider fairly simple. However, it is
not working for me. I am trying to link from a cover page to chapters
inside of some PDF documents; this is using XSL-FO. The problem that I am
having is that links on the cover page are not jumping to their
destinations. Can anyone see what I am doing wrong? I have included
snippets below.

Based on your evidence, I could guess exactly where to look. It turns out you are using generate-id() on the current node but the current node is a different node the two areas of your stylesheet:

<xsl:template match="CoProdId">
  <fo:table-and-caption>
...
   <fo:block border-style="solid" border-bottom="1pt"
             border-top="none"  border-left="none" padding-top="2mm"
             padding-bottom="1.5mm" border-right="none"
             id="{generate-id(.)}">
...
<xsl:template match="descpara">
...
      <xsl:for-each select="//CoProdId/ProdName">
         <xsl:if test="@id = $xref">
            <fo:basic-link internal-destination="{generate-id(.)}">

In the first template it appears the current node is CoProdID, while in the second template it appears to be ProdName.

Guessing your requirements, it seems that you want all ProdName elements to point to the CoProdId, so that would mean in your second template change the code to read "{generate-id(..)}" to point to CoProdId.

I hope this helps.

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

--
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  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>
--~--

<Prev in Thread] Current Thread [Next in Thread>