This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using contains() on element type name


John,

>So, if I have a whole bunch of elements called foo and bar, and only a few
are 
>foo.something, and bar.something, what am I missing in matching on them?

Well, name() returns a string giving the name of the element.  contains()
takes two arguments and returns true if the first contains the second.  So
if you want to see whether the name contains 'something', then you can use:

  contains(name(), 'something')

Of course you can use local-name() instead of name() with the same general
effect.

I hope this is what you were after,

Jeni

Dr Jeni Tennison
Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE
tel: 0115 906 1301 * fax: 0115 906 1304 * email: jeni.tennison@epistemics.co.uk


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]