1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?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).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <!--
- the following imports requires these variables to be defined:
- $metaData, $interactions, $logic, $userPreferences, $navRequest, $navResponse
- -->
- <xsl:import href="/common/propeditor/types/xsdtypes.xslt"/>
- <xsl:import href="/common/propeditor/types/fragextTypes.xslt"/>
- <xsl:import href="/common/propeditor/types/cmtypes.xslt"/>
- <xsl:import href="/common/propeditor/types/cmmtypes.xslt"/>
- <xsl:import href="/common/propeditor/types/generictypes.xslt"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!--
- Variable declarations. The xpath "/*[false()]" provides an empty node set result.
- -->
- <xsl:variable name="interactions" select="/root/interactions"/>
- <xsl:variable name="state" select="/root/state"/>
- <xsl:variable name="controllerParams" select="/root/controllerParams/param"/>
- <xsl:variable name="userPreferences" select="/*[false()]"/>
- <xsl:variable name="logic" select="/root/logic"/>
- <xsl:variable name="metaData" select="$logic/targetMeta/meta"/>
- <xsl:variable name="navRequest" select="/*[false()]"/>
- <xsl:variable name="navResponse" select="/*[false()]"/>
- <xsl:template match="/">
- <response>
- <xsl:variable name="fragPortalAgent">
- <xsl:choose>
- <xsl:when test="$controllerParams[@name='frag-portalAgent'] != ''">
- <xsl:value-of select="$controllerParams[@name='frag-portalAgent']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>cognosFragmentServer</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <request>
- <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/bus:biBusHeader"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:request>
- <nav:param name="portalAgent"><xsl:value-of select="$fragPortalAgent"/></nav:param>
- <nav:queries>
- <xsl:for-each select="/root/fragment/meta/customProperties[string(control/@appearance)!='hidden']">
- <xsl:apply-templates select="." mode="prepare-nav-request"/>
- </xsl:for-each>
- </nav:queries>
- </nav:request>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </request>
- </response>
- </xsl:template>
- <!-- these are templates required by the markup stage -->
- <xsl:template name="getPropertyValue"/>
- <xsl:template name="relatedControl"/>
- <xsl:template name="keyScript"/>
- <xsl:template name="createLanguageSelector"/>
- <xsl:template match="customProperties" mode="prepare-nav-request">
- <xsl:variable name="prefix" select="substring-before(datatype, ':')"/>
- <xsl:variable name="type" select="substring-after(datatype, ':')"/>
- <xsl:variable name="namespaceSpecificCustomProps">
- <xsl:element name="{$prefix}:{$type}" namespace="{datatype/namespace::*[name() = $prefix]}">
- <xsl:copy-of select="self::node()"/>
- </xsl:element>
- </xsl:variable>
- <xsl:apply-templates select="$namespaceSpecificCustomProps/*" mode="navReq"/>
- </xsl:template>
- </xsl:stylesheet>
- <!-- $Header: //cpscrn/main/src/java/etc/webapps/cps/WEB-INF/fragments/producers/common/propeditor/prepareNavRequests.xslt#1 $ -->
- <!-- $DateTime: 2008/10/22 11:12:04 $ -->
- <!-- $Change: 25109 $ -->
|