ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
RE: [xsl] The Match Game vs The Name Game
by Evan Lenz other posts by this author
Aug 23 2001 8:00PM messages near this date
Re: [xsl] The Match Game vs The Name Game | [xsl] XPath question
The only time the match attribute is ever significant is when
xsl:apply-templates is called (explicitly or from the built-in template
rules). The only time the name attribute is ever significant is when
xsl:call-template is called (only explicitly). The remaining attribute that
you can use is mode, which is only ever significant when there is a match
attribute (and when xsl:apply-templates is called).

In conclusion, named templates and template rules have orthogonal
functionality. No conflicts result from overloading a template for both. In
other words, adding a match attribute to a named template won't break
xsl:call-template, and adding a name attribute to a template rule won't
break xsl:apply-templates.

Hope this helps,

Evan Lenz
XYZFind Corp.

>  -----Original Message-----
>  From: owner-xsl-list@[...].com
>  [mailto:owner-xsl-list@[...].com]On Behalf Of McKeever,
>  Marty
>  Sent: Thursday, August 23, 2001 12:45 PM
>  To: xsl-list@[...].com
>  Subject: [xsl] The Match Game vs The Name Game
> 
> 
>  For some reason I didn't expect this to work, because I can't find any
>  specific reference to it in any of my resources.  I went ahead and tried
>  anyway, and it seemed to work like a charm
> 
>  <xsl:template name="fubar" match="foo/bar">
> 
>  Matches all bar elements of foo by default, and also can be called
>  specifically with:
>  <xsl:call-templates name="fubar">
> 
>  Any reason I should be surprised by this? Or, any caveats I need
>  to be aware
>  of before I go nuts with this new discovery?
> 
>  Thanks,
>  Marty
> 
>   XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
Thread:
McKeever, Marty
Aleksei Valikov
Evan Lenz

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved