Re: [xslt] non-dynamic modes



Dan Brian wrote:


If you could do this instead:

  <xsl:apply-templates mode="$thismode"/>

You'd never have to worry about either choose blocks around your apply-templates, OR cascading modes (whether automatically or by hand). I realize this opens up other issues with mode as essentially a select, so I'm not suggesting it's the proper solution.

I think James Clark would reply in a magisterial way that it would stop XSLT behaving in some purist functional fashion
I dont understand :-}



And although XSLT is verbose, it's not often that you have to duplicate code so long as you're having multiple templates and using apply-templates effectively (one of the reasons I like it). Unfortunately, this is a case where it seems you have to duplicate code to get the desired result,

Thinking about it, I can't recall a really long and distressing cascade in my work. I do wish I could
do
<call-template name="process{ rend}">
mind, which is along the same lines



--
Sebastian Rahtz Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431


OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]