|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Need advise on filtering XSL
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








