123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?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).
- -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="objectPath" select="/root/env/param[@name = 'm_obj']"/>
- <xsl:variable name="isQS" select="/root/env/param[@name = 'm_app']"/>
- <xsl:variable name="containerPath" select="/root/env/param[@name='xxPath']"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- If a new path has been chosen (or handed to us on the request) then get its ancestors.-->
- <xsl:if test=" $containerPath != '' ">
- <xts:append>
- <newpath>
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="$containerPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </newpath>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="parseContent" mode="output" processor="XSLT" type="exec" mimeType="application/x-javascript" dependency="getContent">
- <!-- get the new theme stuff -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" version="1.0"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- exclude-result-prefixes="cf cm df pf">
- <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- add any theme variables -->
- <df:variables/>
- <pf:variables/>
- <xsl:template match="/root">
- <xsl:variable name="path">
- <xsl:value-of select="newpath/cm:queryResponse/*/cm:searchPath"/>
- </xsl:variable>
- var responseArray = new Array("<xsl:value-of select="xtsext:javascriptencode(string($path))"/>",
- <xsl:choose>
- <xsl:when test="$path!=''">
- <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
- <xsl:variable name="isPersonalPath" select="starts-with($path, '~') or ( key('session-param', 'e_hp') and starts-with($path, key('session-param', 'e_hp')) )"/>
- <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
- <xsl:variable name="rootPath">
- <xsl:choose>
- <xsl:when test="$isPersonalPath">
- <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
- </xsl:when>
- <xsl:when test="starts-with($path, '/content')">
- <xsl:value-of select="$defaultContentRoot"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="fullPath">
- <cf:do-the-path-link>
- <cf:param name="familytree">newpath/cm:queryResponse/*/cm:ancestors</cf:param>
- <cf:param name="familymember">newpath/cm:queryResponse/*/cm:defaultName</cf:param>
- <cf:param name="home"><xsl:value-of select="$rootPath"/></cf:param>
- </cf:do-the-path-link>
- </xsl:variable>
- "<xsl:value-of select="xtsext:javascriptencode(string($fullPath))"/>"
- </xsl:when>
- <xsl:otherwise>"<xts:string id="REPORT_TEMPLATE_NONE"/>"</xsl:otherwise>
- </xsl:choose>)
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|