xsl-list
[Top] [All Lists]

Re: [xsl] Name of current mode

2010-04-19 10:00:53
Mario Madunic wrote:

Please post your solution as I'd be really interested in what the
results are. I've never used tunneling myself and to be honest have
completely forgotten about it since I first read about it.

Ken Holman has posted the solution already in this thread, which is
identical to how I would have done it (if I had done it that
way... :-)). Basically, you copy the mode into a tunnel parameter at the
first mode'd xsl:apply-templates and regardless of how many templates
lie in-between, in the template where you need the mode info again, you
can access it with via a tunnel param declaration. The tunnel="yes"
allows you to not have to explicitly pass that parameter in any of the
other templates that may be in-between in the calling chain.

Thanks to all who responded. I still think that a way to access the mode
information with an accessor would be a welcome enhancement of XSLT 2
and would help avoiding to maintain redundant information manually.

-Christian


--~------------------------------------------------------------------
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>