123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573 |
- <?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).
- -->
- <!-- $Header: //cpscrn/main/templates/cps4/portlets/nav/portlet-impl/search/search.xts#1 $ -->
- <!-- $DateTime: 2008/10/22 11:12:04 $ -->
- <!-- $Change: 25109 $ -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="/cps4/portlets/nav/messages/cpsnavmsgs.xml">
- <xts:block id="decode" processor="XSLT" type="exec" mode="interpret">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="last-search" select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Body/*[1]/wsrp:markupParams/wsrp:navigationalState/param[@name='last_search']"/>
- <xsl:if test="$last-search != ''">
- <xts:append>
- <lastSearch>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:base64decode(string($last-search), true())"/>
- </xts:transform>
- </lastSearch>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="request" dependency="decode" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="/cps4/producer/logicsheets/cps-portlet.xslt"/>
- <xts:logicsheet path="/cps4/portlets/nav/logicsheets/nav-request.xslt"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"
- xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:nreq="http://developer.cognos.com/schemas/cps/logic/nav/request/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cps="http://developer.cognos.com/schemas/cps/asm/objects/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="nav-service">interface://crn</xsl:variable>
- <portlet:property name="display-advanced" select="'display_advanced'"/>
- <portlet:property name="display-actions-link" select="'display_actions_link'"/>
- <portlet:property name="context" select="'context'" />
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <results>
- <portlet:if-window-state name="wsrp:normal|wsrp:maximized|wsrp:solo">
- <portlet:if-mode name="wsrp:view|wsrp:preview">
- <xsl:call-template name="request-serviceDescription"/>
- <xsl:call-template name="request-itemtypes"/>
- <!-- if we're in advanced mode get the list of item types -->
- <xsl:if test="$display-advanced = 'true'">
- <searchScope>
- <xsl:call-template name="request-searchscope"/>
- </searchScope>
- </xsl:if>
- <!-- if the user executed a search build the query and execute the searth -->
- <xsl:if test="$portlet-navigational-params[@name = 'execute'] = 'true' or ($portlet-navigational-params[@name = 'execute'] = 'false' and ($context != '' or /root/lastSearch/*))">
-
- <!-- Check if we have a search filter -->
- <xsl:variable name="params">
- <xsl:choose>
- <xsl:when test="$portlet-navigational-params[@name = 'execute'] = 'true' ">
- <xsl:copy-of select="$portlet-navigational-params[@name = 'cps_fields' or @name = 'cps_string' or @name = 'cps_itemType' or @name = 'cps_itemModified']"/>
- </xsl:when>
- <xsl:when test=" /root/lastSearch/*">
- <xsl:copy-of select="/root/lastSearch/param[@name = 'cps_fields' or @name = 'cps_string' or @name = 'cps_itemType' or @name = 'cps_itemModified']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="item-type">
- <xsl:choose>
- <xsl:when test="not ($params/param[@name = 'cps_itemType']) or $params/param[@name = 'cps_itemType'] = ''">any</xsl:when>
- <xsl:otherwise><xsl:value-of select="$params/param[@name = 'cps_itemType']"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="item-modified">
- <xsl:choose>
- <xsl:when test="not ($params/param[@name = 'cps_itemModified']) or $params/param[@name = 'cps_itemModified'] = ''">any</xsl:when>
- <xsl:otherwise><xsl:value-of select="$params/param[@name = 'cps_itemModified']"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="no-filter">
- <xsl:choose>
- <xsl:when test="$params/param[@name = 'cps_fields' ] = 'cs' and $params/param[@name = 'cps_string'] = '' ">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:when test="$params/param[@name = 'cps_fields' ] != 'cs' and $params/param[@name = 'cps_string'] = '' and $item-type = 'any' and $item-modified = 'any' ">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$no-filter = 'true'">
- <no-filter/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="request-search"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </portlet:if-mode>
- <portlet:if-mode name="wsrp:edit|cps:config">
- <xsl:if test="contains( $portlet-navigational-params[@name = 'edit_mode'], 'about' )">
- <portlet:get-version/>
- </xsl:if>
- </portlet:if-mode>
- </portlet:if-window-state>
- </results>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="cps-header">
- <!-- TODO: replace the cpsh:CPSHeader locales into the BIBUS header -->
- <xts:queryNode select="/root/envelope/*[local-name()='Envelope']/*[local-name()='Header']/*"/>
- </xsl:template>
- <xsl:template name="request-searchscope">
- <xts:request protocol="NAV" target="{ $nav-service }" responseEnvelope="false" faultBlock="requestFault">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <xsl:call-template name="cps-header"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:getContainer>
- <nav:id>rootDefault</nav:id>
- <nreq:common-request-params/>
- </nav:getContainer>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- <xsl:template name="request-itemtypes">
- <xts:request protocol="NAV" target="{ $nav-service }" responseEnvelope="false" faultBlock="requestFault">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <xsl:call-template name="cps-header"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:getItemTypes>
- <nreq:common-request-params/>
- </nav:getItemTypes>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- <xsl:template name="request-serviceDescription">
- <xts:request protocol="NAV" target="{ $nav-service }" responseEnvelope="false" faultBlock="requestFault">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <xsl:call-template name="cps-header"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:getServiceDescription/>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- <xsl:template name="request-search">
- <xsl:variable name="from" select="$portlet-navigational-params[@name = 'from']"/>
- <xsl:variable name="to" select="$portlet-navigational-params[@name = 'to']"/>
- <xsl:variable name="skip" select="$portlet-navigational-params[@name = 'skip']"/>
- <xsl:variable name="sort" select="$portlet-navigational-params[@name = 'sort']"/>
-
- <xsl:variable name="open-links">
- <xsl:choose>
- <xsl:when test="$portlet-state-params[@name = 'open_links'] != ''">
- <xsl:value-of select="$portlet-state-params[@name = 'open_links']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$portlet-system-params[@name = 'open_links']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="skipObjects">
- <xsl:choose>
- <xsl:when test="$from != ''">
- <xsl:value-of select="number( $from ) - 1"/>
- </xsl:when>
- <xsl:when test="$skip != ''">
- <xsl:value-of select="$skip"/>
- </xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="display-max-objects">
- <xsl:call-template name="portlet-get-property">
- <xsl:with-param name="property-name" select="'display_max_objects'"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="maxObjects">
- <xsl:choose>
- <xsl:when test="$to != '' and number($display-max-objects) = number($portlet-navigational-params[@name = 'display_max'])">
- <xsl:value-of select="number( $to ) - number($skipObjects)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$display-max-objects"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xts:request protocol="NAV" target="{ $nav-service }" responseEnvelope="false" protocolHeader="true" protocolHeaderSelect="/root/output" faultBlock="requestFault">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <xsl:call-template name="cps-header"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:search>
- <nav:validateTag fault="true">
- <xsl:value-of select="$portlet-markups/wsrp:validateTag"/>
- </nav:validateTag>
- <xsl:choose>
- <xsl:when test="$context != '' and $portlet-navigational-params[@name = 'execute'] = 'false'">
- <!-- use the last search nav:context -->
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <nav:context><xsl:value-of select="$context"/></nav:context>
- </xsl:when>
- <xsl:when test="/root/lastSearch/* and $portlet-navigational-params[@name = 'execute'] = 'false'">
- <!-- iNav's Search does not support nav:context, used our own saved last search criteria -->
- <xsl:call-template name="request-criteria">
- <xsl:with-param name="params" select="/root/lastSearch/param"/>
- <xsl:with-param name="skipObjects" select="$skipObjects"/>
- <xsl:with-param name="maxObjects" select="$maxObjects"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <!-- execute a new request with the given search criteria -->
- <xsl:call-template name="request-criteria">
- <xsl:with-param name="params" select="$portlet-navigational-params"/>
- <xsl:with-param name="skipObjects" select="$skipObjects"/>
- <xsl:with-param name="maxObjects" select="$maxObjects"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="$sort != ''">
- <xsl:variable name="order">
- <xsl:choose>
- <xsl:when test="$sort = 'name_d'"><xsl:text>descending</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>ascending</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <nav:sort order="{$order}">name</nav:sort>
- </xsl:if>
- <nav:property name="fullName"/>
- <nav:property name="icons"/>
- <xsl:if test="$open-links = 'channel'">
- <nav:property name="viewable"/>
- </xsl:if>
- <xsl:if test="$portlet-markups/wsrp:windowState = 'wsrp:maximized'">
- <nav:property name="description"/>
- </xsl:if>
- <nav:property name="screenTip"/>
- <nav:property name="createDate"/>
- <nav:property name="lastModifiedDate"/>
- <xsl:if test="$display-actions-link = 'true'">
- <nav:property name="action"/>
- <nav:property name="actionsURL"/>
- </xsl:if>
- <nav:property name="newState"/>
- <nav:property name="readState"/>
- <nav:property name="status"/>
- <nav:property name="hidden"/>
-
- <!-- burgundy search urlParameters -->
- <xsl:if test="$portlet-navigational-params[@name = 'cps_fields' ] = 'cs'">
- <nav:param name="useAllFilters"><xsl:value-of select="$portlet-navigational-params[@name = 'all_filters' ]"/></nav:param>
- <nav:param name="urlParameters">
- <xsl:for-each select="$portlet-navigational-params[starts-with( @name, 'cs_' ) and .!='']" >
- <xsl:value-of select="'&'"/>
- <xsl:value-of select="@name"/>
- <xsl:value-of select="'='"/>
- <xsl:value-of select="xtsext:urlencode(.)"/>
- </xsl:for-each>
- </nav:param>
- </xsl:if>
- <!-- Current window mode is disabled in myPortal (standalone pages) -->
- <xsl:if test="$open-links='current' and not($portlet-is-myportal)">
- <xsl:choose>
- <xsl:when test="$portlet-is-cognos-connection">
- <!--
- If the portal agent is CC, instruct NAV to return a rewritable back url.
- This way the portlet will be able to add the back url itself.
- Also, we need to show the header
- -->
- <nav:param name="default:backUrl">rewrite</nav:param>
- <nav:param name="default:urlFlags">h1</nav:param>
- </xsl:when>
- <xsl:otherwise>
- <!-- If this is a 3rd party portal, just don't return a back url. It doesn't make sense to use javascript:close() -->
- <nav:param name="default:backUrl">false</nav:param>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <nreq:common-request-params/>
- </nav:search>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xsl:template>
- <xsl:template name="request-criteria">
- <xsl:param name="params"/>
- <xsl:param name="skipObjects"/>
- <xsl:param name="maxObjects"/>
- <nav:string><xsl:value-of select="$params[@name = 'cps_string']"/></nav:string>
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <xsl:variable name="search-type">
- <xsl:choose>
- <xsl:when test="$params[@name = 'cps_fields' ] = 'cs'">
- <xsl:text>content</xsl:text>
- </xsl:when>
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <nav:searchType><xsl:value-of select="$search-type"/></nav:searchType>
-
- <xsl:if test="$params[@name = 'cps_objects']">
- <nav:objects><xsl:value-of select="$params[@name = 'cps_objects']"/></nav:objects>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_match']">
- <nav:match><xsl:value-of select="$params[@name = 'cps_match']"/></nav:match>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_fields']">
- <nav:fields><xsl:value-of select="$params[@name = 'cps_fields']"/></nav:fields>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_itemType']">
- <nav:itemType><xsl:value-of select="$params[@name = 'cps_itemType']"/></nav:itemType>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_itemState']">
- <nav:itemState><xsl:value-of select="$params[@name = 'cps_itemState']"/></nav:itemState>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_itemModified']">
- <nav:itemModified><xsl:value-of select="$params[@name = 'cps_itemModified']"/></nav:itemModified>
- </xsl:if>
- <xsl:if test="$params[@name = 'cps_scope']">
- <nav:scope><xsl:value-of select="$params[@name = 'cps_scope']"/></nav:scope>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="response" dependency="request" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="/cps4/producer/logicsheets/cps-portlet.xslt"/>
- <xts:logicsheet path="/cps4/common/logicsheets/soaplogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"
- xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/"
- xmlns:string="java.lang.String"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
-
- <portlet:portlet handle="search">
- <portlet:soap-response>
- <xsl:choose>
- <xsl:when test="/root/results/error">
- <portlet:soap-fault select="/root/results/error"/>
- </xsl:when>
- <xsl:otherwise>
-
- <portlet:if-mode name="wsrp:view|wsrp:preview">
- <portlet:response>
- <portlet:content>
- <xsl:variable name="val-tag">
- <xsl:choose>
- <xsl:when test="/root/results/nav:searchResponse">
- <xsl:value-of select="/root/results/nav:searchResponse/nav:validateTag"/>
- </xsl:when>
- <xsl:when test="/root/results/uiError">
- <xsl:text>error</xsl:text>
- <xsl:value-of select="string:hashCode(string:new(string(/root/results/uiError/message)))"/>
- </xsl:when>
- <xsl:otherwise>norequest</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="use-cache" select="$portlet-markups/wsrp:validateTag = string($val-tag) and (string($val-tag) != '')"/>
-
- <portlet:markup-context useCachedMarkup="$use-cache" mimeType="'text/html'" requiresUrlRewriting="'true'">
- <xsl:if test="not($use-cache = 'true')">
- <portlet:if-window-state name="wsrp:minimized">
- <portlet:markup-string/>
- </portlet:if-window-state>
-
- <portlet:if-window-state name="wsrp:normal|wsrp:maximized|wsrp:solo">
- <portlet:markup-transform name="XSLT" src="'/cps4/portlets/nav/portlet-impl/search/view.xslt'">
- <portlet:logicsheet>/cps4/portlets/nav/logicsheets/nav-ui.xslt</portlet:logicsheet>
- <portlet:logicsheet>/cps4/producer/logicsheets/cps-ui.xslt</portlet:logicsheet>
- <portlet:logicsheet>/logicsheets/indextree.xslt</portlet:logicsheet>
- <portlet:messageBase>/cps4/producer/messages/cpsproducermsgs.xml</portlet:messageBase>
- <portlet:messageBase>/cps4/portlets/nav/messages/cpsnavmsgs.xml</portlet:messageBase>
- <portlet:source>
- <lastSearch>
- <xsl:choose>
- <xsl:when test="/root/lastSearch/param">
- <xsl:copy-of select="/root/lastSearch/param[starts-with(@name, 'cps_')]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$portlet-navigational-params[starts-with(@name, 'cps_')]"/>
- </xsl:otherwise>
- </xsl:choose>
- </lastSearch>
- <xts:queryNode select="/root/results/*"/>
-
- <xts:function name="getConfiguration">
- <xts:param name="portal.disablecmsearch"/>
- </xts:function>
-
- </portlet:source>
- </portlet:markup-transform>
-
- <portlet:cache-control expires="'15'" validateTag="$val-tag"/>
- <xsl:variable name="titles" select="$portlet-state-params[starts-with( @name, 'title_' ) and .!='']"/>
- <portlet:preferred-title-localized select="$titles"/>
- </portlet:if-window-state>
- </xsl:if>
- </portlet:markup-context>
- </portlet:content>
- </portlet:response>
- </portlet:if-mode>
-
- <portlet:if-mode name="wsrp:edit|cps:config">
- <portlet:response>
- <portlet:content>
- <portlet:markup-context mimeType="'text/html'" requiresUrlRewriting="'true'">
- <xsl:variable name="xslt-src">
- <xsl:choose>
- <xsl:when test="contains( $portlet-navigational-params[@name = 'edit_mode'], 'about' )">
- <xsl:text>/cps4/producer/wsrp-impl/transforms/display-about.xslt</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>/cps4/portlets/nav/portlet-impl/search/edit.xslt</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <portlet:markup-transform name="XSLT" src="$xslt-src">
- <portlet:logicsheet>/cps4/producer/logicsheets/cps-ui-ext.xslt</portlet:logicsheet>
- <portlet:logicsheet>/cps4/producer/logicsheets/cps-ui.xslt</portlet:logicsheet>
- <portlet:logicsheet>/cps4/producer/logicsheets/cps-formlogic.xslt</portlet:logicsheet>
- <portlet:messageBase>/cps4/producer/messages/cpsproducermsgs.xml</portlet:messageBase>
- <portlet:messageBase>/cps4/portlets/nav/messages/cpsnavmsgs.xml</portlet:messageBase>
- <portlet:source>
-
- <xts:queryNode select="/root/results/*"/>
- <xts:function name="getConfiguration">
- <xts:param name="contentLocales">
- <xsl:value-of select="$portlet-product-locale"/>
- </xts:param>
- </xts:function>
- <xsl:variable name="nav-titles" select="$portlet-navigational-params[starts-with( @name, 'p_title_' ) and .!='']"/>
- <xsl:variable name="state-titles" select="$portlet-state-params[starts-with( @name, 'title_' ) and .!='']"/>
- <portlet:title-locale selectState1="$nav-titles" selectState2="$state-titles"/>
- </portlet:source>
- </portlet:markup-transform>
-
- </portlet:markup-context>
- </portlet:content>
- </portlet:response>
- </portlet:if-mode>
-
- <portlet:if-mode name="wsrp:help">
- <portlet:response>
- <portlet:content>
- <portlet:markup-context mimeType="'text/html'" requiresUrlRewriting="'false'">
- <portlet:markup-help/>
- </portlet:markup-context>
- </portlet:content>
- </portlet:response>
- </portlet:if-mode>
- </xsl:otherwise>
- </xsl:choose>
- </portlet:soap-response>
- </portlet:portlet>
- </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">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="xts-fault" select="/root/fault/xts:exception[last()]"/>
- <xsl:variable name="code" select="$xts-fault/xts:exceptionCode"/>
- <xsl:variable name="prefix" select="substring-before( string( $code ), ':' )"/>
- <xsl:variable name="local-code" select="substring-after( string( $code ), ':' )"/>
-
- <xsl:choose>
- <xsl:when test="($prefix = 'nav') and ($local-code = 'InvalidCredentials')">
- <error type="invalidCookie">
- <message>
- <xsl:value-of select="$xts-fault/xts:exceptionMsg"/>
- </message>
- </error>
- </xsl:when>
- <xsl:otherwise>
- <uiError>
- <message>
- <xsl:variable name="err-msg" select="$xts-fault/xts:exceptionMsg"/>
- <xsl:choose>
- <xsl:when test="contains($err-msg, 'CSN-IDS-0093')">
- <xts:string id="IDS_SEARCH_NO_INDEX"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$err-msg"/>
- </xsl:otherwise>
- </xsl:choose>
- </message>
- </uiError>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|