Subject: Re: [xsl] dynamic template invocation From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 7 Sep 2009 20:30:59 -0700 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] dynamic template invocati, ac | Thread | Re: [xsl] dynamic template invocati, Vyacheslav Sedov |
Re: [xsl] dynamic template invocati, ac | Date | Re: [xsl] dynamic template invocati, Vyacheslav Sedov |
Month |