1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2014
- 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).
- -->
- <!--
- stylesheet will ensure that the breadcrumbs are separated by a ' > ', but what's inside the breadcrumb
- totally up to the caller. In most cases, the breadcrumb will be a link, and if uic:link is used you'll have to make
- you also include the common.xsl stylesheet.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- exclude-result-prefixes="xsl uic">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <!--
- breadcrumbs
- -->
- <xsl:template match="uic:breadcrumbs">
- <div class="cogstyle-breadcrumbs-main">
- <xsl:copy-of select="@*[namespace-uri()='']"/>
- <xsl:apply-templates select="*">
- <xsl:with-param name="valign" select="'middle'"/>
- </xsl:apply-templates>
- </div>
- </xsl:template>
- <!--
- breadcrumb and complexBreadcrumb
- @type: the type of breadcrumb
- - plaintext: path is shown in a tooltip
- - navigate: standard breadcrumb used for navigation (default)
- -->
- <xsl:template match="uic:complexBreadcrumb | uic:breadcrumb">
- <xsl:choose>
- <!-- don't put any styles if we're building the breadcrumbs to be shown in a tooltip -->
- <xsl:when test="@type = 'plaintext'">
- <xsl:apply-templates>
- <xsl:with-param name="valign" select="'middle'"/>
- </xsl:apply-templates>
-
- <xsl:if test="(following-sibling::uic:complexBreadcrumb | following-sibling::uic:breadcrumb) and not(@uic:noSpace = 'true')">
- <xsl:text>></xsl:text>
- </xsl:if>
- </xsl:when>
- <!-- standard breadcrumb, so add the needed styles -->
- <xsl:otherwise>
- <xsl:if test="(preceding-sibling::uic:complexBreadcrumb | preceding-sibling::uic:breadcrumb)">
- <span>
- <xsl:attribute name="class">cogstyle-breadcrumbs-pathSeparator</xsl:attribute>
- <xsl:text> > </xsl:text>
- </span>
- </xsl:if>
- <span>
- <xsl:attribute name="id">_THIS_breadcrumb<xsl:value-of select="position()"/></xsl:attribute>
- <xsl:if test="@lang != ''">
- <xsl:attribute name="lang"><xsl:value-of select="@lang"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="(not(following-sibling::uic:complexBreadcrumb) and not(following-sibling::uic:breadcrumb)) or @type='leafnode'">cogstyle-breadcrumbs-pathLeafNode</xsl:when>
- <xsl:otherwise>cogstyle-breadcrumbs-pathLink</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates>
- <xsl:with-param name="valign" select="'middle'"/>
- </xsl:apply-templates>
- </span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|