1234567891011121314151617181920212223242526272829303132333435363738 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2008
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <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">
- <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>
- <isIE50>
- <xsl:value-of select="contains($http-values[@name='HTTP_USER_AGENT'], 'MSIE 5.0')"/>
- </isIE50>
- <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 (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>
|