123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (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 version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:block id="getContent" type="exec"
- condition=".[not(/root/env/param[@name='frag-directive']='meta-only')]"
- mode="interpret" 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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- exclude-result-prefixes="xts xos bus nav SOAP-ENV">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:include href="/fragments/mvc/includes/common-include.xslt"/>
-
- <xsl:template match="/">
- <xsl:variable name="container-id">
- <xsl:choose>
- <xsl:when test="string($params[@name='containerId']) != ''">
- <xsl:choose>
- <xsl:when test="$params[@name='containerId'] = 'systemDefault' or $params[@name='containerId'] = 'userDefault' or $params[@name='containerId'] = 'rootDefault'">
- <xsl:value-of select="$params[@name='containerId']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="not(starts-with($params[@name='containerId'], '_'))">
- <xsl:text/>path:<xsl:text/>
- </xsl:if>
- <xsl:value-of select="$params[@name='containerId']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="string($params[@name='customContentId']) != ''">
- <xsl:value-of select="$params[@name='customContentId']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>systemDefault<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <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>
- <response>
- <logic>
- <configured-gateway><xts:function name="getConfiguration"><xts:param name="gateway"/></xts:function></configured-gateway>
- <xsl:copy-of select="/root/state"/>
- <xsl:if test="string($container-id) != ''">
- <xts:request name="NAV" faultBlock="requestFault">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/bus:biBusHeader"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:getContainer>
- <nav:validateTag/>
- <nav:id><xsl:value-of select="$container-id"/></nav:id>
- <nav:childObjects>all</nav:childObjects>
-
- <xsl:call-template name="build-pagination-params"/>
-
- <nav:param name="postUrl"/>
- <nav:param name="backUrl">rewrite</nav:param>
- <nav:param name="browserAgent"><xsl:value-of select="$browser"/></nav:param>
-
- <!-- properties -->
- <xsl:call-template name="build-navQuery-properties"/>
- </nav:getContainer>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:if>
- </logic>
- </response>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="requestFault" type="fault" processor="XSLT">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xts">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:include href="/fragments/mvc/includes/common-include.xslt"/>
-
- <xsl:template match="/">
- <xsl:call-template name="handleException"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|