XML if String 'Does Not Contain' Syntax
I'd like to detect whether or not a string contains another string in a succession - what I'm doing is passing a phrase through a number of detections, where it does or does not do X. Here's what I have so far -
<if test="string-length($env.http_user_agent) > 1 and string-length($env.remote_addr) > 1 and string-length(match(value-of('phrase', 'state-param'),$filter,'i')) = 0">
Where the http_user_agent is the end user's browser (must not be empty), the remote_addr is the end user's IP address (must not be empty), and the phrase is what is being passed. $filter is a series of words to match - in this case, if the phrase does not appear in the filter, do X.
This all works.
What I'd like to do further, is detect IE10, where X is NOT done, if the user is using IE10. So, something like
and if the string for $env.http_user_agent does not contain 'MSIE 10.0' (or however IE10 is expressed as a user agent), do X. I think it can be added into the above series, but I'm not sure on syntax.
Any ideas? Much appreciated.
Read this article to see if it helps http://www.impressivewebs.com/ie10-css-hacks/
I did read that, actually. No dice. The code they give fires in IE9 as well, which I can't have. I tested that one. I also put it together this way:
<if test="string-length($env.http_user_agent) > 1 and string-length($env.remote_addr) > 1 and string-length(match(value-of('phrase', 'state-param'),$filter,'i')) = 0 and not(contains($env.http_user_agent, 'MSIE 10'))">
But while this code didn't break anything, it also failed to detect IE10. It did basically nothing. Is my syntax okay?
|All times are GMT +1. The time now is 08:43 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.