weird links in PDF from XML and xslt using FOP

J

Jurrie

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top