<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<!-- templates for translating IDs to names -->

    <xsl:template name="accessLevelName">
      	<xsl:param name="accessLevelID" />
        <xsl:if test="$accessLevelID = 1">RoyaltyShare Admin</xsl:if>
        <xsl:if test="$accessLevelID = 2">RoyaltyShare Account Rep</xsl:if>
        <xsl:if test="$accessLevelID = 3">Admin</xsl:if>
        <xsl:if test="$accessLevelID = 4">Royalty</xsl:if>
        <xsl:if test="$accessLevelID = 5">Label Report</xsl:if>
        <xsl:if test="$accessLevelID = 6">Marketing</xsl:if>
        <xsl:if test="$accessLevelID = 7">View Only</xsl:if>
        <xsl:if test="$accessLevelID = 8">Admin / Catalog View</xsl:if>
    </xsl:template>


	<xsl:template name="albumActive">
		<xsl:param name="inactive" />
		<xsl:if test="$inactive = 1">Inactive</xsl:if>
		<xsl:if test="$inactive = 0">Active</xsl:if>
	</xsl:template>


	<xsl:template name="albumStatus">
		<xsl:param name="status" />
		<xsl:if test="$status = 0">Inactive</xsl:if>
		<xsl:if test="$status = 1">Active</xsl:if>
	</xsl:template>
	  
	  
	<xsl:template name="albumDistributionReady">
		<xsl:param name="status" />
		<xsl:choose>
			<xsl:when test="$status = 1">Distribution Ready</xsl:when>
			<xsl:otherwise>Not Distribution Ready</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	  
	  
	<xsl:template name="albumParentalAdvisory">
		<xsl:param name="advisory" />
		<xsl:if test="$advisory = 'N'">N/A</xsl:if>
		<xsl:if test="$advisory = 'E'">Explicit</xsl:if>
		<xsl:if test="$advisory = 'C'">Clean</xsl:if>
	</xsl:template>


    <xsl:template name="productTypeName">
        <xsl:param name="productTypeID" />
        <xsl:param name="typeList" />     
        <xsl:choose>
            <xsl:when test="$productTypeID = 255">All Physical Products</xsl:when>
            <xsl:when test="$productTypeID = 254">All Digital Products</xsl:when>
            <xsl:when test="normalize-space($productTypeID)">
                <xsl:value-of select="$typeList/Type[ProductTypeID = $productTypeID]/Description" />
            </xsl:when>	          
            <xsl:otherwise>All Products</xsl:otherwise>
        </xsl:choose>          
    </xsl:template>

  
    <xsl:template name="rateBasis">
      	<xsl:param name="rateBasisID" />
        <xsl:if test="$rateBasisID = 1">Sales Date</xsl:if>
        <xsl:if test="$rateBasisID = 2">Lock Date</xsl:if>
    </xsl:template>


    <xsl:template name="rateType">
      	<xsl:param name="rateTypeID" />
        <xsl:if test="$rateTypeID = 1">Stat Rate</xsl:if>
        <xsl:if test="$rateTypeID = 2">Minimum Stat</xsl:if>
        <xsl:if test="$rateTypeID = 3">Penny Rate</xsl:if>
    </xsl:template>  


</xsl:stylesheet>

