Subject: Re: Using contains() on element type name
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 07 Aug 2000 23:46:30 +0100
|
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@xxxxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|