[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 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.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]