Files

1423 lines
46 KiB
XML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0"?>
<xsl:stylesheet
version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:n1="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2">
<xsl:output method="html" />
<xsl:template name="Orario">
<xsl:param name="time" />
<xsl:if test="$time != ''">
<xsl:variable name="hh" select="substring($time,1,2)" />
<xsl:variable name="mm" select="substring($time,4,2)" />
<xsl:variable name="ss" select="substring($time,7,2)" />
<xsl:value-of select="' '" />
<xsl:value-of select="$hh" />
<xsl:value-of select="':'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="':'" />
<xsl:value-of select="$ss" />
</xsl:if>
</xsl:template>
<xsl:template name="indirizzo">
<xsl:param name="nodes"/>
<xsl:if test="cbc:ID">
<li>
Identificativo indirizzo
<span>
<xsl:value-of select="cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:StreetName">
<li>
Via
<span>
<xsl:value-of select="cbc:StreetName" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:AdditionalStreetName">
<li>
Informazioni aggiuntive
<span>
<xsl:value-of select="cbc:AdditionalStreetName" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:CityName">
<li>
Comune
<span>
<xsl:value-of select="cbc:CityName" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:PostalZone">
<li>
CAP
<span>
<xsl:value-of select="cbc:PostalZone" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:CountrySubentity">
<li>
Provincia
<span>
<xsl:value-of select="cbc:CountrySubentity" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Country/cbc:IdentificationCode">
<li>
Nazione
<span>
<xsl:value-of select="cac:Country/cbc:IdentificationCode" />
</span>
</li>
</xsl:if>
</xsl:template>
<xsl:template name="contatto">
<xsl:param name="nodes"/>
<xsl:if test="$nodes/cbc:Name">
<li>
Nome:
<span>
<xsl:value-of select="$nodes/cbc:Name" />
</span>
</li>
</xsl:if>
<xsl:if test="$nodes/cbc:Telephone">
<li>
Telefono:
<span>
<xsl:value-of select="$nodes/cbc:Telephone" />
</span>
</li>
</xsl:if>
<xsl:if test="$nodes/cbc:Telefax">
<li>
Fax:
<span>
<xsl:value-of select="$nodes/cbc:Telefax" />
</span>
</li>
</xsl:if>
<xsl:if test="$nodes/cbc:ElectronicMail">
<li>
E-mail:
<span>
<xsl:value-of select="$nodes/cbc:ElectronicMail" />
</span>
</li>
</xsl:if>
</xsl:template>
<xsl:template name="temperatura">
<xsl:param name="nodes"/>
<xsl:if test="$nodes/cbc:AttributeID">
<li>
Qualificatore temperatura:
<span>
<xsl:value-of select="$nodes/cbc:AttributeID" />
</span>
</li>
</xsl:if>
<xsl:if test="$nodes/cbc:Measure">
<li>
Temperatura di settaggio:
<span>
<xsl:value-of select="$nodes/cbc:Measure" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="$nodes/cbc:Measure/@unitCode" />
</span>
</li>
</xsl:if>
</xsl:template>
<xsl:template name="FormatDate">
<xsl:param name="DateTime" />
<xsl:variable name="year" select="substring($DateTime,1,4)" />
<xsl:variable name="month" select="substring($DateTime,6,2)" />
<xsl:variable name="day" select="substring($DateTime,9,2)" />
<xsl:value-of select="' ('" />
<xsl:value-of select="$day" />
<xsl:value-of select="' '" />
<xsl:choose>
<xsl:when test="$month = '1' or $month = '01'">
Gennaio
</xsl:when>
<xsl:when test="$month = '2' or $month = '02'">
Febbraio
</xsl:when>
<xsl:when test="$month = '3' or $month = '03'">
Marzo
</xsl:when>
<xsl:when test="$month = '4' or $month = '04'">
Aprile
</xsl:when>
<xsl:when test="$month = '5' or $month = '05'">
Maggio
</xsl:when>
<xsl:when test="$month = '6' or $month = '06'">
Giugno
</xsl:when>
<xsl:when test="$month = '7' or $month = '07'">
Luglio
</xsl:when>
<xsl:when test="$month = '8' or $month = '08'">
Agosto
</xsl:when>
<xsl:when test="$month = '9' or $month = '09'">
Settembre
</xsl:when>
<xsl:when test="$month = '10'">
Ottobre
</xsl:when>
<xsl:when test="$month = '11'">
Novembre
</xsl:when>
<xsl:when test="$month = '12'">
Dicembre
</xsl:when>
<xsl:otherwise>
Mese non riconosciuto
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="' '" />
<xsl:value-of select="$year" />
<xsl:variable name="time" select="substring($DateTime,12)" />
<xsl:if test="$time != ''">
<xsl:variable name="hh" select="substring($time,1,2)" />
<xsl:variable name="mm" select="substring($time,4,2)" />
<xsl:variable name="ss" select="substring($time,7,2)" />
<xsl:value-of select="' '" />
<xsl:value-of select="$hh" />
<xsl:value-of select="':'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="':'" />
<xsl:value-of select="$ss" />
</xsl:if>
<xsl:value-of select="')'" />
</xsl:template>
<xsl:template match="/">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<style type="text/css">
#ddt-container { width: 100%; position: relative; }
#ddt-elettronica { font-family: sans-serif; margin-left: auto; margin-right: auto; max-width: 1280px; min-width: 930px; padding: 0; }
#ddt-elettronica .versione { font-size: 11px; float:right; color: #777777; }
#ddt-elettronica h1 { padding: 20px 0 0 0; margin: 0; font-size: 30px; }
#ddt-elettronica h2 { padding: 20px 0 0 0; margin: 0; font-size: 20px; }
#ddt-elettronica h3 { padding: 20px 0 0 0; margin: 0; font-size: 25px; }
#ddt-elettronica h4 { padding: 20px 0 0 0; margin: 0; font-size: 20px; }
#ddt-elettronica h5 { padding: 15px 0 0 0; margin: 0;
font-size: 17px; font-style: italic; }
#ddt-elettronica ul { list-style-type: none; margin: 0 !important; padding: 15px 0 0 40px !important; }
#ddt-elettronica ul li {}
#ddt-elettronica ul li span { font-weight: bold; }
#ddt-elettronica div { padding: 0; margin: 0; }
#ddt-elettronica
div.page {
background-color: #fff !important;
position: relative;
margin: 20px 0
50px 0;
padding: 60px;
background: -moz-linear-gradient(0% 0 360deg, #FFFFFF, #F2F2F2 20%, #FFFFFF) repeat scroll 0 0 transparent;
border: 1px solid #CCCCCC;
-webkitbox-shadow: 0 0 10px rgba(0, 0, 0,
0.3);
-mozbox-shadow: 0
0 10px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
background: url('logo_sdi_trasparente.jpg') 98% 50px no-repeat;
}
#ddt-elettronica div.footer { padding: 50px 0 0 0; margin: 0; font-size: 11px; text-align: center; color: #777777; }
</style>
</head>
<body>
<div id="ddt-container">
<!--INIZIO DATI HEADER-->
<xsl:if test="n1:DespatchAdvice">
<div id="ddt-elettronica">
<h1>AVVISO DI SPEDIZIONE</h1>
<!--INIZIO DATI GENERALI-->
<div id="dati-generali">
<!--INIZIO DATI GENERALI DOCUMENTO-->
<div id="dati-generali-documento">
<h3>Dati generali del documento</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cbc:ID">
<li>
Numero DDT:
<span>
<xsl:value-of select="n1:DespatchAdvice/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cbc:IssueDate">
<li>
Data DDT:
<span>
<xsl:value-of select="n1:DespatchAdvice/cbc:IssueDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="n1:DespatchAdvice/cbc:IssueDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cbc:IssueTime">
<li>
Orario
<span>
<xsl:value-of select="n1:DespatchAdvice/cbc:IssueTime" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cbc:Note">
<li>
Note
<span>
<xsl:value-of select="n1:DespatchAdvice/cbc:Note" />
</span>
</li>
</xsl:if>
</ul>
</div>
</div>
<!--FINE DATI GENERALI DOCUMENTO-->
<!--INIZIO DATI DELL'ORDINE-->
<xsl:if test="n1:DespatchAdvice/cac:OrderReference">
<div id="dati-ordine-acquisto">
<h3>Dati dell'ordine di riferimento</h3>
<xsl:for-each select="n1:DespatchAdvice/cac:OrderReference">
<ul>
<xsl:if test="cbc:ID">
<li>
Identificativo ordine:
<span>
<xsl:value-of select="cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:IssueDate">
<li>
Data ordine:
<span>
<xsl:value-of select="cbc:IssueDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cbc:IssueDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cbc:OrderTypeCode">
<li>
Tipo ordine:
<span>
<xsl:value-of select="cbc:OrderTypeCode" />
</span>
</li>
</xsl:if>
</ul>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DELL'ORDINE DI VENDITA-->
<!--INIZIO DATI DOCUMENTI AGGIUNTIVI -->
<xsl:if test="n1:DespatchAdvice/cac:AdditionalDocumentReference">
<div id="dati-documenti-aggiuntivi">
<h3>Dati documenti aggiuntivi di riferimento</h3>
<xsl:for-each select="n1:DespatchAdvice/cac:AdditionalDocumentReference">
<ul>
<xsl:if test="cbc:ID">
<li>
Identificativo documento:
<span>
<xsl:value-of select="cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:IssueDate">
<li>
Data documento:
<span>
<xsl:value-of select="cbc:IssueDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cbc:IssueDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cbc:DocumentType">
<li>
Tipo documento:
<span>
<xsl:value-of select="cbc:DocumentType" />
</span>
</li>
</xsl:if>
</ul>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DOCUMENTI AGGIUNTIVI -->
<!--INIZIO DATI SPEDITORE. -->
<xsl:if test="n1:DespatchAdvice/cac:DespatchSupplierParty">
<div id="dati-speditore">
<h3>Dati relativi allo speditore</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:DespatchSupplierParty/cac:Party/cbc:EndpointID">
<li>
Indirizzo elettronico
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:DespatchSupplierParty/cac:Party/cbc:EndpointID" />
</span>
</li>
</xsl:if>
<xsl:for-each select="n1:DespatchAdvice/cac:DespatchSupplierParty/cac:Party">
<xsl:if test="cac:PartyIdentification/cbc:ID">
<li>
CF PI speditore:
<span>
<xsl:value-of select="cac:PartyIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:PartyName/cbc:Name">
<li>
Azienda speditore:
<span>
<xsl:value-of select="cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Contact">
<div id="dati-contatto-speditore">
<h4>Contatto persona di riferimento</h4>
<ul>
<xsl:call-template name="contatto">
<xsl:with-param name="nodes" select="cac:Contact" />
</xsl:call-template>
</ul>
</div>
</xsl:if>
</xsl:for-each>
</ul>
</div>
</xsl:if>
<!--FINE DATI SPEDITORE-->
<!--INIZIO DATI DESTINATARIO-->
<xsl:if test="n1:DespatchAdvice/cac:DeliveryCustomerParty">
<div id="dati-speditore">
<h3>Dati relativi al destinatario</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cbc:EndpointID">
<li>
Codice IPA
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cbc:EndpointID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID">
<li>
CF PI consegnatario
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PartyName/cbc:Name">
<li>
Azienda consegnatario
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
<xsl:for-each select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PostalAddress">
<div id="dati-Indirizzo-consegnatario">
<h4>Indirizzo postale consegnatario</h4>
<ul>
<xsl:call-template name="indirizzo">
<xsl:with-param name="nodes" select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party/cac:PostalAddress" />
</xsl:call-template>
</ul>
</div>
</xsl:for-each>
<xsl:if test="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:DeliveryContact">
<xsl:for-each select="n1:DespatchAdvice/cac:DeliveryCustomerParty/cac:DeliveryContact">
<div id="dati-contatto-consegnatario">
<h4>Contatto persona di riferimento</h4>
<ul>
<xsl:call-template name="contatto">
<xsl:with-param name="nodes" select="." />
</xsl:call-template>
</ul>
</div>
</xsl:for-each>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI DESTINATARIO-->
<!--INIZIO DATI ACQUIRENTE-->
<xsl:if test="n1:DespatchAdvice/cac:BuyerCustomerParty">
<div id="dati-acquirente">
<h3>Dati relativi all' acquirente</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:BuyerCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID">
<li>
CF PI Acquirente
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:BuyerCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name">
<li>
Nome Azienda
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:BuyerCustomerParty/cac:Party/cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI ACQUIRENTE-->
<!--INIZIO DATI VENDITORE-->
<xsl:if test="n1:DespatchAdvice/cac:SellerSupplierParty">
<div id="dati-venditore">
<h3>Dati relativi al venditore</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID">
<li>
CF PI Venditore
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name">
<li>
Nome Azienda
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:Contact">
<xsl:for-each select="n1:DespatchAdvice/cac:SellerSupplierParty/cac:Party/cac:Contact">
<div id="dati-contatto-venditore">
<h4>Contatto persona di riferimento</h4>
<ul>
<xsl:call-template name="contatto">
<xsl:with-param name="nodes" select="." />
</xsl:call-template>
</ul>
</div>
</xsl:for-each>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI VENDITORE-->
<!--INIZIO DATI COMMITTENTE-->
<xsl:if test="n1:DespatchAdvice/cac:OriginatorCustomerParty">
<div id="dati-committente">
<h3>Dati relativi al committente</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:OriginatorCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID">
<li>
CF PI committente
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:OriginatorCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:OriginatorCustomerParty/cac:Party/cac:PartyName/cbc:Name">
<li>
Nome Azienda
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:OriginatorCustomerParty/cac:Party/cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI COMMITTENTE-->
<!--INIZIO DATI SPEDIZIONE-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment">
<div id="dati-spedizione">
<h3>Dati relativi alla spedizione</h3>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cbc:ID">
<li>
Riferimento spedizione
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cbc:Information">
<li>
Descrizione spedizione
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:Information" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cbc:GrossWeightMeasure">
<li>
Peso lordo
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:GrossWeightMeasure" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:GrossWeightMeasure/@unitCode" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cbc:GrossVolumeMeasure">
<li>
Volume
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:GrossVolumeMeasure" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:GrossVolumeMeasure/@unitCode" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cbc:TotalTransportHandlingUnitQuantity">
<li>
Numero totale colli
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cbc:TotalTransportHandlingUnitQuantity" />
</span>
</li>
</xsl:if>
<!--INIZIO DATI TRASPORTO-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment">
<div id="dati-trasporto">
<h4>Dati relativi al trasporto</h4>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cbc:ID">
<li>
Identificativo trasporto
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cbc:Information">
<li>
Descrizione del veicolo
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cbc:Information" />
</span>
</li>
</xsl:if>
<!--INIZIO DATI VETTORE-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty">
<div id="dati-vettore">
<h4>Dati relativi al vettore</h4>
<ul>
<!--Reagione sociale del vettore. Opzionale. Se usato inserire informazione-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:PartyName/cbc:Name">
<li>
Ragione sociale del vettore
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:PartyName/cbc:Name" />
</span>
</li>
</xsl:if>
<!--INIZIO DATI AUTISTA-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:Person/cac:IdentityDocumentReference">
<div id="dati-autista">
<h5>Dati relativi all'autista</h5>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:Person/cac:IdentityDocumentReference/cbc:ID">
<li>
Numero documento
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:Person/cac:IdentityDocumentReference/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:Person/cac:IdentityDocumentReference/cbc:DocumentType">
<li>
Tipo documento
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Consignment/cac:CarrierParty/cac:Person/cac:IdentityDocumentReference/cbc:DocumentType" />
</span>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI AUTISTA-->
</ul>
</div>
</xsl:if>
<!--FINE DATI VETTORE-->
</ul>
</div>
</xsl:if>
<!--FINE DATI TRASPORTO-->
<!--INIZIO DATI CONSEGNA-->
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery">
<div id="dati-trasporto">
<h4>Dati relativi alla consegna della merce</h4>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cbc:TrackingID">
<li>
Riferimento consegna
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cbc:TrackingID" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod">
<div id="dati-trasporto-stimato">
<h5>Dati stimati di trasporto</h5>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:StartDate">
<li>
Data inizio trasporto
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:StartDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:StartDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:StartTime">
<li>
Ora inizio trasporto
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:StartTime" />
</span>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:EndDate">
<li>
Data fine trasporto
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:EndDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:EndDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:EndTime">
<li>
Ora fine trasporto
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:EstimatedDeliveryPeriod/cbc:EndTime" />
</span>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch">
<div id="dati-effettiva-consegna">
<h5>Dati di effettiva evasione spedizione </h5>
<ul>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cbc:ActualDespatchDate">
<li>
Data
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cbc:ActualDespatchDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cbc:ActualDespatchDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cbc:ActualDespatchTime">
<li>
Ora
<span>
<xsl:value-of select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cbc:ActualDespatchTime" />
</span>
</li>
</xsl:if>
<xsl:for-each select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cac:DespatchAddress">
<div id="dati-Indirizzo-effettiva-consegna">
<h5>Indirizzo</h5>
<ul>
<xsl:call-template name="indirizzo">
<xsl:with-param name="nodes" select="n1:DespatchAdvice/cac:Shipment/cac:Delivery/cac:Despatch/cac:DespatchAddress" />
</xsl:call-template>
</ul>
</div>
</xsl:for-each>
</ul>
</div>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE DATI CONSEGNA-->
</ul>
</div>
</xsl:if>
<!--FINE DATI SPEDIZIONE-->
<!--INIZIO DATI DI DETTAGLIO DELLE LINEE-->
<xsl:if test="n1:DespatchAdvice/cac:DespatchLine">
<div id="dati-dettaglio-linee">
<div id="righe">
<h3>Dati relativi alle linee di dettaglio della spedizione</h3>
<xsl:for-each select="n1:DespatchAdvice/cac:DespatchLine">
<h5>
Nr. linea:
<span>
<xsl:value-of select="cbc:ID" />
</span>
</h5>
<ul>
<xsl:if test="cbc:Note">
<li>
Note:
<span>
<xsl:value-of select="cbc:Note" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:DeliveredQuantity">
<li>
Quantità consegnata:
<span>
<xsl:value-of select="cbc:DeliveredQuantity" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="cbc:DeliveredQuantity/@unitCode" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:OutstandingQuantity">
<li>
Quantità inevasa:
<span>
<xsl:value-of select="cbc:OutstandingQuantity" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="cbc:OutstandingQuantity/@unitCode" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:OutstandingReason">
<li>
Motivo per la quantità inevasa:
<span>
<xsl:value-of select="cbc:OutstandingReason" />
</span>
</li>
</xsl:if>
<!--INIZIO DATI DELL'ORDINE DELLA LINEA-->
<xsl:if test="cac:OrderLineReference">
<div id="dati-riferimenti-ordine-della-linea">
<h4>Riferimenti all'ordine</h4>
<xsl:for-each select="cac:OrderLineReference">
<ul>
<xsl:if test="cbc:LineID">
<li>
riga ordine:
<span>
<xsl:value-of select="cbc:LineID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:OrderReference/cbc:ID">
<li>
Identificativo ordine:
<span>
<xsl:value-of select="cac:OrderReference/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:OrderReference/cbc:IssueDate">
<li>
Data ordine:
<span>
<xsl:value-of select="cac:OrderReference/cbc:IssueDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cac:OrderReference/cbc:IssueDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cac:OrderReference/cbc:OrderTypeCode">
<li>
Tipo ordine:
<span>
<xsl:value-of select="cac:OrderReference/cbc:OrderTypeCode" />
</span>
</li>
</xsl:if>
</ul>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DELL'ORDINE DELLA LINEA-->
<!--INIZIO DATI documento DELLA LINEA-->
<xsl:if test="cac:DocumentReference">
<div id="dati-riferimenti-documenti-della-linea">
<h4>Altri documenti di riferimento</h4>
<xsl:for-each select="cac:DocumentReference">
<ul>
<xsl:if test="cbc:ID">
<li>
Identificativo documento:
<span>
<xsl:value-of select="cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:IssueDate">
<li>
Data emissione documento:
<span>
<xsl:value-of select="cbc:IssueDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cbc:IssueDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cbc:DocumentType">
<li>
Tipo documento:
<span>
<xsl:value-of select="cbc:DocumentType" />
</span>
</li>
</xsl:if>
</ul>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI documento DELLA LINEA-->
<!--INIZIO Riferimenti articolo su riga.-->
<xsl:if test="cac:Item">
<h4>Riferimenti articolo della riga</h4>
<ul>
<!--Descrizione prodotto -->
<xsl:if test="cac:Item/cbc:Name">
<li>
Descrizione prodotto:
<span>
<xsl:value-of select="cac:Item/cbc:Name" />
</span>
</li>
</xsl:if>
<!--Informazioni aggiuntive del prodotto -->
<xsl:for-each select="cac:Item/cbc:AdditionalInformation">
<li>
Informazioni aggiuntive:
<span>
<xsl:value-of select="." />
</span>
</li>
</xsl:for-each>
<!--Codice prodotto. Identificatore dellarticolo secondo il Venditore-->
<xsl:if test="cac:Item/cac:SellersItemIdentification/cbc:ID">
<li>
Codice prodotto del Venditore:
<span>
<xsl:value-of select="cac:Item/cac:SellersItemIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<!--Codice prodotto. Identificatore dellarticolo secondo il Venditore esteso-->
<xsl:if test="cac:Item/cac:SellersItemIdentification/cbc:ExtendedID">
<li>
Codice esteso del prodotto del Venditore:
<span>
<xsl:value-of select="cac:Item/cac:SellersItemIdentification/cbc:ExtendedID" />
</span>
</li>
</xsl:if>
<!--Codice standard del prodotto. Identificatore standard dellarticolo-->
<xsl:if test="cac:Item/cac:StandardItemIdentification/cbc:ID">
<li>
Codice standard del prodotto:
<span>
<xsl:value-of select="cac:Item/cac:StandardItemIdentification/cbc:ID" />
</span>
</li>
</xsl:if>
<!--Codice standar esteso del prodotto. Identificatore standard esteso dellarticolo-->
<xsl:if test="cac:Item/cac:StandardItemIdentification/cbc:ExtendedID">
<li>
Codice standard esteso del prodotto:
<span>
<xsl:value-of select="cac:Item/cac:StandardItemIdentification/cbc:ExtendedID" />
</span>
</li>
</xsl:if>
<!--INIZIO Codifiche degli articoli pericolosi -->
<xsl:if test="cac:Item/cac:HazardousItem">
<div id="dati-percolosita-articolo">
<h5>Codifiche degli articoli pericolosi</h5>
<ul>
<xsl:if test="cac:Item/cac:HazardousItem/cbc:ID">
<li>
Codice prodotto pericoloso:
<span>
<xsl:value-of select="cac:Item/cac:HazardousItem/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Item/cac:HazardousItem/cbc:UNDGCode">
<li>
Codice UNDG:
<span>
<xsl:value-of select="cac:Item/cac:HazardousItem/cbc:UNDGCode" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Item/cac:HazardousItem/cbc:TechnicalName">
<li>
Denominazione tecnica:
<span>
<xsl:value-of select="cac:Item/cac:HazardousItem/cbc:TechnicalName" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Item/cac:HazardousItem/cbc:CategoryName">
<li>
Categoria sostanza pericolosa:
<span>
<xsl:value-of select="cac:Item/cac:HazardousItem/cbc:CategoryName" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Item/cac:HazardousItem/cbc:HazardClassID">
<li>
Identificativo classe di pericolosità:
<span>
<xsl:value-of select="cac:Item/cac:HazardousItem/cbc:HazardClassID" />
</span>
</li>
</xsl:if>
</ul>
</div>
</xsl:if>
<!--FINE Codifiche degli articoli pericolosi -->
<!--INIZIO Informazioni specifici dell'articolo-->
<xsl:if test="cac:Item/cac:ItemInstance">
<h4>Istanza specifica dellArticolo</h4>
<ul>
<xsl:for-each select="cac:Item/cac:ItemInstance">
<xsl:if test="cbc:ManufactureDate">
<li>
Data di produzione:
<span>
<xsl:value-of select="cbc:ManufactureDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cbc:ManufactureDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cbc:BestBeforeDate">
<li>
Data di scadenza:
<span>
<xsl:value-of select="cbc:BestBeforeDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cbc:BestBeforeDate" />
</xsl:call-template>
</li>
</xsl:if>
<xsl:if test="cbc:SerialID">
<li>
Numero di serie:
<span>
<xsl:value-of select="cbc:SerialID" />
</span>
</li>
</xsl:if>
<!--INIZIO Lotto della merce-->
<xsl:if test="cac:LotIdentification">
<h5>Riferimenti lotto</h5>
<ul>
<xsl:if test="cac:LotIdentification/cbc:LotNumberID">
<li>
Numero:
<span>
<xsl:value-of select="cac:LotIdentification/cbc:LotNumberID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:LotIdentification/cbc:ExpiryDate">
<li>
Data scadenza:
<span>
<xsl:value-of select="cac:LotIdentification/cbc:ExpiryDate" />
</span>
<xsl:call-template name="FormatDate">
<xsl:with-param name="DateTime" select="cac:LotIdentification/cbc:ExpiryDate" />
</xsl:call-template>
</li>
</xsl:if>
</ul>
</xsl:if>
<!--FINE Lotto della merce-->
</xsl:for-each>
</ul>
</xsl:if>
<!--FINE Informazioni specifici dell'articolo-->
</ul>
</xsl:if>
<!--FINE Riferimenti articolo su riga.-->
<!--INIZIO DATI SPEDIZIONE DELLA IGA-->
<xsl:if test="cac:Shipment">
<div id="dati-spedizione-riga">
<h4>Dati di spedizione specifici della riga</h4>
<ul>
<xsl:if test="cac:Shipment/cbc:ID">
<li>
ID Spedizione:
<span>
<xsl:value-of select="cac:Shipment/cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cac:Shipment/cbc:HandlingCode">
<li>
Codice trattamento:
<span>
<xsl:value-of select="cac:Shipment/cbc:HandlingCode" />
</span>
</li>
</xsl:if>
<!--INIZIO Informazioni temperature della riga-->
<xsl:if test="cac:Shipment/cac:GoodsItem">
<h4>Dati sulle temperature dell'articolo</h4>
<ul>
<xsl:for-each select="cac:Shipment/cac:GoodsItem">
<xsl:if test="cac:Temperature">
<h5>Temperatura</h5>
<ul>
<xsl:call-template name="temperatura">
<xsl:with-param name="nodes" select="cac:Temperature" />
</xsl:call-template>
</ul>
</xsl:if>
<xsl:if test="cac:MinimumTemperature">
<h5>Temperatura minima</h5>
<ul>
<xsl:call-template name="temperatura">
<xsl:with-param name="nodes" select="cac:MinimumTemperature" />
</xsl:call-template>
</ul>
</xsl:if>
<xsl:if test="cac:MaximumTemperature">
<h5>Temperatura massima</h5>
<ul>
<xsl:call-template name="temperatura">
<xsl:with-param name="nodes" select="cac:MaximumTemperature" />
</xsl:call-template>
</ul>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
<!--FINE Informazioni temperature della riga-->
<!--INIZIO DATI UNITA' LOGISTICA DELLA RIGA-->
<xsl:if test="cac:Shipment/cac:TransportHandlingUnit">
<h4>Dati Unità Logistica di trasporto</h4>
<ul>
<xsl:for-each select="cac:Shipment/cac:TransportHandlingUnit">
<xsl:if test="cbc:ID">
<li>
Identificativo unità logistica:
<span>
<xsl:value-of select="cbc:ID" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:TransportHandlingUnitTypeCode">
<li>
Tipo unità logistica:
<span>
<xsl:value-of select="cbc:TransportHandlingUnitTypeCode" />
</span>
</li>
</xsl:if>
<xsl:if test="cbc:HazardousRiskIndicator">
<li>
Indicatore di pericolosità:
<span>
<xsl:if test="cbc:HazardousRiskIndicator='true'">
SI
</xsl:if>
<xsl:if test="cbc:HazardousRiskIndicator='false'">
NO
<xsl:value-of select="NO" />
</xsl:if>
</span>
</li>
</xsl:if>
<xsl:if test="cbc:ShippingMarks">
<li>
Marca:
<span>
<xsl:value-of select="cbc:ShippingMarks" />
</span>
</li>
</xsl:if>
<!--INIZIO DATI DIMENSIONI UNITA' LOGISTICA DELLA RIGA-->
<xsl:if test="cac:MeasurementDimension">
<h5>Dati Dimensioni Unità Logistica di trasporto</h5>
<ul>
<xsl:for-each select="cac:MeasurementDimension">
<xsl:if test="cbc:AttributeID">
<li>
Tipo dimensione
<span>
<xsl:variable name="dimensione" select="cbc:AttributeID" />
<xsl:choose>
<xsl:when test="$dimensione = 'AAB'">
Peso lordo
</xsl:when>
<xsl:when test="$dimensione = 'AAW'">
Volume lordo
</xsl:when>
<xsl:otherwise>
dimensione non riconosciuta
</xsl:otherwise>
</xsl:choose>
</span>
</li>
</xsl:if>
<xsl:if test="cbc:Measure">
<li>
Misura:
<span>
<xsl:value-of select="cbc:Measure" />
</span>
</li>
<li>
Unità di misura:
<span>
<xsl:value-of select="cbc:Measure/@unitCode" />
</span>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
<!--FINE DATI DIMENSIONI UNITA' LOGISTICA DELLA RIGA-->
</xsl:for-each>
</ul>
</xsl:if>
<!--FINE DATI UNITA' LOGISTICA DELLA RIGA-->
</ul>
</div>
</xsl:if>
<!--FINE DATI SPEDIZIONE DELLA IGA-->
</ul>
</xsl:for-each>
</div>
</div>
</xsl:if>
<!--FINE DATI DI DETTAGLIO DELLE LINEE-->
</div>
</xsl:if>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>