[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] sgmltag element linking
The select expression is missing a closing paren. It should be: select="key('id', concat('element.', .))" Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Jeff M Larkin" <larkin@cs.utk.edu> To: "Jirka Kosek" <jirka@kosek.cz> Cc: <docbook-apps@lists.oasis-open.org> Sent: Friday, April 29, 2005 12:17 PM 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> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]