This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Using contains() on element type name
- To: John Robert Gardner <John dot Robert dot Gardner at East dot Sun dot COM>
- Subject: Re: Using contains() on element type name
- From: Jeni Tennison <jeni at friday dot u-net dot com>
- Date: Mon, 07 Aug 2000 23:46:30 +0100
- Cc: xsl-list at mulberrytech dot com
- Reply-To: xsl-list at mulberrytech dot com
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