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

Re: dynamic template invocation

Subject: Re: dynamic template invocation
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 7 Sep 2009 20:30:59 -0700
Re:  dynamic template invocation
Dear ac,

Higher Order Functions (HOF) are powerful enough for the solution of
any problem.

One needs just a little bit of practice in functional programming
(using a suitable language as Haskell) in order to gain the necessary
skills.

HOF's are in the process of being specified by the corresponding W3 WG
 as a standard feature in XQuery, XPath and XSLT.

Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
I enjoy the massacre of ads. This sentence will slaughter ads without
a messy bloodbath.



On Mon, Sep 7, 2009 at 7:15 PM, ac<ac@xxxxxxxxxxxxx> wrote:
> Hi Dimitre,
>
> It is a nice solution with a clever and elegant <xsl:variable
> name="templates" select="document('')/xsl:template" />
>
> One can always pre-include the stylesheets into an integrated one, in a
> "pre-pass" to get access to the included/imported templates, which may not
> be so trivial especially for imported stylesheets.
>
> The context also needs to be parametrized, but mostly it does not seem to
> provide dynamic template mode selection which brings back the requirement
to
> use call-template on templates that typically have both name and match
> attributes, when running various process modes on the same source nodes
(eg.
> payroll trial, log, post, archive, purge), either with as xsl:choose or a
> saxon:call-template.
> There are different ways to get around the problem but none of them as
> elegant as <xsl:apply-templates mode="$mode"/> or variations thereof.
>
> I have encountered quite a few other "similar" use cases, as when
processing
> music, for example, with analysis, scoring, loging, debugging, performing
> modes, and for image and video processing, as well as for animation, case
> management, process modeling, ...
>
> I was suggesting and wandering if others feel that it may be a natural and
> useful improvement for the standard.
>
> What do you think?
>
> Thank you.
>
> Cheers,
> ac
>
>
>> Search about FXSL. This feature is there (in B a way that is allowed by
>> the XSLT 1.0 language) since 2002.
>
>



--

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.