123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?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"
- xmlns:frag="http://developer.cognos.com/schemas/cps/logic/fragment/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
- xmlns:nui="http://developer.cognos.com/schemas/cps/logic/nav/ui/1/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- exclude-result-prefixes="xts xtsext ui nui nav">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="view" select="'search'"/>
- <xsl:include href="/mvc/includes/common-include.xslt"/>
- <xsl:include href="/mvc/includes/render-templates.xslt"/>
-
- <xsl:variable name="response" select="/root/logic/nav:searchResponse"/>
- <xsl:variable name="content" select="$response/nav:content"/>
- <xsl:variable name="path-separator"> > </xsl:variable>
-
- <xsl:template match="/">
- <response>
- <xsl:choose>
- <xsl:when test="/root/logic/error">
- <fragment>
- <xsl:copy-of select="/root/logic/error"/>
- </fragment>
- </xsl:when>
- <xsl:otherwise>
- <fragment>
- <markup>
- <markupXml>
- <xsl:call-template name="render"/>
- </markupXml>
- </markup>
- </fragment>
- </xsl:otherwise>
- </xsl:choose>
- </response>
- </xsl:template>
-
- <xsl:template name="render">
- <script>
- function _THIS_navigate(id) {
- var payload = {"folder-id" : id, "context" : "mvc-remote-search"};
- _THIS_.raiseEvent("fragment.search.navigateTo", payload);
- }
- </script>
- <xsl:call-template name="common-include"/>
- <xsl:apply-templates select="$content"/>
- </xsl:template>
-
- <xsl:template match="nav:content">
- <table>
- <tr>
- <td width="100%"/>
- <td>
- <xsl:call-template name="render-pager-control">
- <xsl:with-param name="content" select="$content"/>
- </xsl:call-template>
- </td>
- </tr>
- </table>
-
- <xsl:call-template name="render-pager">
- <xsl:with-param name="content" select="."/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="build-breadcrumb">
- <xsl:param name="fullPath"/>
- <xsl:param name="currentName"/>
-
- <xsl:variable name="path-stack">
- <xsl:apply-templates select="$fullPath/nav:pathStep/nav:pathStep"/>
- <path><name><xsl:value-of select="$currentName"/></name></path>
- </xsl:variable>
-
- <xsl:call-template name="render-breadcrumb">
- <xsl:with-param name="path-stack" select="$path-stack"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="nav:pathStep">
- <path><name><xsl:value-of select="nav:name"/></name></path>
- <xsl:apply-templates select="nav:pathStep"/>
- </xsl:template>
- </xsl:stylesheet>
|