Index: projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation.xsl
===================================================================
--- projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation.xsl (revision 130)
+++ projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation.xsl (revision 151)
@@ -1,15 +1,24 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:witsml="http://www.witsml.org/schemas/1series" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
-	<xsl:import href="./difference/date.difference.xsl"/>
-	<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:witsml="http://www.witsml.org/schemas/1series"
+	xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<xsl:output method="html" version="1.0" encoding="UTF-8"
+		indent="yes" />
 	<!--  import the schema enables sawsdl:modelReference lookup -->
-	<xsd:import namespace="http://www.witsml.org/schemas/1series" schemaLocation="WITSML_drillReport_profiled_schema_2009-04-06_ddrPhase2.xsd"/>
+	<xsd:import namespace="http://www.witsml.org/schemas/1series"
+		     schemaLocation="WITSML_drillReport_profiled_schema_2009-04-06_ddrPhase2.xsd"/>
+
 	<!--  A global variable for the Drill Report schema file name. Required for URL lookup of element definitions in RDL -->
 	<xsl:variable name="ddrSchema" select="'WITSML_drillReport_profiled_schema_2009-04-06_ddrPhase2.xsd'"/>
 	<xsl:template match="/">
+
 		<html>
 			<head>
-				<link href="css_ddrHtmlReport.css" type="text/css" rel="stylesheet"/>
+				<link href="css_ddrHtmlReport.css" type="text/css" rel="stylesheet" />
 			</head>
+
 			<body>
 				<xsl:variable name="urlRDS" select="'http://www.posccaesar.org'"/>
@@ -20,7 +29,7 @@
 								<table id="table1" width="100%">
 									<tr>
-										<td width="40%" align="left" class="ReportHeader">Summary report Wellbore: <xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+										<td width="40%" align="left" class="ReportHeader">Summary report Wellbore: <xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name" />
 										</td>
-										<td width="60%" align="right" class="ReportHeader">End time: <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
+										<td width="60%" align="right" class="ReportHeader">End time: <xsl:value-of select="substring(witsml:dTimEnd, 0,17)" />
 										</td>
 									</tr>
@@ -30,25 +39,11 @@
 						<tr height="5px">
 							<td>
-								<hr size="4px" color="black"/>
+								<hr size="4px" color="black" />
 							</td>
 						</tr>
 						<tr class="light">
 							<xsl:variable name="element_objDrillReport_sequence" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='obj_drillReport']/xsd:sequence/xsd:sequence"/>
-							<xsl:variable name="element_header" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='header']/xsd:sequence"/>
 							<td>
 								<table id="table1">
-									<!-- Added/changed 18jan2011 -->
-									<tr class="light">
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">Report Number:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='reportNo']"/>
-										</td>
-										<td class="ColHead"><a target="_blank" href="{$urlRDS}">Period:</a>:</td>
-										<td colspan="5"><xsl:value-of select="substring(witsml:dTimStart, 0,17)"/> - <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
-										</td>
-									</tr>
-									<!-- END Added 18jan2011 -->
 									<tr class="light">
 										<xsl:variable name="url_wellboreAlias">
@@ -59,5 +54,5 @@
 										</td>
 										<td class="light">
-											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name" />
 										</td>
 										<td class="ColHead">
@@ -65,5 +60,5 @@
 										</td>
 										<td class="light">
-											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD number']/witsml:name"/>
+											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD number']/witsml:name" />
 										</td>
 										<td colspan="2"/>
@@ -80,5 +75,5 @@
 										</td>
 										<td>
-											<xsl:value-of select="witsml:versionKind"/>
+											<xsl:value-of select="witsml:versionKind" />
 										</td>
 										<td class="dark">
@@ -86,53 +81,21 @@
 										</td>
 										<td colspan="3">
-											<xsl:value-of select="substring(witsml:createDate, 0,20)"/>
-										</td>
-									</tr>
-									<!-- Added 18jan2011 -->
-									<tr class="light">
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">High Pressure - High Temperature:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='hpht']"/>
-										</td>
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">Tight well:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='tightWell']"/>
-										</td>
-									</tr>
-									<!-- END Added 18jan2011 -->
-									<!-- Added 26jan2011 -->
-									<tr class="light">
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">Pressure:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='avgPresBH']"/>
-										</td>
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">Temperature:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='expTempBH']"/>
+											<xsl:value-of select="witsml:createDate" />
 										</td>
 									</tr>
 									<tr class="light">
-										<td class="ColHead">
-											<a target="_blank" href="{$urlRDS}">Mean Sea Level:</a>
-										</td>
-										<td class="light">
-											<xsl:value-of select="$element_header//xsd:element[@name='msl']"/>
+										<td class="ColHead">Period:</td>
+										<td colspan="5">
+											<xsl:value-of select="substring(witsml:dTimStart, 0,17)" /> - <xsl:value-of select="substring(witsml:dTimEnd, 0,17)" />
 										</td>
 									</tr>
-									<!-- END Added 26jan2011 -->
 									<tr height="5px">
-										<td colspan="6"/>
+										<td colspan="6" />
 									</tr>
-									<xsl:apply-templates select="witsml:wellboreInfo"/>
+
+									<xsl:apply-templates select="witsml:wellboreInfo" />
 									<!-- Well Status Info -->
-									<xsl:apply-templates select="witsml:statusInfo"/>
+									<xsl:apply-templates select="witsml:statusInfo" />
+
 								</table>
 							</td>
@@ -151,5 +114,5 @@
 						<tr>
 							<td class="light">
-								<xsl:value-of select="witsml:statusInfo/witsml:sum24Hr"/>
+								<xsl:value-of select="witsml:statusInfo/witsml:sum24Hr" />
 							</td>
 						</tr>
@@ -166,10 +129,11 @@
 						</tr>
 						<tr>
-							<td class="light">
-								<xsl:value-of select="witsml:statusInfo/witsml:forecast24Hr"/>
+							<td class="light" >
+								<xsl:value-of select="witsml:statusInfo/witsml:forecast24Hr" />
 							</td>
 						</tr>
+
 						<!-- Operation Mode -->
-						<xsl:if test="count(witsml:activity) &gt; 0">
+						<xsl:if test="count(witsml:activity) > 0">
 							<tr height="5px">
 								<td/>
@@ -185,5 +149,5 @@
 							<tr>
 								<td>
-									<table id="table1">
+									<table id="table1">	
 										<xsl:variable name="element_activity" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_activity']/xsd:sequence"/>
 										<xsl:variable name="url_dTimStart">
@@ -211,10 +175,4 @@
 											<td width="50" align="left" valign="top">
 												<a href="{$url_dTimEnd}" target="_blank">End Time</a>
-											</td>
-											<td width="60" align="left" valign="top">
-												<a href="{$url_md}" target="_blank">Start Depth mMD</a>
-											</td>
-											<td width="60" align="left" valign="top">
-												<a href="{$url_md}" target="_blank">End Depth mMD</a>
 											</td>
 											<td width="60" align="left" valign="top">
@@ -242,10 +200,4 @@
 												</td>
 												<td valign="top">
-													<xsl:value-of select="witsml:MDStart"/>
-												</td>
-												<td valign="top">
-													<xsl:value-of select="witsml:MDEnd"/>
-												</td>
-												<td valign="top">
 													<xsl:value-of select="witsml:md"/>
 												</td>
@@ -258,6 +210,6 @@
 												<td>
 													<xsl:value-of select="witsml:comments"/>
-												</td>
-											</tr>
+												</td>	
+											</tr>		
 										</xsl:for-each>
 										<!--"witsml:activity" -->
@@ -266,6 +218,7 @@
 							</tr>
 						</xsl:if>
+
 						<!--  equipFailureInfo  -->
-						<xsl:if test="count(witsml:equipFailureInfo) &gt; 0">
+						<xsl:if test="count(witsml:equipFailureInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -285,5 +238,5 @@
 										<xsl:variable name="url_dTim">
 											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
-										</xsl:variable>
+										</xsl:variable>	
 										<xsl:variable name="url_md">
 											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
@@ -311,20 +264,19 @@
 												<a href="{$url_equipClass}" target="_blank">Sub Equip Syst Class</a>
 											</td>
-											<td width="80" align="center" valign="top" class="ColHead">
-												<a href="{$url_eTimMissProduction}" target="_blank" valign="top">Operation Downtime</a>
-												<br/>
-												<xsl:value-of select="witsml:equipFailureInfo/witsml:eTimMissProduction/@uom"/>
-											</td>
-											<!--<td width="60" align="center" valign="top">
-											<table id="two" width="100%">
-												<tr>
-													<td align="center"><a href="{$url_eTimMissProduction}" target="_blank" valign="top">Operation Downtime</a></td>
-												</tr>
-												<tr>
-													<td align="center" class="ColHead"><xsl:value-of select="witsml:equipFailureInfo/witsml:eTimMissProduction/@uom"/></td>
-												</tr>
-											</table>
-										</td>-->
-											<td width="100" align="left" valign="top">
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_eTimMissProduction}" target="_blank" valign="top">Operation Downtime</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:equipFailureInfo/witsml:eTimMissProduction/@uom"/>
+														</td>
+													</tr>
+												</table> 
+											</td>
+											<td width="80" align="left" valign="top">
 												<a href="{$url_dTimRepair}" target="_blank">Equipment Repaired</a>
 											</td>
@@ -353,5 +305,5 @@
 													<xsl:value-of select="witsml:description"/>
 												</td>
-											</tr>
+											</tr>		
 										</xsl:for-each>
 									</table>
@@ -359,7 +311,8 @@
 							</tr>
 						</xsl:if>
-						<!-- Added/Changed 26jan2011 -->
+
+
 						<!--  Bit Record -->
-						<xsl:if test="count(witsml:bitRecord) &gt; 0">
+						<xsl:if test="count(witsml:bitRecord) > 0">
 							<tr height="5px">
 								<td/>
@@ -367,5 +320,5 @@
 							<tr>
 								<td>
-									<hr/>
+									<hr />
 								</td>
 							</tr>
@@ -389,4 +342,5 @@
 											<xsl:value-of select="$element_bitRecord//xsd:element[@name='manufacturer']/@sawsdl:modelReference"/>
 										</xsl:variable>
+
 										<tr>
 											<td align="center" width="50" valign="top">
@@ -394,96 +348,12 @@
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$url_diaBit}">Bit size <xsl:value-of select="witsml:bitRecord/witsml:diaBit/@uom"/>
+												<a target="_blank" href="{$url_diaBit}">Bit size <xsl:value-of select="witsml:bitRecord/witsml:diaBit/@uom" />
 												</a>
 											</td>
-											<td align="left" width="170" valign="top">
+											<td align="center" width="80" valign="top">
+												<a target="_blank" href="{$url_codeMfg}">Bit Type</a>
+											</td>
+											<td valign="top">
 												<a target="_blank" href="{$url_manufacturer}">Manufacturer</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$url_codeMfg}">Model</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Serial NO.</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">TFA <xsl:value-of select="witsml:bitRecord/witsml:tfa/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Time start</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Time end</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hours drilled <xsl:value-of select="witsml:bitRecord/witsml:hrsDrilled/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">MD start <xsl:value-of select="witsml:bitRecord/witsml:mdHoleStart/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">MD end <xsl:value-of select="witsml:bitRecord/witsml:mdHoleEnd/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Dull grade</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max WOB <xsl:value-of select="witsml:bitRecord/witsml:maxWob/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max RPM <xsl:value-of select="witsml:bitRecord/witsml:maxRpm/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max circ rate <xsl:value-of select="witsml:bitRecord/witsml:maxCircRate/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max SSP <xsl:value-of select="witsml:bitRecord/witsml:maxSsp/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hole made (run) <xsl:value-of select="witsml:bitRecord/witsml:mdHoleMadeRun/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hours drilled (run) <xsl:value-of select="witsml:bitRecord/witsml:hrsDrilledRun/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">ROP <xsl:value-of select="witsml:bitRecord/witsml:rop/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total WOB <xsl:value-of select="witsml:bitRecord/witsml:maxTotWob/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total RPM <xsl:value-of select="witsml:bitRecord/witsml:maxTotRpm/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total circ rate <xsl:value-of select="witsml:bitRecord/witsml:maxTotCircRate/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total SSP <xsl:value-of select="witsml:bitRecord/witsml:maxTotSsp/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total hole made <xsl:value-of select="witsml:bitRecord/witsml:mdTotHoleMade/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total hours drilled <xsl:value-of select="witsml:bitRecord/witsml:totHrsDrilled/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total ROP <xsl:value-of select="witsml:bitRecord/witsml:totHrsDrilled/@uom"/>
-												</a>
 											</td>
 										</tr>
@@ -491,80 +361,14 @@
 											<tr class="light">
 												<td align="center">
-													<xsl:value-of select="witsml:numBit"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:diaBit"/>
-												</td>
-												<td width="170">
-													<xsl:value-of select="witsml:manufacturer"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:codeMfg"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:serialNo"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tfa"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:dTimIn"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:dTimOut"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:hrsDrilled"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleStart"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleEnd"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:dullGrade"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxWob"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxRpm"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxCircRate"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxSpp"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleMadeRun"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:hrsDrilledRun"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:rop"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotWob"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotRpm"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotCircRate"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotSpp"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdTotHoleMade"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:totHrsDrilled"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:totRop"/>
+													<xsl:value-of select="witsml:numBit" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:diaBit" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:codeMfg" />
+												</td>
+												<td>
+													<xsl:value-of select="witsml:manufacturer" />
 												</td>
 											</tr>
@@ -574,239 +378,7 @@
 							</tr>
 						</xsl:if>
-						<!-- Added/Changed 26jan2011 -->
-						<!-- Added/changed 18jan2011 -->
-						<!--  witsml:pipe -->
-						<!--<xsl:if test="count(witsml:pipe) > 0">-->
-						<tr height="5px">
-							<td/>
-						</tr>
-						<tr>
-							<td>
-								<hr/>
-							</td>
-						</tr>
-						<tr>
-							<td class="SectionHead">Pipe information</td>
-						</tr>
-						<tr>
-							<td>
-								<table id="table2">
-									<xsl:variable name="element_pipe" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='pipe']/xsd:sequence"/>
-									<!--<xsl:variable name="url_readingKind"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_equivalentMudWeight"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='equivalentMudWeight']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_dTim"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='dTim']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_md"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='md']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_tvd"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='tvd']/@sawsdl:modelReference"/></xsl:variable>-->
-									<tr>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">Type of pipe</a>
-										</td>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">Casing type</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Run time</a>
-										</td>
-										<td align="center" width="100" valign="top">
-											<a target="_blank" href="{$urlRDS}">Description</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal outside diameter <xsl:value-of select="witsml:pipe/witsml:OD/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="100" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal inside diameter <xsl:value-of select="witsml:pipe/witsml:ID/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal Weight <xsl:value-of select="witsml:pipe/witsml:weight/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal Grade</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal Connection</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Length <xsl:value-of select="witsml:pipe/witsml:length/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Top/Hangar MD <xsl:value-of select="witsml:pipe/witsml:MDTopHangar/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Bottom/Shoe MD <xsl:value-of select="witsml:pipe/witsml:MDBottomShoe/@uom"/>
-											</a>
-										</td>
-									</tr>
-									<xsl:for-each select="witsml:pipe">
-										<tr class="light">
-											<td align="center">
-												<xsl:value-of select="witsml:typeOfPipe"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="casingType"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="substring-after(substring(witsml:dTimRun, 0, 17), 'T')"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:description"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:OD"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:ID"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:weight"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:grade"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:connection"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:length"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:MDTopHangar"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:MDBottomShoe"/>
-											</td>
-										</tr>
-									</xsl:for-each>
-								</table>
-							</td>
-						</tr>
-						<!--</xsl:if>-->
-						<!-- witsml:cement -->
-						<!--<xsl:if test="count(witsml:cement) > 0">-->
-						<tr height="5px">
-							<td/>
-						</tr>
-						<tr>
-							<td>
-								<hr/>
-							</td>
-						</tr>
-						<tr>
-							<td class="SectionHead">Cement information</td>
-						</tr>
-						<tr>
-							<td>
-								<table id="table2">
-									<xsl:variable name="element_cement" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cement']/xsd:sequence"/>
-									<!--<xsl:variable name="url_readingKind"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_equivalentMudWeight"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='equivalentMudWeight']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_dTim"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='dTim']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_md"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='md']/@sawsdl:modelReference"/></xsl:variable>
-						    			<xsl:variable name="url_tvd"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='tvd']/@sawsdl:modelReference"/></xsl:variable>-->
-									<tr>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">Start Time</a>
-										</td>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">End Time</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Job Type</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Casing string diameter</a>
-										</td>
-										<td align="center" width="100" valign="top">
-											<a target="_blank" href="{$urlRDS}">Comments</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Top plug used</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Bottom plug used</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Plug failed to bump</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Plug bump pressure <xsl:value-of select="witsml:cement/witsml:volPumped/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Float failed</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Pressure release time</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Full returns</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">cement volume returns <xsl:value-of select="witsml:cement/witsml:volPumped/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Reciprocated</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Rotated</a>
-										</td>
-									</tr>
-									<xsl:for-each select="witsml:cement">
-										<tr class="light">
-											<td align="center">
-												<xsl:value-of select="substring-after(substring(witsml:dTimStart, 0, 17), 'T')"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="substring-after(substring(witsml:dTimEnd, 0, 17), 'T')"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:jobType"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:casingStringDiameter"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:topPlugUsed"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:bottomPlugUsed"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:plugFailedToBump"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:plugBumpPressure"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:floatFailed"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:dTimPressureRelease"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:fullReturns"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:cementVolumeReturns"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:reciprocated"/>
-											</td>
-											<td align="center">
-												<xsl:value-of select="witsml:rotated"/>
-											</td>
-										</tr>
-									</xsl:for-each>
-								</table>
-							</td>
-						</tr>
-						<!--</xsl:if>-->
+
 						<!--  witsml:fluid -->
-						<xsl:if test="count(witsml:fluid) &gt; 0">
+						<xsl:if test="count(witsml:fluid) > 0">
 							<tr height="5px">
 								<td/>
@@ -814,9 +386,9 @@
 							<tr>
 								<td>
-									<hr/>
-								</td>
-							</tr>
-							<tr>
-								<td class="SectionHead">Cement Fluid Details</td>
+									<hr />
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Drilling Fluid Information</td>
 							</tr>
 							<tr>
@@ -853,36 +425,14 @@
 											</td>
 											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$url_mudClass}">Fuild Description</a>
-											</td>
-											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$urlRDS}">Volume Pumped <xsl:value-of select="witsml:fluid/witsml:volPumped/@uom"/>
+												<a target="_blank" href="{$url_density}">Fluid Density <xsl:value-of select="witsml:fluid/witsml:density/@uom" />
 												</a>
 											</td>
-											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$url_density}">Fluid Density <xsl:value-of select="witsml:fluid/witsml:density/@uom"/>
+											<td align="center" width="120" valign="top">
+												<a target="_blank" href="{$url_pv}">Fluid Viscosity <xsl:value-of select="witsml:fluid/witsml:pv/@uom" />
 												</a>
 											</td>
-											<td align="center" width="120" valign="top">
-												<a target="_blank" href="{$url_pv}">Fluid Viscosity <xsl:value-of select="witsml:fluid/witsml:pv/@uom"/>
+											<td align="center" width="80" valign="top">
+												<a target="_blank" href="{$url_yp}">Yield Point <xsl:value-of select="witsml:fluid/witsml:yp/@uom" />
 												</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$url_yp}">Yield Point <xsl:value-of select="witsml:fluid/witsml:yp/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Mix Water Ratio <xsl:value-of select="witsml:fluid/witsml:mixWaterRatio/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Free Water <xsl:value-of select="witsml:fluid/witsml:freeWater/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Thick Time <xsl:value-of select="witsml:fluid/witsml:thickTime/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$urlRDS}">Comments</a>
 											</td>
 											<td/>
@@ -891,49 +441,32 @@
 											<tr class="light">
 												<td>
-													<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:md"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mudClass"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:fluidDescription"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:volPumped"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:density"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:pv"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:yp"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mixWaterRatio"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:freeWater"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:thickTime"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:comments"/>
+													<xsl:value-of select="substring(witsml:dTim, 0, 17)" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:md" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:mudClass" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:density" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:pv" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:yp" />
 												</td>
 												<td/>
 											</tr>
 										</xsl:for-each>
+
 									</table>
 								</td>
 							</tr>
 						</xsl:if>
-						<!-- END Added/changed 18jan2011 -->
+
 						<!--  porePressure -->
-						<xsl:if test="count(witsml:porePressure) &gt; 0">
+						<xsl:if test="count(witsml:porePressure) > 0">
 							<tr height="5px">
 								<td/>
@@ -941,5 +474,5 @@
 							<tr>
 								<td>
-									<hr/>
+									<hr />
 								</td>
 							</tr>
@@ -982,5 +515,5 @@
 														</td>
 													</tr>
-												</table>
+												</table> 
 											</td>
 											<td align="center" valign="top">
@@ -997,17 +530,17 @@
 											<tr class="light">
 												<td align="center">
-													<xsl:value-of select="witsml:readingKind"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:equivalentMudWeight"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="substring(witsml:dTim, 0 , 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:md"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tvd"/>
+													<xsl:value-of select="witsml:readingKind" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:equivalentMudWeight" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="substring(witsml:dTim, 0 , 17)" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:md" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tvd" />
 												</td>
 											</tr>
@@ -1017,6 +550,7 @@
 							</tr>
 						</xsl:if>
+
 						<!--  surveyStation -->
-						<xsl:if test="count(witsml:surveyStation) &gt; 0">
+						<xsl:if test="count(witsml:surveyStation) > 0">
 							<tr height="5px">
 								<td/>
@@ -1063,14 +597,14 @@
 											<tr class="light">
 												<td>
-													<xsl:value-of select="witsml:md"/>
-												</td>
-												<td>
-													<xsl:value-of select="witsml:tvd"/>
-												</td>
-												<td>
-													<xsl:value-of select="witsml:incl"/>
-												</td>
-												<td>
-													<xsl:value-of select="witsml:azi"/>
+													<xsl:value-of select="witsml:md" />
+												</td>
+												<td>
+													<xsl:value-of select="witsml:tvd" />
+												</td>
+												<td>
+													<xsl:value-of select="witsml:incl" />
+												</td>
+												<td>
+													<xsl:value-of select="witsml:azi" />
 												</td>
 											</tr>
@@ -1080,6 +614,7 @@
 							</tr>
 						</xsl:if>
+
 						<!--  logInfo -->
-						<xsl:if test="count(witsml:logInfo) &gt; 0">
+						<xsl:if test="count(witsml:logInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1123,5 +658,5 @@
 											</td>
 											<td colspan="6">
-												<xsl:value-of select="witsml:serviceCompany"/>
+												<xsl:value-of select="witsml:serviceCompany" />
 											</td>
 										</tr>
@@ -1148,8 +683,8 @@
 													<tr>
 														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:logInfo/witsml:tempBHCT/@uom"/>
-														</td>
-													</tr>
-												</table>
+															<xsl:value-of select="witsml:logInfo/witsml:tempBHCT/@uom" />
+														</td>
+													</tr>
+												</table> 
 											</td>
 											<td align="center" width="60" valign="top">
@@ -1162,8 +697,8 @@
 													<tr>
 														<td align="center" class="ColHead">
-															<xsl:value-of select="witsml:logInfo/witsml:tempBHST/@uom"/>
-														</td>
-													</tr>
-												</table>
+															<xsl:value-of select="witsml:logInfo/witsml:tempBHST/@uom" />
+														</td>
+													</tr>
+												</table> 
 											</td>
 											<!-- 
@@ -1193,20 +728,20 @@
 											<tr class="light">
 												<td align="center">
-													<xsl:value-of select="witsml:runNumber"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdTop"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdBottom"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tool"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tempBHCT"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tempBHST"/>
+													<xsl:value-of select="witsml:runNumber" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:mdTop" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:mdBottom" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tool" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tempBHCT" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tempBHST" />
 												</td>
 												<!-- 
@@ -1224,7 +759,7 @@
 							</tr>
 						</xsl:if>
-						<!-- Changed 19jan2011 -->
+
 						<!--  coreInfo -->
-						<xsl:if test="count(witsml:coreInfo) &gt; 0">
+						<xsl:if test="count(witsml:coreInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1276,9 +811,10 @@
 												<a target="_blank" href="{$url_mdBottom}">Depth Bottom mMD</a>
 											</td>
-											<td width="60" align="center" valign="top" class="ColHead"><a href="{$url_lenRecovered}" target="_blank">Core length</a><br/>m</td>
-											<!--<td width="60" align="center" valign="top">
+											<td width="60" align="center" valign="top">
 												<table id="two">
 													<tr>
-														<td align="center"><a href="{$url_lenRecovered}" target="_blank">Core length</a></td>
+														<td align="center">
+															<a href="{$url_lenRecovered}" target="_blank">Core length</a>
+														</td>
 													</tr>
 													<tr>
@@ -1286,10 +822,11 @@
 													</tr>
 												</table> 
-											</td>-->
-											<td width="60" align="center" valign="top" class="ColHead"><a href="{$url_lenRecovered}" target="_blank">Recover core</a><br/>%</td>
-											<!--<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center"><a href="{$url_recoverPc}" target="_blank">Recover core</a></td>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_recoverPc}" target="_blank">Recover core</a>
+														</td>
 													</tr>
 													<tr>
@@ -1297,10 +834,11 @@
 													</tr>
 												</table> 
-											</td>-->
-											<td width="60" align="center" valign="top" class="ColHead"><a href="{$url_lenRecovered}" target="_blank">Core barrel length</a><br/>m</td>
-											<!--<td width="60" align="center" valign="top">
-												<table id="two" width="100%">
-													<tr>
-														<td align="center"><a href="{$url_lenBarrel}" target="_blank">Core barrel length</a></td>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_lenBarrel}" target="_blank">Core barrel length</a>
+														</td>
 													</tr>
 													<tr>
@@ -1308,6 +846,6 @@
 													</tr>
 												</table> 
-											</td>-->
-											<td width="80" align="center" valign="top">
+											</td>
+											<td width="120" align="center" valign="top">
 												<a target="_blank" href="{$url_innerBarrelType}">Inner barrel type</a>
 											</td>
@@ -1348,7 +886,7 @@
 							</tr>
 						</xsl:if>
-						<!-- END Changed 19jan2011 -->
+
 						<!--  wellTestInfo -->
-						<xsl:if test="count(witsml:wellTestInfo) &gt; 0">
+						<xsl:if test="count(witsml:wellTestInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1360,9 +898,9 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Well Test Information</td>
-							</tr>
-							<tr>
-								<td>
-									<table id="table1">
+								<td  class="SectionHead">Well Test Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">	
 										<xsl:variable name="element_drillReportWellTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellTestInfo']/xsd:sequence"/>
 										<xsl:variable name="url_dTim">
@@ -1441,14 +979,19 @@
 											 -->
 											<td align="left" valign="top">
-												<a href="{$url_chokeOrificeSize}" target="_blank">Choke Orifice Size<br/>
-													<xsl:value-of select="witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/>
-												</a>
-											</td>
-											<!--<td align="left" valign="top">
 												<table id="two">
-													<tr><td><a href="{$url_chokeOrificeSize}" target="_blank">Choke Orifice Size</a></td></tr>
-													<tr><td><a href="{$url_chokeOrificeSize}" target="_blank"><xsl:value-of select="witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/></a></td></tr>
-												</table>
-											</td>-->
+													<tr>
+														<td>
+															<a href="{$url_chokeOrificeSize}" target="_blank">Choke Orifice Size</a>
+														</td>
+													</tr>
+													<tr>
+														<td>
+															<a href="{$url_chokeOrificeSize}" target="_blank">
+																<xsl:value-of select="witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/>
+															</a>
+														</td>
+													</tr>
+												</table>
+											</td>
 											<td align="left" valign="top">
 												<a href="{$url_densityOil}" target="_blank">Density Crude Oil <xsl:value-of select="witsml:wellTestInfo/witsml:densityOil/@uom"/>
@@ -1579,6 +1122,7 @@
 							</tr>
 						</xsl:if>
+
 						<!--  Foramtion Test Info -->
-						<xsl:if test="count(witsml:formTestInfo) &gt; 0">
+						<xsl:if test="count(witsml:formTestInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1590,9 +1134,9 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Formation Test</td>
-							</tr>
-							<tr>
-								<td>
-									<table id="table1">
+								<td  class="SectionHead">Formation Test</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">	
 										<xsl:variable name="element_drillReportFormTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportFormTestInfo']/xsd:sequence"/>
 										<xsl:variable name="url_md">
@@ -1636,5 +1180,5 @@
 														</td>
 													</tr>
-												</table>
+												</table> 
 											</td>
 											<td width="60" align="center" valign="top">
@@ -1651,5 +1195,5 @@
 														<td align="center" class="ColHead">mMD</td>
 													</tr>
-												</table>
+												</table> 
 											</td>
 											<td width="60" align="center" valign="top">
@@ -1668,5 +1212,5 @@
 														</td>
 													</tr>
-												</table>
+												</table> 
 											</td>
 											<td width="60" align="center" valign="top">
@@ -1682,5 +1226,5 @@
 														</td>
 													</tr>
-												</table>
+												</table> 
 											</td>
 											<td align="left" valign="top">
@@ -1714,5 +1258,5 @@
 													<xsl:value-of select="witsml:description"/>
 												</td>
-											</tr>
+											</tr>	
 										</xsl:for-each>
 										<!--"witsml:formTestInfo" -->
@@ -1721,6 +1265,7 @@
 							</tr>
 						</xsl:if>
+
 						<!--  stratInfo  -->
-						<xsl:if test="count(witsml:stratInfo) &gt; 0">
+						<xsl:if test="count(witsml:stratInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1732,9 +1277,9 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Stratigraphic Information</td>
-							</tr>
-							<tr>
-								<td>
-									<table id="table1">
+								<td  class="SectionHead">Stratigraphic Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">	
 										<xsl:variable name="element_drillReportStratInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStratInfo']/xsd:sequence"/>
 										<xsl:variable name="url_mdTop">
@@ -1771,5 +1316,5 @@
 													<xsl:value-of select="witsml:description"/>
 												</td>
-											</tr>
+											</tr>		
 										</xsl:for-each>
 									</table>
@@ -1777,7 +1322,7 @@
 							</tr>
 						</xsl:if>
-						<!-- Changed 18jan2011 -->
+
 						<!--  lithShowInfo -->
-						<xsl:if test="count(witsml:lithShowInfo) &gt; 0">
+						<xsl:if test="count(witsml:lithShowInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -1789,9 +1334,9 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Lithology Information</td>
-							</tr>
-							<tr>
-								<td>
-									<table id="table1">
+								<td  class="SectionHead">Lithology Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">	
 										<xsl:variable name="element_drillReportLithShowInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLithShowInfo']/xsd:sequence"/>
 										<xsl:variable name="url_mdTop">
@@ -1821,14 +1366,8 @@
 											</td>
 											<td width="60" align="center" valign="top">
-												<a href="{$url_mdBottom}" target="_blank">Difference in Depth mMD</a>
-											</td>
-											<td width="60" align="center" valign="top">
 												<a href="{$url_tvdTop}" target="_blank">Start Depth mTVD</a>
 											</td>
 											<td width="60" align="center" valign="top">
 												<a href="{$url_tvdBottom}" target="_blank">End Depth mTVD</a>
-											</td>
-											<td width="60" align="center" valign="top">
-												<a href="{$url_tvdBottom}" target="_blank">Difference in Depth mTVD</a>
 											</td>
 											<td width="300" align="left" valign="top">
@@ -1850,7 +1389,4 @@
 												</td>
 												<td valign="top" align="center">
-													<xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
-												</td>
-												<td valign="top" align="center">
 													<xsl:value-of select="witsml:tvdTop"/>
 												</td>
@@ -1858,7 +1394,4 @@
 													<xsl:value-of select="witsml:tvdBottom"/>
 												</td>
-												<td valign="top" align="center">
-													<xsl:value-of select="witsml:tvdBottom - witsml:tvdTop"/>
-												</td>
 												<td valign="top">
 													<xsl:value-of select="witsml:show"/>
@@ -1867,5 +1400,5 @@
 													<xsl:value-of select="witsml:lithology"/>
 												</td>
-											</tr>
+											</tr>		
 										</xsl:for-each>
 										<!--"witsml:lithShowInfo" -->
@@ -1874,5 +1407,8 @@
 							</tr>
 						</xsl:if>
-						<!-- END Changed 18jan2011 -->
+
+
+
+
 						<!--  controlIncidentInfo  -->
 						<xsl:for-each select="witsml:controlIncidentInfo">
@@ -1886,5 +1422,5 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Well Control Incident</td>
+								<td  class="SectionHead">Well Control Incident</td>
 							</tr>
 							<tr>
@@ -1894,5 +1430,5 @@
 										<xsl:variable name="url_dTim">
 											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
-										</xsl:variable>
+										</xsl:variable>	
 										<xsl:variable name="url_mdInflow">
 											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdInflow']/@sawsdl:modelReference"/>
@@ -1957,5 +1493,5 @@
 											</td>
 											<td width="60" align="left" valign="top">
-												<table id="two">
+												<table id="two" >
 													<tr>
 														<td align="center">
@@ -2174,7 +1710,9 @@
 							</tr>
 						</xsl:for-each>
-						<!-- Changed 19jan2011 -->
+
+
+
 						<!-- perfInfo  -->
-						<xsl:if test="count(witsml:perfInfo) &gt; 0">
+						<xsl:if test="count(witsml:perfInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -2186,5 +1724,5 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Perforation Information</td>
+								<td  class="SectionHead">Perforation Information</td>
 							</tr>
 							<tr>
@@ -2194,5 +1732,5 @@
 										<xsl:variable name="url_dTimOpen">
 											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimOpen']/@sawsdl:modelReference"/>
-										</xsl:variable>
+										</xsl:variable>	
 										<xsl:variable name="url_dTimClose">
 											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimClose']/@sawsdl:modelReference"/>
@@ -2217,7 +1755,4 @@
 												<a href="{$url_dTimClose}" target="_blank">Time of Closing Well Perf</a>
 											</td>
-											<td width="110" align="center" valign="top">
-												<a href="{$urlRDS}" target="_blank">Duration Well Perf</a>
-											</td>
 											<td width="100" align="center" valign="top">
 												<table id="two" width="100%">
@@ -2271,10 +1806,4 @@
 										<xsl:for-each select="witsml:perfInfo">
 											<tr class="light">
-												<xsl:variable name="duration">
-													<xsl:call-template name="date:difference">
-														<xsl:with-param name="start" select="substring(witsml:dTimOpen, 0, 20)"/>
-														<xsl:with-param name="end" select="substring(witsml:dTimClose, 0, 20)"/>
-													</xsl:call-template>
-												</xsl:variable>
 												<td align="center">
 													<xsl:value-of select="substring(witsml:dTimOpen, 0, 17)"/>
@@ -2282,7 +1811,4 @@
 												<td align="center">
 													<xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="substring-after($duration, 'PT')"/>
 												</td>
 												<td align="center">
@@ -2304,7 +1830,7 @@
 							</tr>
 						</xsl:if>
-						<!-- END Changed 19jan2011 -->
+
 						<!--  gasReadingInfo -->
-						<xsl:if test="count(witsml:gasReadingInfo) &gt; 0">
+						<xsl:if test="count(witsml:gasReadingInfo) > 0">
 							<tr height="5px">
 								<td/>
@@ -2316,9 +1842,9 @@
 							</tr>
 							<tr>
-								<td class="SectionHead">Gas Reading Information</td>
-							</tr>
-							<tr>
-								<td>
-									<table id="table1">
+								<td  class="SectionHead">Gas Reading Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">	
 										<xsl:variable name="element_drillReportGasReadingInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportGasReadingInfo']/xsd:sequence"/>
 										<xsl:variable name="url_dTim">
@@ -2520,5 +2046,5 @@
 											<tr class="light">
 												<td align="center">
-													<xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
+													<xsl:value-of select="substring-after(witsml:dTim, 'T')"/>
 												</td>
 												<td align="center">
@@ -2564,4 +2090,5 @@
 							</tr>
 						</xsl:if>
+
 					</table>
 				</xsl:for-each>
@@ -2569,4 +2096,5 @@
 		</html>
 	</xsl:template>
+
 	<xsl:template match="witsml:wellboreInfo">
 		<xsl:variable name="element_drillReportWellboreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellboreInfo']/xsd:sequence"/>
@@ -2596,5 +2124,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:operator"/>
+				<xsl:value-of select="witsml:operator" />
 			</td>
 			<td class="ColHead">
@@ -2602,5 +2130,5 @@
 			</td>
 			<td colspan="3">
-				<xsl:value-of select="witsml:drillContractor"/>
+				<xsl:value-of select="witsml:drillContractor" />
 			</td>
 		</tr>
@@ -2610,5 +2138,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD Name']/witsml:name"/>
+				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD Name']/witsml:name" />
 			</td>
 			<td class="ColHead">
@@ -2616,11 +2144,11 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD code']/witsml:name" />
 			</td>
 			<td class="ColHead">
-				<a href="{$url_elevKelly}" target="_blank">Elevation <xsl:value-of select="../witsml:statusInfo/witsml:elevKelly/@uom"/>:</a>
+				<a href="{$url_elevKelly}" target="_blank">Elevation <xsl:value-of select="../witsml:statusInfo/witsml:elevKelly/@uom" />:</a>
 			</td>
 			<td>
-				<xsl:value-of select="../witsml:statusInfo/witsml:elevKelly"/>
+				<xsl:value-of select="../witsml:statusInfo/witsml:elevKelly" />
 			</td>
 		</tr>
@@ -2630,5 +2158,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="substring-before(witsml:dTimSpud, 'T')"/>
+				<xsl:value-of select="substring-before(witsml:dTimSpud, 'T')" />
 			</td>
 			<!-- 
@@ -2640,8 +2168,9 @@
 			</td>
 			<td colspan="3">
-				<xsl:value-of select="substring-before(witsml:dateDrillComplete, 'T')"/>
+				<xsl:value-of select="substring-before(witsml:dateDrillComplete, 'T')" />
 			</td>
 		</tr>
 	</xsl:template>
+
 	<xsl:template match="witsml:statusInfo">
 		<xsl:variable name="element_drillReportStatusInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStatusInfo']/xsd:sequence"/>
@@ -2700,5 +2229,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:typeWellbore"/>
+				<xsl:value-of select="witsml:typeWellbore" />
 			</td>
 			<td class="dark">
@@ -2706,5 +2235,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:mdKickoff"/>
+				<xsl:value-of select="witsml:mdKickoff" />
 			</td>
 			<td class="dark">
@@ -2712,5 +2241,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:tvdKickoff"/>
+				<xsl:value-of select="witsml:tvdKickoff" />
 			</td>
 		</tr>
@@ -2720,5 +2249,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:md"/>
+				<xsl:value-of select="witsml:md" />
 			</td>
 			<td class="dark">
@@ -2726,5 +2255,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:tvd"/>
+				<xsl:value-of select="witsml:tvd" />
 			</td>
 			<td>
@@ -2732,13 +2261,13 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:mdPlugTop"/>
+				<xsl:value-of select="witsml:mdPlugTop" />
 			</td>
 		</tr>
 		<tr class="light">
 			<td class="dark">
-				<a target="_blank" href="{$url_distDrill}">Dist Drilled <xsl:value-of select="witsml:distDrill/@uom"/>:</a>
+				<a target="_blank" href="{$url_distDrill}">Dist Drilled <xsl:value-of select="witsml:distDrill/@uom" />:</a>
 			</td>
 			<td>
-				<xsl:value-of select="witsml:distDrill"/>
+				<xsl:value-of select="witsml:distDrill" />
 			</td>
 			<!-- 
@@ -2747,8 +2276,8 @@
 			 -->
 			<td class="dark">
-				<a target="_blank" href="{$url_ropCurrent}">Penetration Rate <xsl:value-of select="witsml:ropCurrent/@uom"/>:</a>
+				<a target="_blank" href="{$url_ropCurrent}">Penetration Rate <xsl:value-of select="witsml:ropCurrent/@uom" />:</a>
 			</td>
 			<td colspan="3">
-				<xsl:value-of select="witsml:ropCurrent"/>
+				<xsl:value-of select="witsml:ropCurrent" />
 			</td>
 		</tr>
@@ -2756,8 +2285,8 @@
 		<tr class="light">
 			<td width="160">
-				<a target="_blank" href="{$url_diaHole}">Hole Dia <xsl:value-of select="witsml:diaHole/@uom"/>:</a>
+				<a target="_blank" href="{$url_diaHole}">Hole Dia <xsl:value-of select="witsml:diaHole/@uom" />:</a>
 			</td>
 			<td width="140">
-				<xsl:value-of select="witsml:diaHole"/>
+				<xsl:value-of select="witsml:diaHole" />
 			</td>
 			<td>
@@ -2765,5 +2294,5 @@
 			</td>
 			<td colspan="3">
-				<xsl:value-of select="witsml:presTestType"/>
+				<xsl:value-of select="witsml:presTestType" />
 			</td>
 		</tr>
@@ -2771,8 +2300,8 @@
 		<tr class="light">
 			<td width="160">
-				<a target="_blank" href="{$url_strengthForm}">Formation Strength <xsl:value-of select="witsml:strengthForm/@uom"/>:</a>
+				<a target="_blank" href="{$url_strengthForm}">Formation Strength <xsl:value-of select="witsml:strengthForm/@uom" />:</a>
 			</td>
 			<td>
-				<xsl:value-of select="witsml:strengthForm"/>
+				<xsl:value-of select="witsml:strengthForm" />
 			</td>
 			<td width="215">
@@ -2780,5 +2309,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:mdStrengthForm"/>
+				<xsl:value-of select="witsml:mdStrengthForm" />
 			</td>
 			<td>
@@ -2786,14 +2315,15 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:tvdStrengthForm"/>
-			</td>
+				<xsl:value-of select="witsml:tvdStrengthForm" />
+			</td>
+
 		</tr>
 		<!-- casing -->
 		<tr class="light">
 			<td class="dark">
-				<a target="_blank" href="{$url_diaCsgLast}">Dia Last Casing <xsl:value-of select="witsml:diaCsgLast/@uom"/>:</a>
+				<a target="_blank" href="{$url_diaCsgLast}">Dia Last Casing <xsl:value-of select="witsml:diaCsgLast/@uom" />:</a>
 			</td>
 			<td>
-				<xsl:value-of select="witsml:diaCsgLast"/>
+				<xsl:value-of select="witsml:diaCsgLast" />
 			</td>
 			<td class="dark">
@@ -2801,5 +2331,5 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:mdCsgLast"/>
+				<xsl:value-of select="witsml:mdCsgLast" />
 			</td>
 			<td class="dark">
@@ -2807,7 +2337,10 @@
 			</td>
 			<td>
-				<xsl:value-of select="witsml:tvdCsgLast"/>
+				<xsl:value-of select="witsml:tvdCsgLast" />
 			</td>
 		</tr>
+
 	</xsl:template>
+
 </xsl:stylesheet>
+
