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

Re: template names

Subject: Re: template names
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 15 Jul 2002 05:09:27 -0700 (PDT)
Re:  template names
--- DPawson at rnib dot org dot uk  wrote:

> 
> I have two templates,
> 
>  <xsl:template name="price" mode="export" >
> ...
> 
> and
> 
>  <xsl:template name="price" mode="full">
> 
> Saxon is saying
>   There is another template with the same name and precedence
> Transformation failed: Failed to compile stylesheet. 1 error
> detected.
> 
> Agreed they have the same name, but with different modes.
>  I'm not challenging it as 'wrong', just curious why, when they
> are both moded, a conflict occurs?
> 
> I call them via a choose.
> 
> regards DaveP
 

Hi Dave,

Using modes is possible only with templates that have the "match"
attribute specified (there is <xsl:apply-templates mode="xxx"/> but
nothing like <xsl:call-template name="xxx" mode="yyy"/>).

It still would be illegal to have identically named templates in the
same stylesheet even in the case they have a "match" and a "mode"
attribute defined -- the XSLT processor doesn't know whether you're
going to instantiate the templates via xsl:apply-templates or via 
<xsl:call-template name="identicalName"/>

In the last case the XSLT processor cannot unambiguously choose which
one of the two identically named templates should be called -- this is
clearly some kind of an error.

Hope this helped.




=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

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


Current Thread
  • template names
    • DPawson - Mon, 15 Jul 2002 07:42:04 -0400 (EDT)
      • <Possible follow-ups>
      • Andrew Welch - Mon, 15 Jul 2002 08:02:55 -0400 (EDT)
      • Dimitre Novatchev - Mon, 15 Jul 2002 08:08:29 -0400 (EDT) <=
      • DPawson - Mon, 15 Jul 2002 10:20:47 -0400 (EDT)

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.