Subject: Re: [xsl] extend an xslt template defined elsewhere? From: "Anthony Ettinger" <anthony@xxxxxxxxx> Date: Wed, 17 Oct 2007 17:54:13 -0700 |
Thanks, works great...but I don't see a difference between apply-templates and apply-imports (at least in my context): file: customization_layer.xslt <xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl"/> <xsl:include href="custom.xsl" /> file: custom.xsl <xsl:template match="glossentry/glossdef"> <dd> <xsl:if test="@role != ''"> <xsl:attribute name="class"> <xsl:value-of select="@role"/> </xsl:attribute> </xsl:if> <xsl:apply-templates /> <!-- or apply-imports works too here? --> </dd> </xsl:template> Both apply-templates and apply-imports works from within the custom.xsl -- could this be a problem? On 10/17/07, Scott Trenda <Scott.Trenda@xxxxxxxx> wrote: > <xsl:import href="docbook.xsl"/> > <xsl:template match="orderedlist"> > <xsl:if test="@role = 'html class real code goes here'"> > <xsl:apply-imports/> > </xsl:if> > </xsl:template> > > ~ Scott > > > -----Original Message----- > From: ettinger@xxxxxxxxx [mailto:ettinger@xxxxxxxxx] On Behalf Of > Anthony Ettinger > Sent: Wednesday, October 17, 2007 6:56 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] extend an xslt template defined elsewhere? > > I have a 'customization layer' as described in Docbook context for my > XSLT stylesheets.... > > I'd like to know if there is a way I can extend an existing > xslt:template definition (inheriting all its properties, plus adding > my own). > > Basically there is a rather large template defined for orderedlist in > docbook xhtml xslt files, and I'd like to add a simple " if @role => > convert to @class in html" (pseudo code) without having to copy the > entire template definition. > > > > -- > Anthony Ettinger > Ph: 408-656-2473 > var (bonita, farley) = new Dog; > farley.barks("very loud"); > bonita.barks("at strangers"); > > http://chovy.dyndns.org/resume/ > http://utuxia.com/consulting > > -- Anthony Ettinger Ph: 408-656-2473 var (bonita, farley) = new Dog; farley.barks("very loud"); bonita.barks("at strangers"); http://chovy.dyndns.org/resume/ http://utuxia.com/consulting
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] extend an xslt template d, Scott Trenda | Thread | Re: [xsl] extend an xslt template d, Anthony Ettinger |
RE: [xsl] extend an xslt template d, Scott Trenda | Date | Re: [xsl] DOCTYPE public and system, Michael Tracey Zellm |
Month |