xsl-list
[Top] [All Lists]

xsl:template having both name and match

2005-03-03 05:34:09
Hello,
  I have a question about xsl:template ..

It is said in XSLT 2.0 spec that..
"If an xsl:template element has a name attribute, it
may, but need not, also have a match attribute.

The match, mode and priority attributes on an
xsl:template element have no effect when the template
is invoked by an xsl:call-template instruction.
Similarly, the name attribute on an xsl:template
element has no effect when the template is invoked by
an xsl:apply-templates instruction."

I think this is also true in case of XSLT 1.0 ..

This means that we can write a xsl:template having
*both* name and match attributes..

I want to know in which circumstances such a template
definition is useful.. Can somebody please provide an
example where this has real practical use..?

Till now I have'nt felt such a need.. I always create
xsl:template with name and match attributes as 2
seperate templates, and never in a single template.. I
want to know the practical use when both name and
match attributes on xsl:template would be required..

Regards,
Mukul



        
                
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--