Subject: Re: Need advise on filtering XSL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 28 Jan 2003 16:21:15 GMT
|
this is stunning -- it works beautifully! FYI, the $filterstmt variable is of the following form and contains dynamic elements, which is why xalan:evaluate is used:
(column[((@name='AccountNumber') and (contains(translate('735050C',
'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
translate(text(), 'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))))])
it depends if the form is variable or if its just the column and text
that varies. In the latter case you don't need evaluate()
if the thing is to filter on a specified column, those entries whose
character data is a substring of a given string (case insensitive) then
<xsl:param name="colname" />
<xsl:param name="filterstr" />
then...
select="
DataRow[column[@name=$colname]
[contains(translate($filterstr,'ABC..','abc..'),
translate(text(),'ABC..','abc..'))]
"
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Need advise on filtering XSL
- Stanger, Jan - Tue, 28 Jan 2003 09:37:56 -0500 (EST)
- <Possible follow-ups>
- Jarno . Elovirta - Tue, 28 Jan 2003 10:13:48 -0500 (EST)
- Stanger, Jan - Tue, 28 Jan 2003 10:49:24 -0500 (EST)
- David Carlisle - Tue, 28 Jan 2003 11:20:36 -0500 (EST) <=
- bryan - Tue, 28 Jan 2003 11:56:13 -0500 (EST)
- cknell - Tue, 28 Jan 2003 10:59:44 -0500 (EST)
- Stanger, Jan - Tue, 28 Jan 2003 12:08:30 -0500 (EST)
|
|