[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Internal Linking

Subject: Internal Linking
From: Horace Burke <xmlmarkup@xxxxxxxxx>
Date: Mon, 23 Apr 2007 15:35:46 -0700 (PDT)
 Internal Linking
Hi All,

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.

Thanks in advance for your help!

Regards,
Horace Burke

===XML SNIPPET===

<Global  langID="EN">
   ...
   <CvrSheet>
   ...
     <description>
       <title>Description</title>
       <descpara xref="prod001">Chapter 1 Solution</descpara>
       <descpara xref="prod002">Chapter 2 Solution</descpara>
       <descpara xref="prod003">Chapter 3 Solution</descpara>
     </description>

     ...
   <CvrSheet>

   <chapter langID="EN">
      <CoProdId>
         <title>Section 1 Company and Product Identification</title>
         <ProdName id="prod001">
            <title change="yes">Product Name</title>
            <para>Chapter 1 Solution</para>
         </ProdName>
         ....
      </CoProdId>
      ....
   </chapter>
   ....
</Global>

===XSL-FO SNIPPET===
<xsl:template match="CoProdId">
  <fo:table-and-caption>
    <fo:table border="1pt solid black">
      <fo:table-header>
        ...
      </fo:table-header>
      <fo:table-body>
        <fo:table-row>
          ...
          <fo:table-cell border-width="1pt" border-left="none"
border-right="none" padding-top="2mm"
          text-align="left" number-columns-spanned="2">
             <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(.)}">
                <fo:inline font-weight="bold">
	           <xsl:apply-templates select="ProdName/para"/>
                </fo:inline>  
            </fo:block><!--Product Name-->
            ....
        </fo:table-row>
        ...
    </fo:table>
  </fo:table-and-caption>
</xsl:template>
 
 
<xsl:template match="descpara">
   <fo:block color="#8A2BE2" font-size="11pt">
      <xsl:variable name="xref" select="@xref"/>
      <xsl:for-each select="//CoProdId/ProdName">
         <xsl:if test="@id = $xref">
	    <fo:basic-link internal-destination="{generate-id(.)}">
	        <xsl:apply-templates select="para"/>
	    </fo:basic-link>
	 </xsl:if>
      </xsl:for-each>    
   </fo:block>
</xsl:template>
 
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.