123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: HTS
- (C) Copyright IBM Corp. 2005, 2010
- 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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- exclude-result-prefixes="xsl cm xtsext xts pf cf cp">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
-
- <xsl:template match="/root">
- <html>
- <head>
- <title>Loading Access Information</title>
- <script language="JavaScript">
- // the entries array is generated by the
- // server script, and populated with the
- // entries selected by he user in the CM wizard
- //
- function Entry()
- {
- var path;
- var objectClass;
- var defaultName;
- var iconURI;
- var key;
- var type;
- var img;
- }
-
- var g_vEntries = new Array();
- <xsl:choose>
- <xsl:when test="/root/morphletResponse/canceled">
- var cmd= 'canceled';
- </xsl:when>
- <xsl:otherwise>
- var cmd = 'ok';
- <xsl:for-each select="/root/newEntries/*">
- <xsl:variable name="fullPath">
- <cf:do-the-path-link>
- <cf:param name="familytree">*[local-name()='ancestors']</cf:param>
- <cf:param name="familymember">*[local-name()='defaultName']</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </xsl:variable>
- <xsl:variable name="type">
- <xsl:for-each select="*[local-name()='type']">
- <xsl:value-of select="xtsext:javascriptencode(string(.))"/>
- <xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="i" select="position()-1"/>
- g_vEntries[<xsl:value-of select="$i"/>] = new Entry();
- g_vEntries[<xsl:value-of select="$i"/>].key = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='storeID']))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].objectClass = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='objectClass']))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].path = '<xsl:value-of select="xtsext:javascriptencode(string($fullPath))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].iconURI = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='iconURI']))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].defaultName = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='defaultName']))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].searchPath = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='searchPath']))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].type = '<xsl:value-of select="xtsext:javascriptencode(string($type))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].img = '<xsl:value-of select="xtsext:javascriptencode(string(*[local-name()='img']))"/>';
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- <![CDATA[
- parent.ccModalCallBack(cmd, g_vEntries);
- ]]>
- </script>
- </head>
- <body>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
|