Subject: [xsl] Re: inheritance and encapsulation in xslt? / xslt for xlink? From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 22 Jul 2003 07:49:17 +0200 |
> You don't need to add new templates. For example you could define a global > xsl:variable in the importing stylesheet module, that contains the names of > all elements that are to be handled by a template. > > The template itself could match any element, but within its code would > process only elements, whose name is the value of one of the nodes contained > in the global variable. Something like this: > > > <xsl:template match="*"> > <xsl:if test="name() = $vgNames/*"> > <!-- Process this element here --> > </xsl:if> > </xsl:template> In the true spirit of OOP the above code should be in the importing template (the base class does not know how it is going to be extended by the derived class). The code will be something like the following: <xsl:template match="*"> <xsl:if test="name() = $vgNames/*"> <xsl:apply-imports/> </xsl:if> </xsl:template> ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: inheritance and encapsula, Dimitre Novatchev | Thread | Re: [xsl] inheritance and encapsula, David Carlisle |
[xsl] Re: inheritance and encapsula, Dimitre Novatchev | Date | [xsl] printing the input xml witha , Peter_Ivan |
Month |