12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2010
- 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"
- exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="script[@language != '' and @type='text/javascript' and @src != '']" priority="1">
- <xsl:variable name="src">
- <xsl:choose>
- <xsl:when test="starts-with(@src, '../')"><xsl:value-of select="concat('$WEB$/', substring-after(@src, '../'))"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <library type="text/javascript" href="{$src}"/>
- </xsl:template>
-
- <xsl:template match="link[@type = 'text/css' and @href != '']" priority="1">
- <xsl:variable name="href">
- <xsl:choose>
- <xsl:when test="starts-with(@href, '../')"><xsl:value-of select="concat('$WEB$/', substring-after(@href, '../'))"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <css type="text/css" media="screen" href="{$href}"/>
- </xsl:template>
- <xsl:template match="text()" priority="0">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="node()" priority="0">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|