123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2013
- 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/" resolverBase="cogadmin" messageBase="messages/cogadminuimsgs.xml" requiredCapability="canUsePortalAdministrationTool">
- <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only')]" mandatory="true"/>
- <xts:block id="getContent" dependency="frag_init" nodelist="env, state, header, session, system, http, configProps" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
- <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
- <xts:logicsheet path="cogadmin/logicsheets/presentation/filters.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:flt="http://developer.cognos.com/schemas/uic/presentation/filters/"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- exclude-result-prefixes="xsl xts SOAP-ENV bus admui xtsext flt">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <!-- common pager variables -->
- <admui:pagerVariables pagerName="visualizations"/>
-
- <!-- common variables -->
- <admui:variables/>
-
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="key('env-param', 'visualization_path') != ''">
- <xsl:value-of select="key('env-param', 'visualization_path')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>path:/catalog/catalogFolder[@name='Visualizations']</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <response>
- <xts:request href="bus://dispatcher" protocol="NAV" responseEnvelope="false" outputHeader="false">
- <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:getContainer>
- <nav:id>
- <xsl:value-of select="$path"/>
- </nav:id>
- <nav:childObjectFilter>
- <xsl:if test="false()"> <!-- not supported at this point! -->
- <nav:itemType>catalogFolder</nav:itemType>
- </xsl:if>
- <nav:itemType>visualization</nav:itemType>
- <nav:itemType>catalog</nav:itemType>
- </nav:childObjectFilter>
- <nav:validateTag fault="true"/>
- <nav:scope><xsl:value-of select="$path"/>/*</nav:scope>
- <nav:property name="defaultName"/>
- <nav:property name="ancestors"/>
- <nav:property name="hasChildren"/>
- <nav:property name="permissions"/>
- <nav:property name="searchPath"/>
- <nav:property name="lastModifiedDate"/>
- <nav:property name="displaySequence"/>
- <nav:property name="position"/>
- <nav:property name="screenTip"/>
- <nav:property name="iconURI"/>
- <nav:property name="userCapability"/>
- <nav:property name="fullPath"/>
- <nav:property name="ancestors"/>
- <nav:property name="parentId"/>
- <nav:property name="type"/>
- <nav:property name="internalId"/>
- <nav:property name="name"/>
- <nav:property name="icons"/>
- <nav:property name="hidden"/>
- <nav:property name="tenantID"/>
- <nav:property name="dataPathInfo"/>
- <!-- nav properties -->
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:sort>
- <xsl:variable name="_sortColumn">
- <xsl:choose>
- <xsl:when test="key('env-param', 'sort_column') != ''">
- <xsl:value-of select="key('env-param', 'sort_column')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('env-param', 'init_sort_column')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="_sortOrder">
- <xsl:choose>
- <xsl:when test="key('env-param', 'sort_column') != ''">
- <xsl:value-of select="key('env-param', 'sort_order')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('env-param', 'init_sort_order') "/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:attribute name="order">
- <xsl:choose>
- <xsl:when test="$_sortOrder='ascending'">ascending</xsl:when>
- <xsl:when test="$_sortOrder='descending'">descending</xsl:when>
- <xsl:otherwise>descending</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="$_sortOrder != ''">
- <xsl:value-of select="$_sortColumn"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>displaySequence</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </nav:sort>
- <!-- common nav params -->
- <admui:commonNavParams/>
- </nav:getContainer>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Merge the tenantNames into the response -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- path="/portal/tenancy/mergeTenantNames.xslt"
- id="mergeTenantNames"
- dependency="getContent"
- condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env, updatedPath" processor="XSLT">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:val="http://developer.cognos.com/schemas/validator/1/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- exclude-result-prefixes="xsl xts xos val xtsext nav">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="path" select="/root/response/nav:getContainerResponse/nav:container/nav:content/*/nav:id"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <fragment>
- <info>
- <title>
- <xts:string id="IDS_ADM_VISUALIZATIONS"/>
- </title>
- </info>
- <preferredTitle>
- <xts:string id="IDS_ADM_VISUALIZATIONS"/>
- </preferredTitle>
- <meta>
- <transientProperties name="visualization_name">
- <validate>
- <val:name>visualization_name</val:name>
- <val:rule>
- <val:type>
- <val:string maxLength="255"/>
- </val:type>
- </val:rule>
- </validate>
- </transientProperties>
- <transientProperties name="visualization_path">
- <validate>
- <val:name>visualization_path</val:name>
- <val:rule>
- <val:type>
- <val:string maxLength="255"/>
- </val:type>
- </val:rule>
- </validate>
- </transientProperties>
- </meta>
- <state>
- <xsl:variable name="state">
- <xsl:text><param name="searchMode"></xsl:text>
- <xsl:value-of select="xtsext:xmlencode(string(key('env-param', 'searchMode')))"/>
- <xsl:text></param></xsl:text>
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode($state,true())"/>
- </state>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="renderMarkup" dependency="frag_init getMeta getContent" nodelist="env, state, user, system" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl nemo admui xts SOAP-ENV xos bus nav">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <xts:transform src="/cogadmin/transforms/gen-ui-markup/visualizations.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/pager.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse'] | /root/response/* | /root/scheduledBy | /root/user | /root/metadata | /root/system | /root/session | /root/env | /root/http | /root/updatedPath"/>
- </root>
- </xts:transform>
- <xts:queryNode select="/root/system | /root/session | /root/user"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
-
- <xsl:if test="key('env-param','searchMode') != ''">
- <subfragment id="VISUALIZATIONS_SEARCH_FRAGMENT" href="bus://xts.run?m=/cogadmin/search.xts&type=visualizations"/>
- </xsl:if>
-
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|