This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Antenna House XSLFormatter and internal links (xref)
- From: "Bob Stayton" <bobs at sagehill dot net>
- To: "Marco Baumgartl" <Marco_Baumgartl at yahoo dot de>, <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 14 Feb 2005 21:26:24 -0800
- Subject: Re: [docbook-apps] Antenna House XSLFormatter and internal links (xref)
- References: <4210EC83.3060403@yahoo.de>
Hi Marco,
Can you send me (off list) a small sample of the DocBook XML generated with
this method? Just enough to illustrate the problem when formatted with XSL
Formatter.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Marco Baumgartl" <Marco_Baumgartl@yahoo.de>
To: <docbook-apps@lists.oasis-open.org>
Sent: Monday, February 14, 2005 10:22 AM
Subject: [docbook-apps] Antenna House XSLFormatter and internal links (xref)
> Hallo,
>
> I use XSLT to convert HTML (from a CMS) to DocBook. This seems to work
> great so far. I can produce HTML, HTML Help and PDF (with Apache's FOP
> renderer) using my created DocBook file.
> Today I tried an another renderer (evaluation version of XSLFormatterV3
> from Antenna House, Version 3,2,2005,0111 MR2). I noticed that my way of
> creating links does not work with this renderer (but with FOP it does).
> Here is the part of my stylesheet that produces the link:
>
> <xsl:template match="a">
> <xsl:if test="@href">
> <xsl:choose>
> <xsl:when test="starts-with(@href, 'http') or starts-with(@href,
> 'ftp') or starts-with(@href, 'mailto')">
> <ulink url="{@href}"><xsl:value-of select="." /></ulink>
> </xsl:when>
> <xsl:otherwise>
>
> <!-- insert a dummy element (i.e. anchor's text child produces no
> output) we can use to refer to in xref's attribute 'endterm' (to produce
> some output) -->
>
> <anchor>
> <xsl:attribute name="id">
> <xsl:value-of select="generate-id(@href)" />
> </xsl:attribute>
> <xsl:value-of select="." />
> </anchor>
>
> <xref>
> <xsl:attribute name="linkend">
> <xsl:value-of select="substring-after(@href, '#')" />
> </xsl:attribute>
> <xsl:attribute name="endterm">
> <xsl:value-of select="generate-id(@href)" />
> </xsl:attribute>
> </xref>
>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:if>
> <xsl:if test="@name">
> <xsl:value-of select="text()" />
> <anchor>
> <xsl:attribute name="id">
> <xsl:value-of select="@name" />
> </xsl:attribute>
> </anchor>
> </xsl:if>
> </xsl:template>
>
> I use a dummy anchor element to create a (hidden) output which I can
> refer to in xref's endterm attribute. As I mentioned before, this
> solution works well with FOP, but the XSLFormatter does nothing if I
> click on an internal link (external links (ulink) work fine).
>
> I don't know what the problem is or where to look for a solution.
>
> Can anybody give me a hint?
>
> regards
> Marco
>
> PS: The files are transformed with Saxon 6.5.3 (JDK 1.4.2-06) and
> DocBook stylesheets 1.68.1 under Win2000.
>
>
>
>
>
>
>
>
>