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
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