123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 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).
- -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:pg="http://developer.cognos.com/schemas/xts/pg"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="system-param" match="/root/system/param" use="@name"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="session-param" match="/root/session/param" use="@name"/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="navSearchSpec" select="/root/search/navSearchSpec"/>
- <xsl:variable name="maxObjects">
- <xsl:choose>
- <xsl:when test="string(key('env-param','m_pagertosearch')) !='' and string(key('env-param','m_pagerfromsearch')) != ''">
- <xsl:value-of select="key('env-param','m_pagertosearch') - key('env-param','m_pagerfromsearch') + 1"/>
- </xsl:when>
- <xsl:when test="string(key('session-param', 'linesPerPage'))!=''">
- <xsl:value-of select="key('session-param', 'linesPerPage')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('system-param', 'defaultUserPreferences')/pref[@name='lines']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="skipObjects">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_pagerfromsearch') and string(key('env-param', 'm_pagerfromsearch'))!=''">
- <xsl:value-of select="(key('env-param','m_pagerfromsearch'))-1"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'm_searchsection') != ''">
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_searchsection') != '-1'">
- <xsl:value-of select="((key('env-param', 'm_searchsection')) -1)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="($maxObjects) * -1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <!-- save/clear index drill search context -->
- <pg:store_cs_filter>
- <pg:cs_filter>key('env-param', 'cs_filter')</pg:cs_filter>
- </pg:store_cs_filter>
-
- <xts:append>
- <navContent>
- <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:search>
- <!-- nav options -->
- <nav:validateTag fault="true"/>
- <xsl:copy-of select="$navSearchSpec/*"/>
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <!-- nav properties -->
- <nav:param name="postUrl"/>
- <nav:param name="backUrl">false</nav:param>
- <nav:param name="urlFlags">h1t1</nav:param>
- <nav:property name="scopeInfo"/>
- <nav:property name="fullPath"/>
- <nav:property name="fullName"/>
- <nav:property name="icons"/>
- <nav:property name="screenTip"/>
- <nav:property name="createDate"/>
- <nav:property name="lastModifiedDate"/>
- <nav:property name="action"/>
- <nav:property name="actionsURL"/>
- <nav:property name="newState"/>
- <nav:property name="readState"/>
- <nav:property name="status"/>
- <nav:property name="hidden"/>
- <xsl:if test="/root/session/param[@name='e_showTenantInfo']='true'">
- <nav:property name="tenantID"/>
- </xsl:if>
- <xsl:if test="key('system-param', 'hide-rss-feed-links') != 'true'">
- <nav:property name="description"/>
- </xsl:if>
- <nav:param name="gatewayURL"><xsl:value-of select="$gateway"/></nav:param>
- <nav:param name="webContentURL">..</nav:param>
- <nav:param name="portalAgent">cognos</nav:param>
- <nav:param name="browserAgent"><xsl:value-of select="$browser"/></nav:param>
- </nav:search>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </navContent>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|