xsl-list
[Top] [All Lists]

Re: Easy way to identify node type?

2003-12-06 06:37:59
Ken,

Thanks for the words of caution; I shall bear that in mind from now 
on.

Have a great weekend,

Erik


On 6 Dec 2003 at 17:53, G. Ken Holman wrote:

At 2003-12-05 17:24 -0200, yguaba(_at_)yahoo(_dot_)com(_dot_)br wrote:
Actually, I don't want to match specific elements (I could do that
with <xsl:when test="local-name() = 'element_1' or local-name() =
'element_2 or local-name() = 'element_n''">

That isn't namespace safe.

 or just simply write
different templates for each different element).

That is namespace safe.

Using the self:: access is also namespace safe and is far better than
using the name() functions.  The name functions are appropriate for
exposition but are not appropriate for most node testing purposes.

I hope this helps.

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



<Prev in Thread] Current Thread [Next in Thread>