[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] sgmltag element linking
Jeff M Larkin wrote: > Hello all. I've been trying to figure this out for quite some time and > I've just about given up. In the docbook guide, elements in the > reference section are all linked together. Anything inside an > <sgmltag></> tag gets linked to that element's reference page. I'm also > developing documentation for an XML language and would like to have this > feature in my documents. I've looked at the docbook guide code and the > stylesheets and just can't wrap my hands around what I need to do to > have this feature in my document. I'm using docbook-xsl-1.68.1 and > processing with xsltproc. Can anyone suggest what I need to modify to > get the desired linking? 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> -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Podívejte se na náš nově spuštěný web http://DocBook.cz Podrobný přehled školení http://xmlguru.cz/skoleni/ ------------------------------------------------------------------
S/MIME Cryptographic Signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]