[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: alternative for modes

Subject: Re: alternative for modes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 12 Feb 2004 11:14:02 GMT
carlisle alternative
  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 'x'
  is exactly the same, but the parsing of 'x''s children is different. So for
  each time I should call the same template for 'x', but that template should
  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.

David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.