xsl-list
[Top] [All Lists]

[xsl] Force the case of a set of strings

2012-10-29 12:18:02
 
Team,

I have a sequence of strings which are all 'ok' or 'fail' where I want to force 
the case of all of them.

When I say they are all 'ok' or 'fail' I actually mean they may be 'ok', 'OK', 
'Ok', 'Fail', 'fail', 'FAIL' etc.

I use 

<xsl:variable name="ok-fails-1" select="$states/normalize-space(column[7])" />

to extract the sequence from my original xml. 

If I say 

<xsl:variable name="ok-fails-1-lc" select="lower-case( $ok-fails-1 )" />

then I get told that lower-case can only take a string as its parameter, not a 
sequence.

Can anyone suggest how I might process my sequence to return a sequence but 
have each entry passed through lower-case.

I thought maybe I could pass it as a parameter to a moded apply-templates, but 
then I get warned that select needs a node, not a string, as its @select 
attribute.

Subsequently I do distinct-values on it and the result of that I want only to 
contain 'ok' or 'fail', with no case variations remaining.

 

 

Appreciatively,

Richard.

 

 

 

 

Richard Kerry

BNCS Engineer

 

T: +44 (0)20 82259063 

M: +44 (0)7812 325518

Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ

richard(_dot_)kerry(_at_)atos(_dot_)net

uk.atos.net <http://uk.atos.net/en-uk/> 

 


This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos group liability cannot be triggered for the 
message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>