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

Re: keys fast for lookups? attribute-value template in

Subject: Re: keys fast for lookups? attribute-value template in xsl:call-template?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 3 Aug 2001 21:18:28 -0700 (PDT)
dimitre multipass
Mike Lamb wrote:

[snip] -- David Marstone provided an excellent explanation for the first question.

> Second problem is that, after I retrieve the dealercode, I need to run a
> dealer specific template. I had tried to do this using xsl:call-templates as
> follows:
> <xsl:call-template name="DEALER{$DEALERCODE}"/>
> 
> with no success.  Looks like the name attribute of xsl:call-template does
> not expect an attribute-value template. Any thoughts on how I might get this
> done? I am trying to avoid writing the huge switch statement over
> dealercode.

You cannot pass/have the name of the xsl:call-template in a variable to be
dynamically established -- this is because a QName must be specified and QNames are
just literal strings (static).

However, you can use a generic template -- the idea behind generic templates is
exactly to be able to dynamically instantiate a template, which is not known (even
may not be written yet) at the time of writing the generic template.

Useful examples of generic templates may be downloaded at:

http://www.vbxml.com/downloads/default.asp?id=v2001611171627

This download contains four generic templates: min(), max(), binSearch(), sort().

Another generic template -- for multipass processing was posted in this list:

http://sources.redhat.com/ml/xsl-list/2001-06/msg01147.html


A detaled explanation of generic templates can be found at:

http://lists.fourthought.com/pipermail/exslt/2001-May/000169.html

and in some of my replies to questions in this list.


Hope this helped.

Cheers,
Dimitre Novatchev. 

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 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.