﻿<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:variable name="tab" select="'&#09;'" />

<xsl:template match="SetupSheetData/Data">
<html>
   <body>
<P align="center"><FONT SIZE="6.5" COLOR="#000000"><B>Geometric Americas</B></FONT></P>
  <P align="center"><FONT SIZE="5" COLOR="#000000"><B>Milling Process Sheet</B></FONT></P>
   
	<BR></BR>
    
     
 <table border="0" width = "100%" >
 <tr><td>
   <table border="0" align="Left" cellSpacing="1" CELLPADDING="1" width = "100%" bgcolor="#F0F0F0">
	<tr>
	
	<td width = "33%" height = "100%">
		 <table border="0" align="Left" CELLPADDING="9" width="100%">
				<xsl:for-each select="*"> 
				   <xsl:if test="name() = 'rep_CustomInfo'"> 
					<tr>    
					<td width = "25%" bgcolor="white"><font  color="#000000"><B>Part File: </B></font></td>
					<td bgcolor="white"><font color="#000000"><xsl:value-of select="@CustomInfoPartFile"/></font></td>
					</tr>
				  </xsl:if>
				</xsl:for-each>
				
				<xsl:for-each select="*"> 
					 
				  <xsl:if test="name() = 'rep_CustomInfo'"> 
					<tr>    
					<td width = "25%" bgcolor="white"><font color="#000000"><B>Machine Make</B></font></td>
					<td  bgcolor="white"><font color="#000000"><xsl:value-of select="@CustomInfoTitle"/></font></td>				
					</tr>
				  </xsl:if>
				   
				</xsl:for-each>

				<xsl:for-each select="*"> 
					 
				  <xsl:if test="name() = 'rep_Doc'"> 
					<tr>    
					<td width = "25%" bgcolor="white"><font color="#000000"><B>Unit</B></font></td>
					<td bgcolor="white"><font color="#000000"><xsl:value-of select="@Unit"/></font></td>				
					</tr>
				  </xsl:if>
				   
				</xsl:for-each>
				
				
				<xsl:for-each select="*"> 
					 
				  <xsl:if test="name() = 'rep_WorkPiece'"> 
					<tr>    
					<td width = "25%" bgcolor="white"><font color="#000000"><B>Stock Size.</B></font></td>
					<td bgcolor="white">
					<font color="#000000">
					<xsl:variable name = "strProgramName">
						<xsl:value-of select="@WorkPieceTypeName"/>
						</xsl:variable>
						<xsl:if test="$strProgramName ='Cylindrical'">														
							Dia : <xsl:value-of select="@WorkPieceMaxDia"/>, Length : <xsl:value-of select="@WorkPieceLength"/>
						</xsl:if>
						
						<xsl:if test="not($strProgramName ='Cylindrical')">														
							<xsl:value-of select="@WorkPieceLength"/>, <xsl:value-of select="@WorkPieceWidth"/>, <xsl:value-of 	 				select="@WorkPieceHeight"/>
						</xsl:if>
						</font>
					</td>				
					</tr>
				  </xsl:if>
				</xsl:for-each>	
					
		</table>
	 </td>
	 
	 
	 <td width = "33%" height = "100%">
		 <table border="0" align="Left" CELLPADDING="9" width="100%" height ="100%">
				<xsl:for-each select="*">	  
				<xsl:if test="name() = 'rep_CustomInfo'"> 
					<tr>    
				 <td width = "25%"  bgcolor="white"><font color="#000000"><B>Pragrammer Name</B></font></td>
				 <td  bgcolor="white"><font color="#000000"><xsl:value-of select="@CustomInfoAuthor"/></font></td>
				</tr>
				  </xsl:if>
				</xsl:for-each>
				
				
				<xsl:for-each select="*">	  
				<xsl:if test="name() = 'rep_WorkPiece'"> 
					<tr>    
				 <td width = "25%"  bgcolor="white"><font color="#000000"><B>Material</B></font></td>
				 <td  bgcolor="white"><font color="#000000"><xsl:value-of select="@WorkPieceMaterial"/> : <xsl:value-of select="@WorkPieceStockGroupName"/></font></td>
				</tr>
				  </xsl:if>
				</xsl:for-each>
				
		 
				<xsl:for-each select="*">	  
				<xsl:if test="name() = 'rep_CustomInfo'"> 
					<tr>    
				 <td width = "25%"  bgcolor="white"><font color="#000000"><B>Date/Time</B></font></td>
				 <td  bgcolor="white"><font color="#000000"><xsl:value-of select="@CustomInfoDateTime"/></font></td>
				</tr>
				  </xsl:if>
				</xsl:for-each>
				
				
       
				<xsl:for-each select="*"> 
					 
				  <xsl:if test="name() = 'rep_MchParams'"> 
					<tr>    
				 <td width = "25%"  bgcolor="white"><font color="#000000"><B>Total Time:</B></font></td>
				 <td  bgcolor="white"><font color="#000000"><xsl:value-of select="@MchTotalMachiningTimeOfMachine"/></font></td>
				</tr>
				  </xsl:if>
			   </xsl:for-each>
					
		</table>
	 </td>
</tr>
</table>
 </td></tr>
<tr>
	<td height = "1px">
       <HR SIZE="3" COLOR="#5742BD"/>
    
	</td>
</tr>
<tr><td>
<table border="0" align="Left" cellSpacing="1" CELLPADDING="1"   width = "100%" >
 
 <tr><td>
<table border="0" align="Left" cellSpacing="1" CELLPADDING="1"   width = "100%" >
<xsl:for-each select="*">
<xsl:if test="name() = 'MillSetupSheetAttr'">
  
    
   	<tr>
		<td>
		<table border="0"  align="left" CELLPADDING="9"   width = "40%" bgcolor="#F0F0F0" >
			<table border="0"  align="left" CELLPADDING="9"   width = "40%" bgcolor="#F0F0F0" >
						
				<tr>    
				<td width = "20%"  bgcolor="white"><font color="#000000"><B>Setup #</B></font></td>
				<td align="left" width = "10%" bgcolor="white"><font color="#000000"><xsl:value-of select="rep_SetupAttr/@SetupAttrSetupNo"/></font></td>
				</tr>
				<tr>    
				<td width = "20%" bgcolor="white"><font color="#000000"><B>Setup Name</B></font></td>
				<td align="left" width = "20%" bgcolor="white"><font color="#000000"><xsl:value-of select="rep_SetupAttr/@SetupAttrSetupName"/></font></td>
				</tr>
				<tr>    
				<td width = "20%" bgcolor="white"><font color="#000000"><B>Machining time</B></font></td>
				<td align="left" width = "20%" bgcolor="white"><font color="#000000"><xsl:value-of select="rep_SetupAttr/@SetupAttrTotalMachTime"/></font></td>
				</tr>	
			</table>
			
			<table align="Right" cellpadding="5" width = "50%">
					<xsl:variable name = "imageUrl1">
					<xsl:value-of select="rep_SetupAttr/@SWIsometricViewImgPath"/>
					</xsl:variable>
					<xsl:text disable-output-escaping="yes">&lt;img src="</xsl:text>
					<xsl:value-of select="$imageUrl1"/>
					<xsl:text disable-output-escaping="yes">"&#160;WIDTH="200" HEIGHT="200" border="3" /&gt;</xsl:text>
			</table>
		</table>
			


<!--This is the isometric view from SW -->
		
		</td>
	</tr>
		

						
		
	<tr>
	  <td width = "100%">
	    <table border="0" align="center" CELLPADDING="5" width = "100%" bgcolor="#F0F0F0"> 
			    <tr bgcolor="InactiveCaption">
					<th><font color="#000000"><B>S.NO.</B></font></th>
					<th><font color="#000000"><B>Operation</B></font></th>
					<th><font color="#000000"><B>Feature</B></font></th>
					<th><font color="#000000"><B>Machining Length</B></font></th>
					<th><font color="#000000"><B>RPM</B></font></th>
					<th><font color="#000000"><B>Feed</B></font></th>
					<th><font color="#000000"><B>Tool Name</B></font></th>
					<th><font color="#000000"><B>Tool Slot</B></font></th>
					<th><font color="#000000"><B>Machining Time</B></font></th>
					<th><font color="#000000"><B>Comp.</B></font></th>					
				</tr>  
		     <!-- Simply Uncomment Below written Line in order to sort operations according to tool number --> 
		     <!--<xsl:sort select="rep_Tool/@ToolStnNo" />	-->
		<xsl:for-each select="MillOperation"> 		
			  <tr>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="position()" />		   </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Operation/@OperationName"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Feature/@FeatureName"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Relation/@RelationTlpLen"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_MillOperParams/@MillSpindleSpeed"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_MillOperParams/@ZFeedRate"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Tool/@ToolName"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Tool/@ToolStnNo"/> </font></td>
		   <td align="center"  bgcolor="white"><font color="#000000"> <xsl:value-of select="rep_Relation/@RelationTime"/> </font></td>
		   <td bgcolor="white" align="center"><xsl:choose><xsl:when test="rep_MillOperParams/@CNCCompensation = 'On'"><font><B><xsl:value-of select="rep_MillOperParams/@CNCCompensation"/></B></font></xsl:when></xsl:choose></td>
		   </tr>
		 </xsl:for-each>
	 </table>
	</td>
    </tr>

	<tr>
	<td height = "15px">
	 
	</td>
	</tr>
 </xsl:if>  <!-- if tag is MillSetupSheetAttr -->

</xsl:for-each>	<!-- for each tag under data -->
	</table>
</td></tr>
	
	 
	 
	 <tr>
	<td height = "1px">
	 
	</td>
	</tr>
	 
	

	</table>
</td></tr>
</table>
     <HR SIZE="3" COLOR="#5742BD"/>
	</body>
  </html>
 </xsl:template>
</xsl:stylesheet>