<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
	<xsl:template match="/">
		<SHPFIX_0210 xsi:noNamespaceSchemaLocation="file://n:\Partner\Customer\Saks\EDI\RsaksXKEKXX\SHPFIX_0210.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<xsl:for-each select="KNePackingList/ePackingListMessage">
				<xsl:variable name="PhysicalReceiver">DEHAM10</xsl:variable>
				<xsl:variable name="LogicalReceiver">USBHM05</xsl:variable>
				<xsl:variable name="LogicalSenderAddress">USBHM05</xsl:variable>
				<xsl:variable name="CommunicationCounter">01</xsl:variable>
				<xsl:variable name="CommunicationReference">COMREF</xsl:variable>
				<Message>
					<G000>
						<Segment_Identifier>C000</Segment_Identifier>
						<Communication_Reference>
							<xsl:value-of select="$CommunicationReference"/>
						</Communication_Reference>
						<Physical_Receiver>
							<xsl:value-of select="$PhysicalReceiver"/>
						</Physical_Receiver>
						<Logical_Receiver>
							<xsl:value-of select="$LogicalReceiver"/>
						</Logical_Receiver>
						<Message_type>SHPFIX</Message_type>
						<Version_number>0210</Version_number>
						<Sending_application>Customer</Sending_application>
						<Creation_Date>
							<xsl:value-of select="translate(../Envelope/TransmissionDateTime/Date,'-','')"/>
						</Creation_Date>
						<Creation_Time>
							<xsl:value-of select="substring(translate(../Envelope/TransmissionDateTime/Time,':',''),1,4)"/>
						</Creation_Time>
						<Level_structure_code>EPL</Level_structure_code>
						<Mode_of_transport>
							<xsl:value-of select="ShipmentHeaderLevel/ModeOfTransport"/>
						</Mode_of_transport>
						<Logical_Sender_Address>
							<xsl:value-of select="$LogicalSenderAddress"/>
						</Logical_Sender_Address>
						<Communication_Counter>
							<xsl:value-of select="$CommunicationCounter"/>
						</Communication_Counter>
					</G000>
					<PartyContactInformation>
						<G521>
							<Segment_Identifier>C521</Segment_Identifier>
							<Communication_Reference>
								<xsl:value-of select="$CommunicationReference"/>
							</Communication_Reference>
							<Physical_Receiver>
								<xsl:value-of select="$PhysicalReceiver"/>
							</Physical_Receiver>
							<Logical_Receiver>
								<xsl:value-of select="$LogicalReceiver"/>
							</Logical_Receiver>
							<Address_Type_Code>CU</Address_Type_Code>
							<Address__Line_1>SAKS DEPARTMENT STORE GROUP</Address__Line_1>
							<Country_Code>US</Country_Code>
							<KN_Customer_No>
								<xsl:value-of select="$LogicalSenderAddress"/>
							</KN_Customer_No>
							<Logical_Sender_Address>
								<xsl:value-of select="$LogicalSenderAddress"/>
							</Logical_Sender_Address>
							<Communication_Counter>
								<xsl:value-of select="$CommunicationCounter"/>
							</Communication_Counter>
						</G521>
					</PartyContactInformation>
					<G522>
						<Segment_Identifier>C522</Segment_Identifier>
						<Communication_Reference>
							<xsl:value-of select="$CommunicationReference"/>
						</Communication_Reference>
						<Physical_Receiver>
							<xsl:value-of select="$PhysicalReceiver"/>
						</Physical_Receiver>
						<Logical_Receiver>
							<xsl:value-of select="$LogicalReceiver"/>
						</Logical_Receiver>
						<Communication_Status>7</Communication_Status>
						<Type_of_Shipment_Code>
							<xsl:value-of select="ShipmentHeaderLevel/TypeOfShipment"/>
						</Type_of_Shipment_Code>
						<Type_of_Transport>
							<xsl:choose>
								<xsl:when test="ShipmentHeaderLevel/ModeOfTransport='2'">40</xsl:when>
								<xsl:otherwise>10</xsl:otherwise>
							</xsl:choose>
						</Type_of_Transport>
						<Weight_Identifier>
							<xsl:value-of select="ShipmentHeaderLevel/TotalGrossWeight/MeasureUnit"/>
						</Weight_Identifier>
						<Volume_Identifier>
							<xsl:value-of select="ShipmentHeaderLevel/TotalVolume/MeasureUnit"/>
						</Volume_Identifier>
						<Dimension_Identifier>C</Dimension_Identifier>
						<Decimal_Position_Weight>2</Decimal_Position_Weight>
						<Decimal_Position_Volume>3</Decimal_Position_Volume>
						<Dangerous_Goods_Flag>N</Dangerous_Goods_Flag>
						<xsl:if test="ShipmentHeaderLevel/TotalNumberOfPackages">
							<Total_No_of_Packages>
								<xsl:value-of select="(ShipmentHeaderLevel/TotalNumberOfPackages)*(1)"/>
							</Total_No_of_Packages>
						</xsl:if>
						<No_of_packages_of_dangerous_Goods>0</No_of_packages_of_dangerous_Goods>
						<xsl:if test="ShipmentHeaderLevel/TotalGrossWeight/Value">
							<Total_Gross_Weight>
								<xsl:value-of select="round((ShipmentHeaderLevel/TotalGrossWeight/Value)*(100))"/>
							</Total_Gross_Weight>
						</xsl:if>
						<xsl:if test="ShipmentHeaderLevel/TotalVolume/Value">
							<Total_Volume>
								<xsl:value-of select="round((ShipmentHeaderLevel/TotalVolume/Value)*(1000))"/>
							</Total_Volume>
						</xsl:if>
						<KN_File_reference_No>
							<xsl:value-of select="concat(translate(ShipmentHeaderLevel/KNReferenceNumber,'-.',''),'00')"/>
						</KN_File_reference_No>
						<Cross_Trade_Indicator>N</Cross_Trade_Indicator>
						<Triangle_Shipment_Indicator>N</Triangle_Shipment_Indicator>
						<Mode_of_Transport>
							<xsl:value-of select="ShipmentHeaderLevel/ModeOfTransport"/>
						</Mode_of_Transport>
						<Logical_Sender_Address>
							<xsl:value-of select="$LogicalSenderAddress"/>
						</Logical_Sender_Address>
						<Communication_Counter>
							<xsl:value-of select="$CommunicationCounter"/>
						</Communication_Counter>
					</G522>
					<xsl:choose>
						<!--Sea-->
						<xsl:when test="ShipmentHeaderLevel/ModeOfTransport='3'">
							<G530>
								<Segment_Identifier>C530</Segment_Identifier>
								<Communication_Reference>
									<xsl:value-of select="$CommunicationReference"/>
								</Communication_Reference>
								<Physical_Receiver>
									<xsl:value-of select="$PhysicalReceiver"/>
								</Physical_Receiver>
								<Logical_Receiver>
									<xsl:value-of select="$LogicalReceiver"/>
								</Logical_Receiver>
								<Container_Movement_Code>
									<xsl:value-of select="ShipmentHeaderLevel/TypeOfShipment"/>
								</Container_Movement_Code>
								<Logical_Sender_Address>
									<xsl:value-of select="$LogicalSenderAddress"/>
								</Logical_Sender_Address>
								<Communication_Counter>
									<xsl:value-of select="$CommunicationCounter"/>
								</Communication_Counter>
							</G530>
						</xsl:when>
						<!--Air-->
						<xsl:when test="ShipmentHeaderLevel/ModeOfTransport='2'">
							<G540>
								<Segment_Identifier>C540</Segment_Identifier>
								<Communication_Reference>
									<xsl:value-of select="$CommunicationReference"/>
								</Communication_Reference>
								<Physical_Receiver>
									<xsl:value-of select="$PhysicalReceiver"/>
								</Physical_Receiver>
								<Logical_Receiver>
									<xsl:value-of select="$LogicalReceiver"/>
								</Logical_Receiver>
								<Logical_Sender_Address>
									<xsl:value-of select="$LogicalSenderAddress"/>
								</Logical_Sender_Address>
								<Communication_Counter>
									<xsl:value-of select="$CommunicationCounter"/>
								</Communication_Counter>
							</G540>
						</xsl:when>
					</xsl:choose>
					<xsl:for-each select="ShipmentHeaderLevel/CargoDescriptionLevel">
						<ShipmentDetails>
							<G524>
								<Segment_Identifier>C524</Segment_Identifier>
								<Communication_Reference>
									<xsl:value-of select="$CommunicationReference"/>
								</Communication_Reference>
								<Physical_Receiver>
									<xsl:value-of select="$PhysicalReceiver"/>
								</Physical_Receiver>
								<Logical_Receiver>
									<xsl:value-of select="$LogicalReceiver"/>
								</Logical_Receiver>
								<_1st_Current_Line_No>
									<xsl:number format="001" value="'1'"/>
								</_1st_Current_Line_No>
								<_1st_Container_No_AWB_Rating>
									<xsl:value-of select="ContainerNumber"/>
								</_1st_Container_No_AWB_Rating>
								<_1st_Marks__Numbers>
									<!--Single Consignment (FCL Sea)-->
									<xsl:if test="../TypeOfShipment='2'">
										<xsl:value-of select="ContainerNumber"/>
									</xsl:if>
								</_1st_Marks__Numbers>
								<xsl:if test="NumberOfPackages">
									<_1st_No_of_Packages>
										<xsl:value-of select="(NumberOfPackages)*(1)"/>
									</_1st_No_of_Packages>
								</xsl:if>
								<_1st_Kind_of_Packing>
									<xsl:value-of select="TypeOfPackage"/>
								</_1st_Kind_of_Packing>
								<xsl:if test="GrossWeight/Value">
									<_1st_Gross_weight>
										<xsl:value-of select="round((GrossWeight/Value)*(100))"/>
									</_1st_Gross_weight>
								</xsl:if>
								<xsl:if test="TotalVolume/Value">
									<_1st_Volume>
										<xsl:value-of select="round((TotalVolume/Value)*(1000))"/>
									</_1st_Volume>
								</xsl:if>
								<_1st_Contents>
									<xsl:value-of select="Content[1]"/>
								</_1st_Contents>
								<Logical_Sender_Address>
									<xsl:value-of select="$LogicalSenderAddress"/>
								</Logical_Sender_Address>
								<Communication_Counter>
									<xsl:value-of select="$CommunicationCounter"/>
								</Communication_Counter>
							</G524>
							<xsl:for-each select="Content[position()!=1]">
								<G524>
									<Segment_Identifier>C524</Segment_Identifier>
									<Communication_Reference>
										<xsl:value-of select="$CommunicationReference"/>
									</Communication_Reference>
									<Physical_Receiver>
										<xsl:value-of select="$PhysicalReceiver"/>
									</Physical_Receiver>
									<Logical_Receiver>
										<xsl:value-of select="$LogicalReceiver"/>
									</Logical_Receiver>
									<_1st_Current_Line_No>
										<xsl:number format="001" value="position()+1"/>
									</_1st_Current_Line_No>
									<_1st_Container_No_AWB_Rating/>
									<_1st_Marks__Numbers/>
									<_1st_Kind_of_Packing/>
									<_1st_Contents>
										<xsl:value-of select="."/>
									</_1st_Contents>
									<Logical_Sender_Address>
										<xsl:value-of select="$LogicalSenderAddress"/>
									</Logical_Sender_Address>
									<Communication_Counter>
										<xsl:value-of select="$CommunicationCounter"/>
									</Communication_Counter>
								</G524>
							</xsl:for-each>
							<!--Consolidated Consignment (LCL Sea; HAWB Air)-->
							<xsl:for-each select="PackingListHeaderLevel[../../TypeOfShipment='4']">
								<OrderInformation>
									<G652>
										<Segment_Identifier>C652</Segment_Identifier>
										<Communication_Reference>
											<xsl:value-of select="$CommunicationReference"/>
										</Communication_Reference>
										<Physical_Receiver>
											<xsl:value-of select="$PhysicalReceiver"/>
										</Physical_Receiver>
										<Logical_Receiver>
											<xsl:value-of select="$LogicalReceiver"/>
										</Logical_Receiver>
										<Identification_Code>ON</Identification_Code>
										<Identification>
											<xsl:value-of select="ReferenceDateInformation/References[TypeOfReference='ON']/Reference"/>
										</Identification>
										<Identification_Date>
											<xsl:value-of select="translate(ReferenceDateInformation[References/TypeOfReference='ON']/DateTimeInformation[TypeOfDateTime='4']/Date,'-','')"/>
										</Identification_Date>
										<Total_No_of_Packages>
											<xsl:value-of select="(NumberOfPackages)*(1)"/>
										</Total_No_of_Packages>
										<Total_Gross_Weight>
											<xsl:value-of select="round((GrossWeight/Value)*(100))"/>
										</Total_Gross_Weight>
										<Total_Chargeable_Weight>0</Total_Chargeable_Weight>
										<Total_Volume>
											<xsl:value-of select="round((Volume/Value)*(1000))"/>
										</Total_Volume>
										<Total_Order_Quantity_>0</Total_Order_Quantity_>
										<Logical_Sender_Address>
											<xsl:value-of select="$LogicalSenderAddress"/>
										</Logical_Sender_Address>
										<Communication_Counter>
											<xsl:value-of select="$CommunicationCounter"/>
										</Communication_Counter>
									</G652>
									<xsl:for-each select="PackingListItemLevel">
										<OrderItem>
											<xsl:for-each select="References">
												<G655>
													<Segment_Identifier>C655</Segment_Identifier>
													<Communication_Reference>
														<xsl:value-of select="$CommunicationReference"/>
													</Communication_Reference>
													<Physical_Receiver>
														<xsl:value-of select="$PhysicalReceiver"/>
													</Physical_Receiver>
													<Logical_Receiver>
														<xsl:value-of select="$LogicalReceiver"/>
													</Logical_Receiver>
													<_1st_Reference_Type>O</_1st_Reference_Type>
													<_1st_Address_type_code>CU</_1st_Address_type_code>
													<_1st_Reference_Code>
														<xsl:value-of select="TypeOfReference"/>
													</_1st_Reference_Code>
													<_1st_Reference>
														<xsl:value-of select="Reference"/>
													</_1st_Reference>
													<Logical_Sender_Address>
														<xsl:value-of select="$LogicalSenderAddress"/>
													</Logical_Sender_Address>
													<Communication_Counter>
														<xsl:value-of select="$CommunicationCounter"/>
													</Communication_Counter>
												</G655>
											</xsl:for-each>
											<G660>
												<Segment_Identifier>C660</Segment_Identifier>
												<Communication_Reference>
													<xsl:value-of select="$CommunicationReference"/>
												</Communication_Reference>
												<Physical_Receiver>
													<xsl:value-of select="$PhysicalReceiver"/>
												</Physical_Receiver>
												<Logical_Receiver>
													<xsl:value-of select="$LogicalReceiver"/>
												</Logical_Receiver>
												<Mode_of_Transport>
													<xsl:value-of select="concat(../../../ModeOfTransport,'0')"/>
												</Mode_of_Transport>
												<Order_quantity>
													<xsl:value-of select="(QuantityShipped/Value)*(1)"/>
												</Order_quantity>
												<Order_quantity_qualifier>
													<xsl:value-of select="QuantityShipped/MeasureUnit"/>
												</Order_quantity_qualifier>
												<Order_packages>
													<xsl:value-of select="count(CartonDetailsLevel/CartonID)"/>
												</Order_packages>
												<Order_Package_Code>
													<xsl:value-of select="../../TypeOfPackage"/>
												</Order_Package_Code>
												<xsl:if test="ItemGrossWeight/Value">
													<Total_Gross_Weight>
														<xsl:value-of select="round((ItemGrossWeight/Value)*(100))"/>
													</Total_Gross_Weight>
												</xsl:if>
												<xsl:if test="ItemVolume/Value">
													<Total_volume>
														<xsl:value-of select="round((ItemVolume/Value)*(1000))"/>
													</Total_volume>
												</xsl:if>
												<Hazardous_Goods_YN>N</Hazardous_Goods_YN>
												<Release_Hold_Flag>R</Release_Hold_Flag>
												<Place_of_Delivery>As per SOP Instructions</Place_of_Delivery>
												<Overwrite_Quantity_Variance>Y</Overwrite_Quantity_Variance>
												<Decimal_Position_Weight>2</Decimal_Position_Weight>
												<Logical_Sender_Address>
													<xsl:value-of select="$LogicalSenderAddress"/>
												</Logical_Sender_Address>
												<Communication_Counter>
													<xsl:value-of select="$CommunicationCounter"/>
												</Communication_Counter>
											</G660>
											<G529>
												<Segment_Identifier>C529</Segment_Identifier>
												<Communication_Reference>
													<xsl:value-of select="$CommunicationReference"/>
												</Communication_Reference>
												<Physical_Receiver>
													<xsl:value-of select="$PhysicalReceiver"/>
												</Physical_Receiver>
												<Logical_Receiver>
													<xsl:value-of select="$LogicalReceiver"/>
												</Logical_Receiver>
												<_1st_Address_type_code>CU</_1st_Address_type_code>
												<_1st_Reference_Code>PK</_1st_Reference_Code>
												<_1st_Reference>
													<xsl:value-of select="../ReferenceDateInformation/References[TypeOfReference='PK']/Reference"/>
												</_1st_Reference>
												<_2nd_Address_type_>CU</_2nd_Address_type_>
												<_2nd_Reference_Code>IV</_2nd_Reference_Code>
												<_2nd_Reference>
													<xsl:value-of select="../ReferenceDateInformation/References[TypeOfReference='IV']/Reference"/>
												</_2nd_Reference>
												<Logical_Sender_Address>
													<xsl:value-of select="$LogicalSenderAddress"/>
												</Logical_Sender_Address>
												<Communication_Counter>
													<xsl:value-of select="$CommunicationCounter"/>
												</Communication_Counter>
											</G529>
											<xsl:for-each select="CartonDetailsLevel">
												<PackageLevel>
													<G675>
														<Segment_Identifier>C675</Segment_Identifier>
														<Communication_Reference>
															<xsl:value-of select="$CommunicationReference"/>
														</Communication_Reference>
														<Physical_Receiver>
															<xsl:value-of select="$PhysicalReceiver"/>
														</Physical_Receiver>
														<Logical_Receiver>
															<xsl:value-of select="$LogicalReceiver"/>
														</Logical_Receiver>
														<Address_Type_Code>SU</Address_Type_Code>
														<xsl:if test="QuantityInCarton/Value">
															<Quantity>
																<xsl:value-of select="(QuantityInCarton/Value)*(1)"/>
															</Quantity>
														</xsl:if>
														<No_of_Packages>1</No_of_Packages>
														<Packages_Code>
															<xsl:value-of select="../../../TypeOfPackage"/>
														</Packages_Code>
														<xsl:if test="Length/Value">
															<Length>
																<xsl:value-of select="(Length/Value)*(1)"/>
															</Length>
														</xsl:if>
														<xsl:if test="Width/Value">
															<Width>
																<xsl:value-of select="(Width/Value)*(1)"/>
															</Width>
														</xsl:if>
														<xsl:if test="Heigth/Value">
															<Height>
																<xsl:value-of select="(Heigth/Value)*(1)"/>
															</Height>
														</xsl:if>
														<xsl:if test="NetWeightCarton/Value">
															<Gross_Weight>
																<xsl:choose>
																	<xsl:when test="CartonIdentifier='S' and TareWeightCarton/Value">
																		<xsl:value-of select="NetWeightCarton/Value+TareWeightCarton/Value"/>
																	</xsl:when>
																	<xsl:when test="CartonIdentifier='S'">
																		<xsl:value-of select="round((NetWeightCarton/Value)*(100))"/>
																	</xsl:when>
																	<xsl:when test="CartonIdentifier='M' and TareWeightCarton/Value">
																		<xsl:value-of select="round((NetWeightCarton/Value+TareWeightCarton/Value)*(100))"/>
																	</xsl:when>
																	<xsl:when test="CartonIdentifier='M'">
																		<xsl:value-of select="round((NetWeightCarton/Value)*(100))"/>
																	</xsl:when>
																</xsl:choose>
															</Gross_Weight>
														</xsl:if>
														<xsl:if test="VolumeCarton/Value">
															<Volume>
																<xsl:value-of select="round((VolumeCarton/Value)*(1000))"/>
															</Volume>
														</xsl:if>
														<_1st_Package_Identification>
															<xsl:value-of select="CartonID"/>
														</_1st_Package_Identification>
														<_1st_Flag>1</_1st_Flag>
														<_2nd_Flag>
															<xsl:value-of select="CartonIdentifier"/>
														</_2nd_Flag>
														<Quantity_Type>
															<xsl:value-of select="QuantityInCarton/MeasureUnit"/>
														</Quantity_Type>
														<Logical_Sender_Address>
															<xsl:value-of select="$LogicalSenderAddress"/>
														</Logical_Sender_Address>
														<Communication_Counter>
															<xsl:value-of select="$CommunicationCounter"/>
														</Communication_Counter>
													</G675>
												</PackageLevel>
											</xsl:for-each>
										</OrderItem>
									</xsl:for-each>
								</OrderInformation>
							</xsl:for-each>
							<!--Single Consignment (FCL Sea)-->
							<xsl:if test="../TypeOfShipment='2'">
								<ContainerCargoDetails>
									<G523>
										<Segment_Identifier>C523</Segment_Identifier>
										<Communication_Reference>
											<xsl:value-of select="$CommunicationReference"/>
										</Communication_Reference>
										<Physical_Receiver>
											<xsl:value-of select="$PhysicalReceiver"/>
										</Physical_Receiver>
										<Logical_Receiver>
											<xsl:value-of select="$LogicalReceiver"/>
										</Logical_Receiver>
										<Container_Number>
											<xsl:value-of select="ContainerNumber"/>
										</Container_Number>
										<Container_Type>
											<xsl:value-of select="ContainerType"/>
										</Container_Type>
										<Cargo_Gross_Weight>
											<xsl:choose>
												<xsl:when test="GrossWeight/Value">
													<xsl:value-of select="round((GrossWeight/Value)*(100))"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:value-of select="round((sum(PackingListHeaderLevel/GrossWeight/Value))*(100))"/>
												</xsl:otherwise>
											</xsl:choose>
										</Cargo_Gross_Weight>
										<Container_Seal_No_1>
											<xsl:value-of select="ContainerSealNumber"/>
										</Container_Seal_No_1>
										<xsl:if test="NumberOfPackages">
											<No_of_packages>
												<xsl:value-of select="(NumberOfPackages)*(1)"/>
											</No_of_packages>
										</xsl:if>
										<xsl:if test="TotalVolume/Value or PackingListHeaderLevel/Volume/Value">
											<Volume>
												<xsl:choose>
													<xsl:when test="TotalVolume/Value">
														<xsl:value-of select="round((TotalVolume/Value)*(1000))"/>
													</xsl:when>
													<xsl:otherwise>
														<xsl:value-of select="round((sum(PackingListHeaderLevel/Volume/Value))*(1000))"/>
													</xsl:otherwise>
												</xsl:choose>
											</Volume>
										</xsl:if>
										<Container_Movement_Code/>
										<Overflow>N</Overflow>
										<Logical_Sender_Address>
											<xsl:value-of select="$LogicalSenderAddress"/>
										</Logical_Sender_Address>
										<Communication_Counter>
											<xsl:value-of select="$CommunicationCounter"/>
										</Communication_Counter>
									</G523>
									<xsl:for-each select="PackingListHeaderLevel">
										<OrderInformation>
											<G652>
												<Segment_Identifier>C652</Segment_Identifier>
												<Communication_Reference>
													<xsl:value-of select="$CommunicationReference"/>
												</Communication_Reference>
												<Physical_Receiver>
													<xsl:value-of select="$PhysicalReceiver"/>
												</Physical_Receiver>
												<Logical_Receiver>
													<xsl:value-of select="$LogicalReceiver"/>
												</Logical_Receiver>
												<Identification_Code>ON</Identification_Code>
												<Identification>
													<xsl:value-of select="ReferenceDateInformation/References[TypeOfReference='ON']/Reference"/>
												</Identification>
												<Identification_Date>
													<xsl:value-of select="translate(ReferenceDateInformation[References/TypeOfReference='ON']/DateTimeInformation[TypeOfDateTime='4']/Date,'-','')"/>
												</Identification_Date>
												<Total_No_of_Packages>
													<xsl:value-of select="(NumberOfPackages)*(1)"/>
												</Total_No_of_Packages>
												<Total_Gross_Weight>
													<xsl:value-of select="round((GrossWeight/Value)*(100))"/>
												</Total_Gross_Weight>
												<Total_Chargeable_Weight>0</Total_Chargeable_Weight>
												<Total_Volume>
													<xsl:value-of select="round((Volume/Value)*(1000))"/>
												</Total_Volume>
												<Total_Order_Quantity_>0</Total_Order_Quantity_>
												<Logical_Sender_Address>
													<xsl:value-of select="$LogicalSenderAddress"/>
												</Logical_Sender_Address>
												<Communication_Counter>
													<xsl:value-of select="$CommunicationCounter"/>
												</Communication_Counter>
											</G652>
											<xsl:for-each select="PackingListItemLevel">
												<OrderItem>
													<xsl:for-each select="References">
														<G655>
															<Segment_Identifier>C655</Segment_Identifier>
															<Communication_Reference>
																<xsl:value-of select="$CommunicationReference"/>
															</Communication_Reference>
															<Physical_Receiver>
																<xsl:value-of select="$PhysicalReceiver"/>
															</Physical_Receiver>
															<Logical_Receiver>
																<xsl:value-of select="$LogicalReceiver"/>
															</Logical_Receiver>
															<_1st_Reference_Type>O</_1st_Reference_Type>
															<_1st_Address_type_code>CU</_1st_Address_type_code>
															<_1st_Reference_Code>
																<xsl:value-of select="TypeOfReference"/>
															</_1st_Reference_Code>
															<_1st_Reference>
																<xsl:value-of select="Reference"/>
															</_1st_Reference>
															<Logical_Sender_Address>
																<xsl:value-of select="$LogicalSenderAddress"/>
															</Logical_Sender_Address>
															<Communication_Counter>
																<xsl:value-of select="$CommunicationCounter"/>
															</Communication_Counter>
														</G655>
													</xsl:for-each>
													<G660>
														<Segment_Identifier>C660</Segment_Identifier>
														<Communication_Reference>
															<xsl:value-of select="$CommunicationReference"/>
														</Communication_Reference>
														<Physical_Receiver>
															<xsl:value-of select="$PhysicalReceiver"/>
														</Physical_Receiver>
														<Logical_Receiver>
															<xsl:value-of select="$LogicalReceiver"/>
														</Logical_Receiver>
														<Mode_of_Transport>
															<xsl:value-of select="../../../ModeOfTransport"/>
														</Mode_of_Transport>
														<Order_quantity>
															<xsl:value-of select="(QuantityShipped/Value)*(1)"/>
														</Order_quantity>
														<Order_quantity_qualifier>
															<xsl:value-of select="QuantityShipped/MeasureUnit"/>
														</Order_quantity_qualifier>
														<Order_packages>
															<xsl:value-of select="count(CartonDetailsLevel/CartonID)"/>
														</Order_packages>
														<Order_Package_Code>
															<xsl:value-of select="../../TypeOfPackage"/>
														</Order_Package_Code>
														<xsl:if test="ItemGrossWeight/Value">
															<Total_Gross_Weight>
																<xsl:value-of select="round((ItemGrossWeight/Value)*(100))"/>
															</Total_Gross_Weight>
														</xsl:if>
														<xsl:if test="ItemVolume/Value">
															<Total_volume>
																<xsl:value-of select="round((ItemVolume/Value)*(1000))"/>
															</Total_volume>
														</xsl:if>
														<Hazardous_Goods_YN>N</Hazardous_Goods_YN>
														<Release_Hold_Flag>R</Release_Hold_Flag>
														<Place_of_Delivery>As per SOP Instructions</Place_of_Delivery>
														<Overwrite_Quantity_Variance>Y</Overwrite_Quantity_Variance>
														<Decimal_Position_Weight>2</Decimal_Position_Weight>
														<Logical_Sender_Address>
															<xsl:value-of select="$LogicalSenderAddress"/>
														</Logical_Sender_Address>
														<Communication_Counter>
															<xsl:value-of select="$CommunicationCounter"/>
														</Communication_Counter>
													</G660>
													<G529>
														<Segment_Identifier>C529</Segment_Identifier>
														<Communication_Reference>
															<xsl:value-of select="$CommunicationReference"/>
														</Communication_Reference>
														<Physical_Receiver>
															<xsl:value-of select="$PhysicalReceiver"/>
														</Physical_Receiver>
														<Logical_Receiver>
															<xsl:value-of select="$LogicalReceiver"/>
														</Logical_Receiver>
														<_1st_Address_type_code>CU</_1st_Address_type_code>
														<_1st_Reference_Code>PK</_1st_Reference_Code>
														<_1st_Reference>
															<xsl:value-of select="../ReferenceDateInformation/References[TypeOfReference='PK']/Reference"/>
														</_1st_Reference>
														<_2nd_Address_type_>CU</_2nd_Address_type_>
														<_2nd_Reference_Code>IV</_2nd_Reference_Code>
														<_2nd_Reference>
															<xsl:value-of select="../ReferenceDateInformation/References[TypeOfReference='IV']/Reference"/>
														</_2nd_Reference>
														<Logical_Sender_Address>
															<xsl:value-of select="$LogicalSenderAddress"/>
														</Logical_Sender_Address>
														<Communication_Counter>
															<xsl:value-of select="$CommunicationCounter"/>
														</Communication_Counter>
													</G529>
													<xsl:for-each select="CartonDetailsLevel">
														<PackageLevel>
															<G675>
																<Segment_Identifier>C675</Segment_Identifier>
																<Communication_Reference>
																	<xsl:value-of select="$CommunicationReference"/>
																</Communication_Reference>
																<Physical_Receiver>
																	<xsl:value-of select="$PhysicalReceiver"/>
																</Physical_Receiver>
																<Logical_Receiver>
																	<xsl:value-of select="$LogicalReceiver"/>
																</Logical_Receiver>
																<xsl:if test="QuantityInCarton/Value">
																	<Quantity>
																		<xsl:value-of select="(QuantityInCarton/Value)*(1)"/>
																	</Quantity>
																</xsl:if>
																<No_of_Packages>1</No_of_Packages>
																<Packages_Code>
																	<xsl:value-of select="../../../TypeOfPackage"/>
																</Packages_Code>
																<xsl:if test="Length/Value">
																	<Length>
																		<xsl:value-of select="(Length/Value)*(1)"/>
																	</Length>
																</xsl:if>
																<xsl:if test="Width/Value">
																	<Width>
																		<xsl:value-of select="(Width/Value)*(1)"/>
																	</Width>
																</xsl:if>
																<xsl:if test="Heigth/Value">
																	<Height>
																		<xsl:value-of select="(Heigth/Value)*(1)"/>
																	</Height>
																</xsl:if>
																<xsl:if test="NetWeightCarton/Value">
																	<Gross_Weight>
																		<xsl:choose>
																			<xsl:when test="CartonIdentifier='S' and TareWeightCarton/Value">
																				<xsl:value-of select="NetWeightCarton/Value+TareWeightCarton/Value"/>
																			</xsl:when>
																			<xsl:when test="CartonIdentifier='S'">
																				<xsl:value-of select="round((NetWeightCarton/Value)*(100))"/>
																			</xsl:when>
																			<xsl:when test="CartonIdentifier='M' and TareWeightCarton/Value">
																				<xsl:value-of select="round((NetWeightCarton/Value+TareWeightCarton/Value)*(100))"/>
																			</xsl:when>
																			<xsl:when test="CartonIdentifier='M'">
																				<xsl:value-of select="round((NetWeightCarton/Value)*(100))"/>
																			</xsl:when>
																		</xsl:choose>
																	</Gross_Weight>
																</xsl:if>
																<xsl:if test="VolumeCarton/Value">
																	<Volume>
																		<xsl:value-of select="round((VolumeCarton/Value)*(1000))"/>
																	</Volume>
																</xsl:if>
																<_1st_Package_Identification>
																	<xsl:value-of select="CartonID"/>
																</_1st_Package_Identification>
																<_1st_Flag>1</_1st_Flag>
																<_2nd_Flag>
																	<xsl:value-of select="CartonIdentifier"/>
																</_2nd_Flag>
																<Quantity_Type>
																	<xsl:value-of select="QuantityInCarton/MeasureUnit"/>
																</Quantity_Type>
																<Logical_Sender_Address>
																	<xsl:value-of select="$LogicalSenderAddress"/>
																</Logical_Sender_Address>
																<Communication_Counter>
																	<xsl:value-of select="$CommunicationCounter"/>
																</Communication_Counter>
															</G675>
														</PackageLevel>
													</xsl:for-each>
												</OrderItem>
											</xsl:for-each>
										</OrderInformation>
									</xsl:for-each>
								</ContainerCargoDetails>
							</xsl:if>
						</ShipmentDetails>
					</xsl:for-each>
				</Message>
			</xsl:for-each>
		</SHPFIX_0210>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2003 Copyright Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="data\EPL (example file).xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="Scenario2" userelativepaths="yes" externalpreview="no" url="data\R3_000394.200510031246.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="KNEXT_ePackingList_0110.xsd" srcSchemaRoot="KNePackingList" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="SHPFIX_0210.xsd" destSchemaRoot="SHPFIX_0210" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->