RE: [xsl] alternative for modes

Subject: RE: [xsl] alternative for modes
From: "Peter Billen" <peter@xxxxxxxxxxx>
Date: Thu, 12 Feb 2004 12:21:38 +0100
Okay, thanks a lot for your input, I'll continue doing it on this way then.



-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David Carlisle
Sent: donderdag 12 februari 2004 12:14
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] alternative for modes

  I did not meant it that way: imagine you have to parse a certain node 'x'
  his children) more than 1 time in a stylesheet: each time the parsing of
  is exactly the same, but the parsing of 'x''s children is different. So
  each time I should call the same template for 'x', but that template
  call a different template for his children.

Ah what you want then is that the different processing of the children
are in different modes, but that your generic template acts like the
default templates and is "node neutral" in that it works in any mode and
calls apply-templates on the mode that it was called from rather tahn a
mode hard-wired into the code of the template.

Unfortunately this is not available in XSLT1 but (as you have found) it
is seen as a requirement and XSLT2 draft has a more flexible mode
arrangement that addresses this need (but XSLT2 specification is still
just a draft, although saxon7 implements much of it)

So in XSLT1 then something like you have is reasonable I think.



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread