123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <!--
- ================================================================================
- decode_results
-
- Decodes the value of the addentries_list field and appends it to the input
- document.
- ================================================================================
- -->
- <xts:block id="decode_results" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='addentries_list']]">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <entries>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='addentries_list'])), true())" disable-output-escaping="yes"/>
- </entries>
- </xts:append>
- <!--xts:delete select="/root/env/param[@name='addentries_list']"/-->
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- get_entries_names
-
- Retrieves the names property for each of the result entries.
- ================================================================================
- -->
- <xts:block id="get_entries_names" type="exec" mode="interpret" processor="XSLT" dependency="decode_results" mandatory="false" condition=".[/root/entries/*]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <list>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <xsl:for-each select="/root/entries/*">
- <cm:query>
- <cm:search>
- <xsl:value-of select="cm:searchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="userName"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- </xsl:for-each>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </list>
- </xts:append>
- <!--xts:delete select="/root/entries"/-->
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
-
- ================================================================================
- -->
- <xts:block id="render_page" dependency="get_entries_names" mode="output" processor="XSLT" type="exec" mimeType="text/html"
- 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/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
-
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
-
- <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/"
- exclude-result-prefixes="xsl cm xtsext">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
-
- <xsl:template match="/root">
- <html lang="{$productLocale}">
- <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
- //
- <xsl:variable name="item-count" select="count(/root/list/*)"/>
- function Entry()
- {
- var path;
- var type;
- var names;
- var userName;
- var displayPath;
- }
- function MultilingualName()
- {
- var lang;
- var name;
- }
- var g_vEntries = new Array();
- <xsl:for-each select="/root/list/cm:queryResponse/cm:queryReply/*">
- <xsl:variable name="fullPath">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </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"/>].path = '<xsl:value-of select="xtsext:javascriptencode(string(cm:searchPath))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].type = '<xsl:value-of select="xtsext:javascriptencode(string(cm:objectClass))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].userName = '<xsl:value-of select="xtsext:javascriptencode(string(cm:userName))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].displayPath = '<xsl:value-of select="xtsext:javascriptencode(string($fullPath))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].names = new Array(<xsl:value-of select="count(cm:name/cm:multilingualToken)"/>);
- g_vEntries[<xsl:value-of select="$i"/>].names[0] = new MultilingualName();
- g_vEntries[<xsl:value-of select="$i"/>].names[0].lang = '<xsl:value-of select="xtsext:javascriptencode(string($contentLocale))"/>';
- g_vEntries[<xsl:value-of select="$i"/>].names[0].name = '<xsl:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>';
- </xsl:for-each>
- <![CDATA[
- // function that passes the information from the g_vEntries array
- // to the container application
- function OnPageLoaded()
- {
- var ext = window.external;
- if (!ext || ext.Signature != "BMT-CMAccessDlg")
- return;
- for (var i = 0; i < g_vEntries.length; i++)
- {
- var e = g_vEntries[i];
- var nExtIndex = ext.AddEntry(e.path, e.type);
- if (-1 != nExtIndex)
- {
- for (var j = 0; j < e.names.length; j++)
- {
- ext.AddEntryName(nExtIndex, e.names[j].lang, e.names[j].name, e.userName, e.displayPath);
- }
- }
- }
- ext.OnClose(0);
- }
- ]]>
- </script>
- </head>
- <body onload="OnPageLoaded();" style="background-color:buttonface;border:0 solid #FFFFFF;overflow:auto;">
- <table width="100%" height="100%">
- <tr height="100%">
- <td align="center">
- <table>
- <tr>
- <td>
- <span style="font-family:Verdana,Tahoma,Arial;font-size:8pt;font-weight:normal;">
- Loading Access Information...
- </span>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" mimeType="text/html" dependency="render_page">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- -->
- </xts:morphlet>
|