[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] template mode - inheritable? - help

Subject: Re: [xsl] template mode - inheritable? - help
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 13 Jan 2004 17:29:51 GMT

  (1) When mode m1 for doc is matched and applied, will it apply mode m1 for
  element c? Notice that the parent of c is b and does not have a mode

no your template for m1 uses apply-templates without a mode attribute so
it will apply the templates in the default (unnamed) mode, it will not
apply templates in mode m1 to any node.

If you changed that to say apply-templates mode="m1" then the templates
in mode m1 would be applied to b and c, in teh case of b this would be
the default template, which does nothing with the element, but process
the content in the same mode.

  (2) If you have m1 and m2 for b, will m1 for doc select all m1 for its

there is never any automatic selction of modes, each apply-templates
must explictly state which mode is being used.

  I want situation (1): doc m1 process c m1 and doc m2 process c m2 when
  applied. Possible? 

just add suitable mode attributes to the apply-templates.



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:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread