This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] sgmltag element linking
- From: Jeff M Larkin <larkin at cs dot utk dot edu>
- To: Jirka Kosek <jirka at kosek dot cz>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Fri, 29 Apr 2005 15:17:22 -0400
- Subject: Re: [docbook-apps] sgmltag element linking
- References: <1114799354.24572.48.camel@hades> <42727EC3.3080202@kosek.cz>
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