[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: Mon, 6 Aug 2001 07:26:13 -0700 (PDT)
rachid taji
Mark Feblowitz wrote:

> If you're using Saxon, there's a way to allow the use of a variable in a
> template name:
> 
> saxon:allow-avt	This attribute may be set on the xsl:call-template element.
> If set to the value "yes", it causes the name attribute of xsl:call-template
> to be interpreted as an attribute value template. This allows the selection
> of the called template to be decided at run-time. Typical usage
> is:[NL]<xsl:call-template name="{$tname}" saxon:allow-avt="yes">
> 
> Don't forget to define the saxon namespace.

Also don't forget that by using such an extension you are writing non-portable XSLT
code that will not run on any other XSLT processor!

There is a 100% pure XSLT way to achieve this and it is by using the mechanism of
generic templates.

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.