123456789101112131415161718192021222324252627282930313233343536373839 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl xts">
- <xsl:variable name="http-values" select="/root/http/param"/>
- <xsl:variable name="query-values" select="/root/env/param"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <browserInfo>
- <name><xsl:value-of select="$query-values[@name='browser']"/></name>
- <isIE>
- <xsl:value-of select="contains($http-values[@name='HTTP_USER_AGENT'], 'MSIE')"/>
- </isIE>
- <isIE55>
- <xsl:value-of select="contains($http-values[@name='HTTP_USER_AGENT'], 'MSIE 5.5')"/>
- </isIE55>
- <isIE6>
- <xsl:value-of select="contains($http-values[@name='HTTP_USER_AGENT'], 'MSIE 6')"/>
- </isIE6>
- <isNS6>
- <xsl:value-of select="contains($http-values[@name='HTTP_USER_AGENT'], 'Mozilla/5') and (not(contains($http-values[@name='HTTP_USER_AGENT'], 'like Gecko'))) and (contains($http-values[@name='HTTP_USER_AGENT'], 'Gecko') or contains($http-values[@name='HTTP_USER_AGENT'], 'Netscape'))"/>
- </isNS6>
- </browserInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|