Index: /projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation_2011_02_07.xsl
===================================================================
--- /projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation_2011_02_07.xsl (revision 204)
+++ /projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation_2011_02_07.xsl (revision 210)
@@ -22,5 +22,5 @@
 										<td width="45%" align="left" class="ReportHeader">Summary report Wellbore: <xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
 										</td>
-										<td width="55%" align="right" class="ReportHeader">End time: <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
+										<td width="55%" align="right" class="ReportHeader">End time: <xsl:value-of select="concat(substring-before(substring(witsml:dTimEnd, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimEnd, 0,17), 'T'))"/>
 										</td>
 									</tr>
@@ -50,5 +50,6 @@
 										</td>
 										<td colspan="2">
-											<xsl:value-of select="substring(witsml:dTimStart, 0,17)"/> - <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
+											<xsl:value-of select="concat(substring-before(substring(witsml:dTimStart, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimStart, 0,17), 'T'))"/> - 
+											<xsl:value-of select="concat(substring-before(substring(witsml:dTimEnd, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimEnd, 0,17), 'T'))"/>
 										</td>
 									</tr>
@@ -89,5 +90,5 @@
 										</td>
 										<td colspan="3">
-											<xsl:value-of select="substring(witsml:createDate, 0,20)"/>
+											<xsl:value-of select="concat(substring-before(substring(witsml:createDate, 0,17), 'T'), ' ', substring-after(substring(witsml:createDate, 0,17), 'T'))"/>
 										</td>
 									</tr>
@@ -184,9 +185,9 @@
 												<a href="{$url_md}" target="_blank">Depth mMD</a>
 											</td>
-											<td width="120" valign="top">
-												<a href="{$url_proprietaryCode}" target="_blank">Main Oper Class</a>
-											</td>
-											<td width="80" valign="top">
-												<a href="{$url_state}" target="_blank">Main Oper Eval Class</a>
+											<td width="120" valign="top" align="center">
+												<a href="{$url_proprietaryCode}" target="_blank">Main - Sub Activity</a>
+											</td>
+											<td width="80" valign="top" align="center">
+												<a href="{$url_state}" target="_blank">State</a>
 											</td>
 											<td valign="top" align="left">
@@ -213,8 +214,8 @@
 													<xsl:value-of select="witsml:md"/>
 												</td>
-												<td valign="top">
+												<td valign="top" align="center">
 													<xsl:value-of select="witsml:proprietaryCode"/>
 												</td>
-												<td valign="top">
+												<td valign="top" align="center">
 													<xsl:value-of select="witsml:state"/>
 												</td>
@@ -295,5 +296,5 @@
 											</table>
 										</td>-->
-											<td width="100" valign="top">
+											<td width="100" valign="top" align="center">
 												<a href="{$url_dTimRepair}" target="_blank">Equipment Repaired</a>
 											</td>
@@ -305,5 +306,5 @@
 											<tr class="light">
 												<td valign="top">
-													<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
+													<xsl:value-of select="concat(substring-before(substring(witsml:dTim, 0,17), 'T'), ' ', substring-after(substring(witsml:dTim, 0,17), 'T'))"/>
 												</td>
 												<td valign="top">
@@ -319,6 +320,6 @@
 													<xsl:value-of select="witsml:eTimMissProduction"/>
 												</td>
-												<td valign="top">
-													<xsl:value-of select="substring(witsml:dTimRepair, 0 ,17)"/>
+												<td valign="top" align="center">
+													<xsl:value-of select="concat(substring-before(substring(witsml:dTimRepair, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimRepair, 0,17), 'T'))"/>
 												</td>
 												<td valign="top" align="left">
@@ -623,43 +624,43 @@
 													<a target="_blank" href="{$urlRDS}">End Time</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Job Type</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Casing string diameter</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Top plug used</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Bottom plug used</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Plug bumped</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Plug bump pressure <xsl:value-of select="witsml:presBump/@uom"/>
 													</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Float held</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Pressure release time</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Full returns</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Cement volume returns <xsl:value-of select="witsml:volReturns/@uom"/>
 													</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Reciprocated</a>
 												</td>
-												<td align="center" width="60" valign="top">
+												<td align="center" width="50" valign="top">
 													<a target="_blank" href="{$urlRDS}">Rotated</a>
 												</td>
-												<td align="left" width="100" valign="top">
+												<td align="left" width="220" valign="top">
 													<a target="_blank" href="{$urlRDS}">Comments</a>
 												</td>
@@ -698,5 +699,5 @@
 												</td>
 												<td align="center">
-													<xsl:value-of select="substring(witsml:eTimPresHeld, 0, 17)"/>
+													<xsl:value-of select="concat(substring-before(substring(witsml:eTimPresHeld, 0,17), 'T'), ' ', substring-after(substring(witsml:eTimPresHeld, 0,17), 'T'))"/>
 												</td>
 												<td align="center">
@@ -757,35 +758,35 @@
 											<table id="table2">
 												<tr>
-													<td align="center" width="100" valign="top">
+													<td align="center" width="80" valign="top">
 														<a target="_blank" href="{$url_mudClass}">Fluid Type</a>
 													</td>
-													<td align="center" width="100" valign="top">
-														<a target="_blank" href="{$url_mudClass}">Fluid Description</a>
-													</td>
-													<td align="center" width="100" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$urlRDS}">Volume Pumped <xsl:value-of select="witsml:cementingFluid/witsml:volPumped/@uom"/>
 														</a>
 													</td>
-													<td align="center" width="100" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$url_density}">Fluid Density <xsl:value-of select="witsml:cementingFluid/witsml:density/@uom"/>
 														</a>
 													</td>
-													<td align="center" width="80" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$url_yp}">Yield Point <xsl:value-of select="witsml:cementingFluid/witsml:yp/@uom"/>
 														</a>
 													</td>
-													<td align="center" width="80" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$urlRDS}">Mix Water Ratio <xsl:value-of select="witsml:cementingFluid/witsml:ratioMixWater/@uom"/>
 														</a>
 													</td>
-													<td align="center" width="80" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$urlRDS}">Free Water <xsl:value-of select="witsml:cementingFluid/witsml:pcFreeWater/@uom"/>
 														</a>
 													</td>
-													<td align="center" width="80" valign="top">
+													<td align="center" width="50" valign="top">
 														<a target="_blank" href="{$urlRDS}">Thick Time <xsl:value-of select="witsml:cementingFluid/witsml:eTimThickening/@uom"/>
 														</a>
 													</td>
-													<td align="left" width="100" valign="top">
+													<td align="left" width="210" valign="top">
+														<a target="_blank" href="{$url_mudClass}">Fluid Description</a>
+													</td>
+													<td align="left" width="230" valign="top">
 														<a target="_blank" href="{$urlRDS}">Comments</a>
 													</td>
@@ -798,7 +799,4 @@
 														</td>
 														<td align="center">
-															<xsl:value-of select="witsml:descFluid"/>
-														</td>
-														<td align="center">
 															<xsl:value-of select="witsml:volPumped"/>
 														</td>
@@ -817,4 +815,7 @@
 														<td align="center">
 															<xsl:value-of select="witsml:eTimThickening"/>
+														</td>
+														<td align="left">
+															<xsl:value-of select="witsml:descFluid"/>
 														</td>
 														<td align="left">
@@ -899,5 +900,5 @@
 												</td>
 												<td align="center">
-													<xsl:value-of select="substring(witsml:dTim, 0 , 17)"/>
+													<xsl:value-of select="concat(substring-before(substring(witsml:dTim, 0,17), 'T'), ' ', substring-after(substring(witsml:dTim, 0,17), 'T'))"/>
 												</td>
 												<td align="center">
@@ -1526,63 +1527,25 @@
 												<a href="{$url_md}" target="_blank">Depth mMD</a>
 											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_presPore}" target="_blank">Formation Pore Pressure</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:formTestInfo/witsml:presPore/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_presPore}" target="_blank">Formation Pore Pressure</a>
+												<xsl:value-of select="witsml:formTestInfo/witsml:presPore/@uom"/>
+											</td>
+											<td width="60" align="center" valign="top" class="ColHead">
 												<a href="{$url_goodSealm}" target="_blank">Good Seal Ind</a>
 											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdSample}" target="_blank">Depth to Sample Point</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
-												<a href="{$url_dominateComponent}" target="_blank">Dominate Fluid Component</a>
-											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_densityHC}" target="_blank">HC Component Density</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:formTestInfo/witsml:densityHC/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_volumeSample}" target="_blank">Sample Volume</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:formTestInfo/witsml:volumeSample/@uom"/>
-														</td>
-													</tr>
-												</table>
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdSample}" target="_blank">Depth to Sample Point</a>
+												<br />mMD
+											</td>
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_dominateComponent}" target="_blank">Dominat Fluid Component</a>
+											</td>
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_densityHC}" target="_blank">HC Component Density</a>
+												<xsl:value-of select="witsml:formTestInfo/witsml:densityHC/@uom"/>
+											</td>
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_volumeSample}" target="_blank">Sample Volume</a>
+												<xsl:value-of select="witsml:formTestInfo/witsml:volumeSample/@uom"/>
 											</td>
 											<td align="left" valign="top">
@@ -1844,46 +1807,20 @@
 										</xsl:variable>
 										<tr>
-											<td width="60" align="center" valign="top">
+											<td width="60" align="center" valign="top" class="ColHead">
 												<a href="{$url_dTim}" target="_blank">Date</a>
 											</td>
-											<td width="60" align="center" valign="top">
-												<table width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdInflow}" target="_blank">Depth of Well</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two">
-													<tr>
-														<td align="center">
-															<a href="{$url_tvdInflow}" target="_blank">Depth of Well</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mTVD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_eTimLost}" target="_blank">Lost Time</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:eTimLost/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="60" align="center" valign="top">
+											<td width="70" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdInflow}" target="_blank">Depth of Well</a>
+												<br />mMD
+											</td>
+											<td width="65" align="center" valign="top" class="ColHead">
+												<a href="{$url_tvdInflow}" target="_blank">Depth of Well</a>
+												<br />mTVD
+											</td>
+											<td width="65" align="center" valign="top" class="ColHead">
+												<a href="{$url_eTimLost}" target="_blank">Lost Time</a>
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:eTimLost/@uom"/>
+											</td>
+											<td width="65" align="center" valign="top" class="ColHead">
 												<a href="{$url_dTimRegained}" target="_blank">Time for Well Control Regain</a>
 											</td>
@@ -1891,123 +1828,49 @@
 													<td width="60" align="center" valign="top"><a href="{$url_controlIncidentInfo}" target="_blank">Drill Bit Dia <xsl:value-of select="witsml:controlIncidentInfo/witsml:diaBit/@uom"/></a></td>
 													 -->
-											<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdBit}" target="_blank">Depth at Bit</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_wtMud}" target="_blank">Drilling Fluid Density</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:wtMud/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_porePressure}" target="_blank">Pore Pressure</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:porePressure/@uom"/>
-														</td>
-													</tr>
-												</table>
+											<td width="65" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdBit}" target="_blank">Depth at Bit</a>
+												<br />mMD
+											</td>
+											<td width="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_wtMud}" target="_blank">Drilling Fluid Density</a>
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:wtMud/@uom"/>
+											</td>
+											<td width="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_porePressure}" target="_blank">Pore Pressure</a>
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:porePressure/@uom"/>
 											</td>
 											<!-- 
 													<td width="80" align="center"><a href="{$url_controlIncidentInfo}" target="_blank">Dia of Last Casing <xsl:value-of select="witsml:controlIncidentInfo/witsml:diaCsgLast/@uom"/></a></td>
 													 -->
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdCsgLast}" target="_blank">Depth to Casing</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_volMudGained}" target="_blank">Gained Vol of Fluid</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:volMudGained/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_presShutInCasing}" target="_blank">Shut in Casing Pressure</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:presShutInCasing/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_presShutInDrill}" target="_blank">Shut in Drill Pipe Pressure</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:presShutInDrill/@uom"/>
-														</td>
-													</tr>
-												</table>
-											</td>
-											<td width="100" align="center" valign="top">
+											<td width="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdCsgLast}" target="_blank">Depth to Casing</a>
+												<br />mMD
+											</td>
+											<td width="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_volMudGained}" target="_blank">Gained Vol of Fluid</a>
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:volMudGained/@uom"/>
+											</td>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_presShutInCasing}" target="_blank">Shut in Casing Pressure</a>
+												<br />
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:presShutInCasing/@uom"/>
+											</td>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_presShutInDrill}" target="_blank">Shut in Drill Pipe Pressure</a>
+												<br />
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:presShutInDrill/@uom"/>
+											</td>
+											<td width="80" align="center" valign="top" class="ColHead">
 												<a href="{$url_incidentType}" target="_blank">Incident Class</a>
 											</td>
-											<td width="100" align="center" valign="top">
+											<td width="80" align="center" valign="top" class="ColHead">
 												<a href="{$url_killingType}" target="_blank">Killing Procd</a>
 											</td>
-											<td width="100" align="center" valign="top">
+											<td width="90" align="center" valign="top" class="ColHead">
 												<a href="{$url_formation}" target="_blank">Formation</a>
 											</td>
-											<td width="80" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_tempBottom}" target="_blank">BHT</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:controlIncidentInfo/witsml:tempBottom/@uom"/>
-														</td>
-													</tr>
-												</table>
+											<td width="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_tempBottom}" target="_blank">BHT</a>
+												<xsl:value-of select="witsml:controlIncidentInfo/witsml:tempBottom/@uom"/>
 											</td>
 											<!-- <td width="80" align="center"><a href="{$url_controlIncidentInfo}" target="_blank">Max Choke Valve Pressure <xsl:value-of select="witsml:controlIncidentInfo/witsml:presMaxChoke/@uom"/></a></td> -->
@@ -2069,5 +1932,5 @@
 										<tr>
 											<td/>
-											<td align="left" colspan="16">
+											<td align="left" colspan="16" class="light">
 												<xsl:value-of select="witsml:description"/>
 											</td>
@@ -2123,51 +1986,19 @@
 												<a href="{$urlRDS}" target="_blank">Duration Well Perf</a>
 											</td>
-											<td width="100" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdTop}" target="_blank">Top of Perf</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="100" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_mdBottom}" target="_blank">Bottom of Perf</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mMD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="100" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_tvdTop}" target="_blank">Top of Perf</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mTVD</td>
-													</tr>
-												</table>
-											</td>
-											<td width="100" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center">
-															<a href="{$url_tvdBottom}" target="_blank">Bottom of Perf</a>
-														</td>
-													</tr>
-													<tr>
-														<td align="center" class="ColHead">mTVD</td>
-													</tr>
-												</table>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdTop}" target="_blank">Top of Perf</a>
+												<br />mMD
+											</td>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_mdBottom}" target="_blank">Bottom of Perf</a>
+												<br />mMD
+											</td>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_tvdTop}" target="_blank">Top of Perf</a>
+												<br />mTVD
+											</td>
+											<td width="100" align="center" valign="top" class="ColHead">
+												<a href="{$url_tvdBottom}" target="_blank">Bottom of Perf</a>
+												<br />mTVD
 											</td>
 										</tr>
@@ -2181,8 +2012,8 @@
 												</xsl:variable>
 												<td align="center">
-													<xsl:value-of select="substring(witsml:dTimOpen, 0, 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
+													<xsl:value-of select="concat(substring-before(substring(witsml:dTimOpen, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimOpen, 0,17), 'T'))"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="concat(substring-before(substring(witsml:dTimClose, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimClose, 0,17), 'T'))"/>
 												</td>
 												<td align="center">
@@ -2649,5 +2480,5 @@
 			</td>
 			<td class="light">
-			<xsl:if test="witsml:fixedRig='true' or witsml:fixedRig='1'">yes</xsl:if>
+				<xsl:if test="witsml:fixedRig='true' or witsml:fixedRig='1'">yes</xsl:if>
 				<xsl:if test="witsml:fixedRig='false' or witsml:fixedRig='0'">no</xsl:if>
 				<!--<xsl:variable name="element_rigType" select="witsml:rigType" />
@@ -2767,5 +2598,5 @@
 				<xsl:value-of select="witsml:mdCsgLast"/>
 			</td>
-			</tr>
+		</tr>
 		<tr class="light">
 			<td class="dark">
