<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
							  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
							  xmlns:ms="urn:schemas-microsoft-com:xslt"
							  xmlns:user="mynamespace">
	<xsl:template name="fedex">
	
		<xsl:choose>
			<xsl:when test="count (/root/FDXRateAvailableServicesReply/Error) &gt; 0">
				Error: <xsl:value-of select="/root/FDXRateAvailableServicesReply/Error/Message"/>
			</xsl:when>
			<xsl:when test="count (/root/FDXRateAvailableServicesReply/SoftError) &gt; 0">
				Error: <xsl:value-of select="/root/FDXRateAvailableServicesReply/SoftError/Message"/>
			</xsl:when>
			<xsl:otherwise>
			<table width="100%" border="0" cellspacing="1" cellpadding="2">
				<tr class="myfont" valign="top">
					<th width="20%" align="center" class="mybgcolor2a"><xsl:value-of select="/root/root/select_option"/></th>
					<th width="60%" align="center" class="mybgcolor2a"><img>
						<xsl:attribute name="src"><xsl:value-of select="/root/config/sitepath"/>images/general/fedex_logo.gif</xsl:attribute></img></th>
					<th width="20%" align="center" class="mybgcolor2a"><xsl:value-of select="/root/root/handling_fee"/></th>
				</tr>
				<xsl:for-each select="/root/FDXRateAvailableServicesReply/Entry">
					<tr class="myfont" valign="top">
						<td align="center" class="mybgcolor"><input type="radio" name="product">
							<xsl:attribute name="onclick">select_processor(this.form,'FEDEX','<xsl:value-of select="Service"/>',<xsl:value-of select="EstimatedCharges/DiscountedCharges/NetCharge"/>)</xsl:attribute>
							</input>
						</td>
						<td class="mybgcolor"><xsl:value-of select="Service"/></td>
						<td class="mybgcolor" align="right"><xsl:value-of select="format-number(EstimatedCharges/DiscountedCharges/NetCharge,/root/config/number_format[@selected=1]/@format,/root/config/number_format[@selected=1]/@name)"/></td>
					</tr>
				</xsl:for-each>
			</table>
			<br/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>

					
