[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK: Re: Creating a transformation into an <a href>
[Please don't crosspost articles over multiple mailing lists.] / David Parker <dlparker@facstaff.wisc.edu> was heard to say: | Attempting to grab the url attribute from a <ulink> node (DocBook XML file). | The click able text is added on at the end of the parent node <para>. [...] | <!--================================================================--> | <!-- Template for the <ulink> tag --> | <!--================================================================--> | <xsl:template match="ulink"> | <xsl:param name="link"><xsl:value-of select="."/></xsl:param> | <a href="{$link}"> | <xsl:apply-templates select="citetitle"/> | </a> | </xsl:template> Without seeing more of your templates (particularly para), I can't quite see why it's doing what it's doing, but the tempate for ulink is almost certainly wrong. (Have you tried running your document through my XSL stylesheets for DocBook: http://nwalsh.com/docbook/xsl/). Try: <!--================================================================--> <!-- Template for the <ulink> tag --> <!--================================================================--> <xsl:template match="ulink"> <a href="{@url}"> <xsl:apply-templates/> </a> </xsl:template> And this looks like a better answer, too: <!--================================================================--> <!-- Template for the <citetitle> tag --> <!--================================================================--> <xsl:template match="citetitle"> <xsl:apply-templates/> </xsl:template> Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | Optimistic, even in the face of http://www.oasis-open.org/docbook/ | reality. Chair, DocBook Technical Committee |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC