weird links in PDF from XML and xslt using FOP

Discussion in 'XML' started by Jurrie, Oct 6, 2003.

  1. Jurrie

    Jurrie Guest

    Hi all,

    I have a XML-document which i want to transform into PDF with apaches
    FOP. In my XML document i have <href> tags that are links to either a
    chapter in the document or to a place on the www.
    example:
    <ref type="intern" to="chapter 2"/> and <ref type="extern"
    to="http://www.website.com"/>

    In my XSL document i have this:
    <xsl:template match="ref">
    <xsl:choose>
    <xsl:when test="@type='extern'">
    <xsl:element name="fo:basic-link">
    <xsl:attribute name="color">blue</xsl:attribute>
    <xsl:attribute name="external-destination">
    <xsl:value-of select="@to" />
    </xsl:attribute>
    <xsl:value-of select="@to" />
    </xsl:element>
    </xsl:when>
    <xsl:when test="@type='intern'">
    <xsl:element name="fo:basic-link">
    <xsl:attribute name="color">blue</xsl:attribute>
    <xsl:attribute name="internal-destination">
    <xsl:value-of select="@to" />
    </xsl:attribute>
    <xsl:value-of select="@to" />
    </xsl:element>
    </xsl:when>
    </xsl:choose>
    </xsl:template>

    The internal links are OK. The problem lies in the external links.
    They render ok, but if I follow a external link the document it refers
    to is downloaded, converted into pdf and appended to the end of the
    file. I was reading the help file and it is a feauture, but i don't
    want it to happen. So my question is:
    How can i make a link with XSLT and XSL-FO (and using FOP) which just
    opens a browser and displayes the right page???

    Thanks for any help,

    Jurrie
    Jurrie, Oct 6, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gerlar2000
    Replies:
    0
    Views:
    610
    gerlar2000
    Feb 21, 2005
  2. Edward
    Replies:
    2
    Views:
    10,865
    DerekLittle
    May 18, 2007
  3. Shiny
    Replies:
    0
    Views:
    521
    Shiny
    Apr 26, 2005
  4. Replies:
    1
    Views:
    435
  5. Pablo
    Replies:
    0
    Views:
    932
    Pablo
    Mar 28, 2007
Loading...

Share This Page