This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: case insensitive attributes



> Actually, the all caps ADMIN was just for testing.

but as Jeni (and I) pointed out the test always fails as you lowercase
the attribute then test against something uppercase.

> It could come in as Admin ADmin ADmiN or anything 
> like that.  It comes from user input to a login form.

exactly, that;s why you apply thetranslate function to lowercase
everything so all of thos become admin. but thenyou need to test against
admin not ADMIN.

>  ended up using this and it seems to be working, but
> I am not sure how efficient it will be.

> root/CamUsers[@UserId = translate(@UserId,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
> 'abcdefghijklmnopqrstuvwxyz') = 'Admin']

efficiency isn't an issue, it never returns any nodes. No value of
@UserId, after being lowercased will ever be equal to  'Admin'

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]