[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: inheritance and encapsulation in xslt? / xslt for

Subject: Re: inheritance and encapsulation in xslt? / xslt for xlink?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 22 Jul 2003 07:49:17 +0200
 Re: inheritance and encapsulation in xslt? / xslt for
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.