[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] sgmltag element linking
Hi Jirka, thanks for the quick reply. I copied your code into my custom.xsl stylesheet and get the following error when I try to run: XPath error : Invalid expression compilation error: file /home/larkin/programs/share/docbook-xsl/custom.xsl line 11 element with-param xsl:param : could not compile select expression 'key('id', concat('element.',.)' I'm sure I must be making some small mistake that my limited XSL experience just isn't catching. I did try adding xsl: to the functions to see if that made a difference, but no dice. Also, will this customization also work with the FO stylesheet for links in the PDF files? Thanks for the help. -JLa On Fri, 2005-04-29 at 14:36, Jirka Kosek wrote: > Let's suppose that each element you define is described with section > which has element name incorporated in id attribute: > > <section id="element.foobar"> > <title>Foobar element definition</title> > ... > </section> > > If you want <sgmltag>foobar</sgmltag> to point to this definition just > add following template into your customization layer: > > <xsl:template match="sgmltag"> > <xsl:variable name="href"> > <xsl:call-template name="href.target"> > <xsl:with-param name="object" select="key('id', > concat('element.', .)"/> > </xsl:call-template> > </xsl:variable> > <a href="{$href}"> > <xsl:apply-imports/> > </a> > </xsl:template>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]