[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Find elements where any attribute contains alpha-numerical chars of an input string


Subject: [xsl] Find elements where any attribute contains alpha-numerical chars of an input string
From: Philipp Kursawe <phil.kursawe@xxxxxxxxx>
Date: Fri, 2 Nov 2012 23:54:22 +0100

I have this rather complex xpath:

//element[@*[contains(translate(., translate(.,
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', ''),
''), translate('string', translate('string',
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', ''),
''))]]

where "string" would be an input string with non-alpha chars and
spaces and mixed letter cases.
I would like to select any element whose attributes contain parts of
the input string, stripped by non-alpha chars and whitespace.

Problem is, the xpath does not work for mixed char input strings.

Any ideas whats wrong?

Thanks,
Phil


Current Thread
Keywords