Re: [xsl] Modes (was RE: [xsl] Re: Keys, IDs lookup tables.)

Subject: Re: [xsl] Modes (was RE: [xsl] Re: Keys, IDs lookup tables.)
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2012 19:12:04 +0100
On Mon, Jun 11, 2012 at 5:54 PM, Michele R Combs <mrrothen@xxxxxxx> wrote:
> Thanks.  I should have been clearer in my request.  I understand the concept
of modes (what they are for) but have been having difficulty putting them into
execution, and/or untangling them in pre-existing code.  A technical
explanation with examples is more what I'm looking for.
>

I have seen modes used to disambiguate template rules where priorities
would have done the job, so the appearance of modes in pre-existing
code may be gratuitous.

My personal preference is to restrict the usage of modes to the use
case where they are necessary, that way the appearance of modes in
code highlights that the nodes in question are  being processed by
more than one template rule and their absence signals they are not. As
Ken usefully pointed out this assumes push style processing.

I find such disciplines useful, it saves you from having to read the
code to find out the same thing.

Current Thread