RE: [xsl] Substring selection anyone?

Subject: RE: [xsl] Substring selection anyone?
From: David Rigby <RigbyD_UK1@xxxxxxxx>
Date: Wed, 20 Dec 2000 09:23:53 -0000
Thanks for that - I'd totally forgotten about 'translate'!

Cheers 

David

-----Original Message-----
From: Jiri Jirat [mailto:Jiri.Jirat@xxxxxxxxx]
Sent: 20 December 2000 09:15
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Substring selection anyone?


Hello David,
 would the translation to uppercase solve your problem?
Something like this:

test = "value/text[translate(substring(., 0,
4),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ') = $key]"

where $key is only uppercase, e.g. "NAME"

Best regards
Jirka

David Rigby wrote:
> 
> Does anyone have any idea if there's a way to include a case insensitive
> substring comparison in an xpath predicate?  What I'd like is something of
> the form:
> 
> <xsl:apply-templates select="value/text[$key = <NO
> CASE!!>substring(value/text, 0, 4)] "/>
> 
> ...assuming $key is a simple string containing the search key
> 
> I don't know of any way to manage  the case insensitive aspect.
> 
> I'd be grateful for any assistance!
> 
> Thanks
> 
> David
> 
> Knowledge Support Systems Limited
> A division of Knowledge Support Systems Group plc
> Seventh Floor  St James's Buildings  79 Oxford Street  Manchester  M1 6SS
England
> Company Registration Number 2800886 (Limited) 3449594 (plc)
> Tel: +44 (0) 161 228 0040       Fax: +44 (0) 161 236 6305
> mailto:kssg@xxxxxxxx            http://www.kssg.com
> 
> The information in this Internet email is confidential and may be legally
privileged. It is intended solely for the addressee(s). Access to this
Internet email by anyone else is unauthorised.
> 
> If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this Internet email are subject to the terms
and conditions expressed in the governing engagement letter or contract.
> 
> This email message and any attached files have been scanned for the
presence of computer viruses.  However you are advised that you open any
attachments at your own risk.
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
 <name firstName="Jirka" surname="Jirat"/>
 <mail>     jiratj@xxxxxxxxx  </mail>
 <support>  http://www.zvon.org </support>
 <zvonMailingList> http://www.zvon.org/index.php?nav_id=4
</zvonMailingList>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Knowledge Support Systems Limited
A division of Knowledge Support Systems Group plc
Seventh Floor  St James's Buildings  79 Oxford Street  Manchester  M1 6SS  England
Company Registration Number 2800886 (Limited) 3449594 (plc)
Tel: +44 (0) 161 228 0040	Fax: +44 (0) 161 236 6305
mailto:kssg@xxxxxxxx		http://www.kssg.com


The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee(s). Access to this Internet email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in the governing engagement letter or contract.

This email message and any attached files have been scanned for the presence of computer viruses.  However you are advised that you open any attachments at your own risk.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread