<?xml version="1.0"?>

<!-- 
Id : SSV1
Description : SPOTScene volume
Version : 2.1
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dimap="http://www.spotimage.fr/Dimap">
	<xsl:template match="/">
		<HTML>
		
			<HEAD>
				<TITLE>
					<xsl:value-of select="//dimap:Dataset_Id/dimap:DATASET_NAME"/>
				</TITLE>
        <STYLE>
          html, body {height: 100%; margin: 5px;}
        </STYLE>
				<SCRIPT language="javascript">
					function detail(p) {
						window.status = p;
						document.getElementById("details").src = p;
					}
				</SCRIPT>
	
			</HEAD>
			<BODY bgcolor="#007a9d">
				<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" STYLE="page-break-inside: avoid">
					<TR>
						<TD WIDTH="300 px">
							<A>
								<xsl:attribute name="HREF">
									<xsl:value-of select="//dimap:Production/dimap:DATASET_PRODUCER_URL/@href"/>
								</xsl:attribute>
								<IMG WIDTH="120" src="LOGO.JPG" alt="Spot Image"/>
							</A>
						</TD>
						<TD VALIGN="TOP">
							<P>
								<FONT FACE="Trebuchet MS" STYLE="font-size: 12pt; font-weight: bold;">
									<xsl:value-of select="//dimap:Dataset_Id/dimap:DATASET_NAME"/>
								</FONT>
								<HR/>
								<FONT FACE="Trebuchet MS" STYLE="font-size: 10 pt">
									<STRONG>Production info :</STRONG>
									<BR/>
				      By :
				      <A>
				        <xsl:attribute name="href">
				          <xsl:value-of select="//dimap:Production/dimap:DATASET_PRODUCER_URL/@href"/>
										</xsl:attribute>
										<xsl:value-of select="//dimap:Production/dimap:DATASET_PRODUCER_NAME"/>
									</A>
									<BR/>
				      Date : <xsl:value-of select="//dimap:Production/dimap:DATASET_PRODUCTION_DATE"/>
									<BR/>
								</FONT>
							</P>
						</TD>
					</TR>
				</TABLE>
				<HR/>
				<TABLE style="height: 99%; width: 100%;">
					<TR>
						<TD WIDTH="20%" VALIGN="TOP">
							<TABLE>
								<xsl:for-each select="//dimap:Component">
									<TR>
										<TD rowspan="3">
											<xsl:value-of select="position()"/>
											<xsl:if test="dimap:COMPONENT_TN_PATH">
												<xsl:if test="dimap:COMPONENT_TYPE[. = 'DIMAP']">
													<A>
														<xsl:attribute name="href">javascript:detail("<xsl:value-of select="dimap:COMPONENT_PATH/@href"/>")</xsl:attribute>
														<IMG WIDTH="80" ALT="Click to display additional information">
															<xsl:attribute name="src">
																<xsl:value-of select="dimap:COMPONENT_TN_PATH/@href"/>
															</xsl:attribute>
														</IMG>
													</A>
												</xsl:if>
												<xsl:if test="dimap:COMPONENT_TYPE[. !='DIMAP']">
													<A target="_blank">
														<xsl:attribute name="href">
															<xsl:value-of select="dimap:COMPONENT_PATH/@href"/>
														</xsl:attribute>
														<IMG WIDTH="92">
															<xsl:attribute name="src">
																<xsl:value-of select="dimap:COMPONENT_TN_PATH/@href"/>
															</xsl:attribute>
														</IMG>
													</A>
												</xsl:if>
											</xsl:if>
										</TD>
										<TD>
											<font size="2">
												<xsl:if test="dimap:COMPONENT_TYPE[. = 'DIMAP']">
													<A>
														<xsl:attribute name="href">javascript:detail("<xsl:value-of select="dimap:COMPONENT_PATH/@href"/>")</xsl:attribute>
														<font face="Trebuchet MS" size="2">
															<xsl:value-of select="dimap:COMPONENT_TITLE"/>
														</font>
													</A>
												</xsl:if>
												<xsl:if test="dimap:COMPONENT_TYPE[. !='DIMAP']">
													<A target="_blank">
														<xsl:attribute name="href">
															<xsl:value-of select="dimap:COMPONENT_PATH/@href"/>
														</xsl:attribute>
														<font face="Trebuchet MS" size="2">
															<xsl:value-of select="dimap:COMPONENT_TITLE"/>
														</font>
													</A>
												</xsl:if>
											</font>
										</TD>
									</TR>
									<TR>
										<TD>
											<font size="2">
												<xsl:value-of select="dimap:COMPONENT_CONTENT"/>
											</font>
										</TD>
									</TR>
									<TR>
										<TD>
											<font face="Trebuchet MS" size="1"> (<xsl:value-of select="dimap:COMPONENT_TYPE"/>)</font>
										</TD>
									</TR>
									<TD colspan="2">
										<HR/>
									</TD>
								</xsl:for-each>
							</TABLE>
						</TD>
						<TD WIDTH="80%" HEIGHT="100%" VALIGN="TOP">
							<IFRAME WIDTH="100%" HEIGHT="100%" ID="details"/>
						</TD>
					</TR>
				</TABLE>
			</BODY>
		</HTML>
	</xsl:template>
</xsl:stylesheet>
