xsl-list
[Top] [All Lists]

Re: [xsl] Re: OOXML

2008-06-30 01:56:53
Shouldn't this be titled OOXSL??  Anyway...


The two main highlights of OO languages are encapsulation and inheritance:
-XSLT already has a nice inheritance model i.e. imports and template 
precedence.
-XSLT stylesheets can be thought of classes, with data (variables,
parameters) and functions as methods.

I've always thought we could do with equivalents for Final and Abstract:

- mark a template as Final and it can't be overridden, or more
specifically to XSLT, it will always be chosen regardless of import
precedence.  This would be a way of bypassing the subtle import
precedence rule that order of import statements is king. (Currently
the priority attribute is considered after that precedence rule making
it weak for large import trees)

- mark a template as Abstract and it must be overridden, allowing you
to design stylesheets that must be imported into others and give a
good error message when they're run on their own.  Ok, this one can be
easily worked around with a runtime error, but it would be nice if
when working with the importing stylesheet you could be told that a
particular template/function needs to implemented...


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>