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 238)
+++ /projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation_2011_02_07.xsl (revision 238)
@@ -0,0 +1,2738 @@
+<?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"/>
+	<!--  import the schema enables sawsdl:modelReference lookup -->
+	<xsd:import namespace="http://www.witsml.org/schemas/1series" schemaLocation="WITSML_drillReport_profiled_schema_2011_01_29.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_2011_01_29.xsd'"/>
+	<xsl:template match="/">
+		<html>
+			<head>
+				<link href="css_ddrHtmlReport.css" type="text/css" rel="stylesheet"/>
+			</head>
+			<body>
+				<xsl:variable name="urlRDS" select="'http://www.posccaesar.org'"/>
+				<xsl:for-each select="witsml:drillReports/witsml:drillReport">
+					<table width="1000" cellspacing="1" cellpadding="1">
+						<tr class="light">
+							<td>
+								<table id="table1" width="100%">
+									<tr>
+										<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="concat(substring-before(substring(witsml:dTimEnd, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimEnd, 0,17), 'T'))"/>
+										</td>
+									</tr>
+								</table>
+							</td>
+						</tr>
+						<tr height="5px">
+							<td>
+								<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_statusInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='statusInfo']/xsd:sequence"/>
+							<xsl:variable name="url_reportNo">
+								<xsl:value-of select="$element_statusInfo//xsd:element[@name='reportNo']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_dTimEnd">
+								<xsl:value-of select="element_objDrillReport_sequence//xsd:element[@name='dTimEnd']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<td>
+								<table id="table1" width="100%">
+									<!-- Added/changed 18jan2011 -->
+									<tr class="light">
+										<td class="dark">
+											<a target="_blank" href="{$url_reportNo}">Report Number:</a>
+										</td>
+										<td class="light">
+											<xsl:value-of select="witsml:statusInfo/witsml:reportNo" />
+										</td>
+										<td class="dark">
+											<a target="_blank" href="{$url_dTimEnd}">Period:</a>
+										</td>
+										<td colspan="2">
+											<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>
+									<!-- END Added 18jan2011 -->
+									<tr class="light">
+										<xsl:variable name="url_wellboreAlias">
+											<xsl:value-of select="$element_objDrillReport_sequence//xsd:element[@name='wellboreInfo']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<td class="dark">
+											<a target="_blank" href="{$urlRDS}">Wellbore:</a>
+										</td>
+										<td class="light">
+											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+										</td>
+										<td class="dark">
+											<a target="_blank" href="{$urlRDS}">Wellbore Id:</a>
+										</td>
+										<td class="light">
+											<xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD number']/witsml:name"/>
+										</td>
+										<td colspan="2"/>
+									</tr>
+									<tr class="light">
+										<xsl:variable name="url_versionKind">
+											<xsl:value-of select="$element_objDrillReport_sequence//xsd:element[@name='versionKind']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_createDate">
+											<xsl:value-of select="$element_objDrillReport_sequence//xsd:element[@name='createDate']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<td class="dark">
+											<a href="{$url_versionKind}" target="_blank">Status:</a>
+										</td>
+										<td>
+											<xsl:value-of select="witsml:versionKind"/>
+										</td>
+										<td class="dark">
+											<a href="{$url_createDate}" target="_blank">Created Date:</a>
+										</td>
+										<td colspan="3">
+											<xsl:value-of select="concat(substring-before(substring(witsml:createDate, 0,17), 'T'), ' ', substring-after(substring(witsml:createDate, 0,17), 'T'))"/>
+										</td>
+									</tr>
+									<tr height="5px">
+										<td colspan="6"/>
+									</tr>
+									<xsl:apply-templates select="witsml:wellboreInfo"/>
+									<!-- Well Status Info -->
+									<xsl:apply-templates select="witsml:statusInfo"/>
+								</table>
+							</td>
+						</tr>
+						<tr height="5px">
+							<td/>
+						</tr>
+						<tr>
+							<td>
+								<HR/>
+							</td>
+						</tr>
+						<tr>
+							<td class="SectionHead">Summary of Activities (24 Hours)</td>
+						</tr>
+						<tr>
+							<td class="light">
+								<xsl:value-of select="witsml:statusInfo/witsml:sum24Hr"/>
+							</td>
+						</tr>
+						<tr height="5px">
+							<td/>
+						</tr>
+						<tr>
+							<td>
+								<HR/>
+							</td>
+						</tr>
+						<tr>
+							<td class="SectionHead">Summary of Planned Activities (Next 24 Hours)</td>
+						</tr>
+						<tr>
+							<td class="light">
+								<xsl:value-of select="witsml:statusInfo/witsml:forecast24Hr"/>
+							</td>
+						</tr>
+						<!-- Operation Mode -->
+						<xsl:if test="count(witsml:activity) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<HR/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Operation</td>
+							</tr>
+							<tr>
+								<td>
+									<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">
+											<xsl:value-of select="$element_activity//xsd:element[@name='dTimStart']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimEnd">
+											<xsl:value-of select="$element_activity//xsd:element[@name='dTimEnd']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_md">
+											<xsl:value-of select="$element_activity//xsd:element[@name='md']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_proprietaryCode">
+											<xsl:value-of select="$element_activity//xsd:element[@name='proprietaryCode']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_state">
+											<xsl:value-of select="$element_activity//xsd:element[@name='state']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_comments">
+											<xsl:value-of select="$element_activity//xsd:element[@name='comments']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="50" valign="top">
+												<a href="{$url_dTimStart}" target="_blank">Start Time</a>
+											</td>
+											<td width="50" valign="top">
+												<a href="{$url_dTimEnd}" target="_blank">End Time</a>
+											</td>
+											<td width="60" valign="top">
+												<a href="{$url_md}" target="_blank">Start Depth mMD</a>
+											</td>
+											<td width="60" valign="top">
+												<a href="{$url_md}" target="_blank">End Depth mMD</a>
+											</td>
+											<td width="60" valign="top">
+												<a href="{$url_md}" target="_blank">Depth mMD</a>
+											</td>
+											<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">
+												<a href="{$url_comments}" target="_blank">
+													<b>Remark</b>
+												</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:activity">
+											<tr class="light">
+												<td valign="top">
+													<xsl:value-of select="substring-after(substring(witsml:dTimStart, 0, 17), 'T')"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="substring-after(substring(witsml:dTimEnd, 0, 17), 'T')"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:mdHoleStart" />
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:mdHoleEnd"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:md"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:proprietaryCode"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:state"/>
+												</td>
+												<td align="left">
+													<xsl:value-of select="witsml:comments"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+										<!--"witsml:activity" -->
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!--  equipFailureInfo  -->
+						<xsl:if test="count(witsml:equipFailureInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Equipment Failure Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">
+										<xsl:variable name="element_equipFailureInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportEquipFailureInfo']/xsd:sequence"/>
+										<xsl:variable name="url_dTim">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_md">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvd">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_equipClass">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='equipClass']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_eTimMissProduction">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='eTimMissProduction']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimRepair">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='dTimRepair']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_description">
+											<xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="80" valign="top" align="center">
+												<a href="{$url_dTim}" target="_blank">Start</a>
+											</td>
+											<td width="60" valign="top" align="center">
+												<a href="{$url_md}" target="_blank">Depth mMD</a>
+											</td>
+											<td width="60" valign="top" align="center">
+												<a href="{$url_md}" target="_blank">Depth mTVD</a>
+											</td>
+											<td width="120" valign="top" align="center">
+												<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" valign="top" align="center">
+												<a href="{$url_dTimRepair}" target="_blank">Equipment Repaired</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_description}" target="_blank">Equip Failure Description</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:equipFailureInfo">
+											<tr class="light">
+												<td valign="top">
+													<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">
+													<xsl:value-of select="witsml:md"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:tvd"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:equipClass"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:eTimMissProduction"/>
+												</td>
+												<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">
+													<xsl:value-of select="witsml:description"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- Added/Changed 26jan2011 -->
+						<!--  Bit Record -->
+						<xsl:if test="count(witsml:bitRecord) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Bit record</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">
+										<xsl:variable name="element_bitRecord" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_bitRecord']/xsd:sequence"/>
+										<xsl:variable name="url_numBit">
+											<xsl:value-of select="$element_bitRecord//xsd:element[@name='numBit']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_diaBit">
+											<xsl:value-of select="$element_bitRecord//xsd:element[@name='diaBit']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_codeMfg">
+											<xsl:value-of select="$element_bitRecord//xsd:element[@name='codeMfg']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_manufacturer">
+											<xsl:value-of select="$element_bitRecord//xsd:element[@name='manufacturer']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_eTimOpBit">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='eTimOpBit']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdHoleStart">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='mdHoleStart']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdHoleStop">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='mdHoleStop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_ropAv">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='ropAv']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTotHoleMade">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='mdTotHoleMade']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_totHrsDrilled">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='totHrsDrilled']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_totRop">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='totRop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dullGrade">
+											<xsl:value-of select="$element_bitRecord/bitRun//xsd:element[@name='dullGrade']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<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>
+											</td>
+											<td align="center" width="50" valign="top">
+												<a target="_blank" href="{$url_numBit}">Run No</a>
+											</td>
+											<td align="center" width="50" 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="50" valign="top">
+												<a target="_blank" href="{$url_eTimOpBit}">Hours drilled<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:eTimOpBit/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="50" valign="top">
+												<a target="_blank" href="{$url_mdHoleStart}">MD start<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="50" valign="top">
+												<a target="_blank" href="{$url_mdHoleStop}">MD end<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdHoleStop}">Hole made (last 24H)<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_eTimOpBit}">Hours drilled (last 24H)<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:eTimOpBit/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_ropAv}">ROP<br />(last 24H)<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdTotHoleMade}">Total<br />hole made<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_totHrsDrilled}">Total hours drilled<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_totRop}">Total ROP<br />
+													<xsl:value-of select="witsml:bitRecord/witsml:bitRun/witsml:totRop/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="120" valign="top">
+												<a target="_blank" href="{$url_dullGrade}">Dull grade</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:bitRecord">
+											<tr class="light">
+												<td align="center">
+													<xsl:value-of select="witsml:diaBit"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:numBit"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:codeMfg"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:manufacturer"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleStart"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleStop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleStop - witsml:bitRun/witsml:mdHoleStart"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:ropAv"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:totRop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:dullGrade"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- Added/Changed 22feb2011 -->
+						<!--  witsml:pipe -->
+						<xsl:if test="count(witsml:casing_liner_tubing) > 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Casing/Liner/Tubing information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table2">
+										<xsl:variable name="element_pipe" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='casing_liner_tubing']/xsd:sequence"/>
+										<xsl:variable name="url_type">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='type']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_casingType">
+											<xsl:value-of select="$element_pipe/casing_liner_tubing_run//xsd:element[@name='casingType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimStart">
+											<xsl:value-of select="$element_pipe/casing_liner_tubing_run//xsd:element[@name='dTimStart']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimEnd">
+											<xsl:value-of select="$element_pipe/casing_liner_tubing_run//xsd:element[@name='dTimEnd']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_od">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='od']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_id">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='id']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_weight">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='weight']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_grade">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='grade']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_connection">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='connection']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_length">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='length']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_pipe//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_description">
+											<xsl:value-of select="$element_pipe/casing_liner_tubing_run//xsd:element[@name='description']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td align="center" valign="top">
+												<a target="_blank" href="{$url_type}">Type of pipe</a>
+											</td>
+											<td align="center" valign="top">
+												<a target="_blank" href="{$url_casingType}">Casing type</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_dTimStart}">Run time</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_od}">Nominal outside diameter<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:od/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="100" valign="top">
+												<a target="_blank" href="{$url_id}">Nominal inside diameter<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:id/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_weight}">Nominal Weight<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:weight/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_grade}">Nominal Grade</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_connection}">Nominal Connection</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_length}">Length<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:length/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdTop}">MD Top/Hangar<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:mdTop/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdBottom}">MD Bottom/Shoe<br />
+													<xsl:value-of select="witsml:casing_liner_tubing/witsml:mdBottom/@uom"/>
+												</a>
+											</td>
+											<td align="left" width="100" valign="top">
+												<a target="_blank" href="{$url_description}">Description</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:casing_liner_tubing">
+											<tr class="light">
+												<td align="center">
+													<xsl:variable name="element_pipeType" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='tubularTypes']/xsd:restriction"/>
+													<xsl:variable name="pipeType" select="witsml:type" />
+													<xsl:value-of select="$element_pipeType//xsd:enumeration[@value=$pipeType]"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:casingType"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimStart, 0, 17), 'T')"/>
+												</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:mdTop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:mdBottom"/>
+												</td>
+												<td align="left">
+													<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:description"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- witsml:cement -->
+						<xsl:if test="count(witsml:cementStage) > 0">
+							<xsl:for-each select="witsml:cementStage">
+								<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='cs_cementStage']/xsd:sequence"/>
+											<xsl:variable name="url_dTimPumpStart">
+												<xsl:value-of select="$element_cement//xsd:element[@name='dTimPumpStart']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_dTimPumpEnd">
+												<xsl:value-of select="$element_cement//xsd:element[@name='dTimPumpEnd']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_jobType">
+												<xsl:value-of select="$element_cement//xsd:element[@name='jobType']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_casingStrDia">
+												<xsl:value-of select="$element_cement//xsd:element[@name='casingStrDia']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_topPlug">
+												<xsl:value-of select="$element_cement//xsd:element[@name='topPlug']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_botPlug">
+												<xsl:value-of select="$element_cement//xsd:element[@name='botPlug']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_plugBumped">
+												<xsl:value-of select="$element_cement//xsd:element[@name='plugBumped']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_presBump">
+												<xsl:value-of select="$element_cement//xsd:element[@name='presBump']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_floatHeld">
+												<xsl:value-of select="$element_cement//xsd:element[@name='floatHeld']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_eTimPresHeld">
+												<xsl:value-of select="$element_cement//xsd:element[@name='eTimPresHeld']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_annFlowAfter">
+												<xsl:value-of select="$element_cement//xsd:element[@name='annFlowAfter']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_volReturns">
+												<xsl:value-of select="$element_cement//xsd:element[@name='volReturns']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_reciprocated">
+												<xsl:value-of select="$element_cement//xsd:element[@name='reciprocated']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_rotated">
+												<xsl:value-of select="$element_cement//xsd:element[@name='rotated']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<xsl:variable name="url_comments">
+												<xsl:value-of select="$element_cement//xsd:element[@name='comments']/@sawsdl:modelReference"/>
+											</xsl:variable>
+											<tr>
+												<td align="center" valign="top">
+													<a target="_blank" href="{$url_dTimPumpStart}">Start Time</a>
+												</td>
+												<td align="center" valign="top">
+													<a target="_blank" href="{$url_dTimPumpEnd}">End Time</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_jobType}">Job Type</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_casingStrDia}">Casing string diameter</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_topPlug}">Top plug used</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_botPlug}">Bottom plug used</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_plugBumped}">Plug bumped</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_presBump}">Plug bump pressure <xsl:value-of select="witsml:presBump/@uom"/>
+													</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_floatHeld}">Float held</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_eTimPresHeld}">Pressure release time</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_annFlowAfter}">Full returns</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_volReturns}">Cement volume returns <xsl:value-of select="witsml:volReturns/@uom"/>
+													</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_reciprocated}">Reciprocated</a>
+												</td>
+												<td align="center" width="50" valign="top">
+													<a target="_blank" href="{$url_rotated}">Rotated</a>
+												</td>
+												<td align="left" width="220" valign="top">
+													<a target="_blank" href="{$url_comments}">Comments</a>
+												</td>
+											</tr>
+											<tr class="light">
+												<td align="center">
+													<xsl:value-of select="substring-after(substring(witsml:dTimPumpStart, 0, 17), 'T')"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="substring-after(substring(witsml:dTimPumpEnd, 0, 17), 'T')"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:jobType"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:casingStrDia"/>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:topPlug='true' or witsml:topPlug='1'">yes</xsl:if>
+													<xsl:if test="witsml:topPlug='false' or witsml:topPlug='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:botPlug='true' or witsml:botPlug='1'">yes</xsl:if>
+													<xsl:if test="witsml:botPlug='false' or witsml:botPlug='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:plugBumped='true' or witsml:plugBumped='1'">yes</xsl:if>
+													<xsl:if test="witsml:plugBumped='false' or witsml:plugBumped='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:presBump"/>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:floatHeld='true' or witsml:floatHeld='1'">yes</xsl:if>
+													<xsl:if test="witsml:floatHeld='false' or witsml:floatHeld='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<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">
+													<xsl:if test="witsml:annFlowAfter='true' or witsml:annFlowAfter='1'">yes</xsl:if>
+													<xsl:if test="witsml:annFlowAfter='false' or witsml:annFlowAfter='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:volReturns"/>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:reciprocated='true' or witsml:reciprocated='1'">yes</xsl:if>
+													<xsl:if test="witsml:reciprocated='false' or witsml:reciprocated='0'">no</xsl:if>
+												</td>
+												<td align="center">
+													<xsl:if test="witsml:rotated='true' or witsml:rotated='1'">yes</xsl:if>
+													<xsl:if test="witsml:rotated='false' or witsml:rotated='0'">no</xsl:if>
+												</td>
+												<td align="left">
+													<xsl:value-of select="witsml:comments"/>
+												</td>
+											</tr>
+										</table>
+									</td>
+								</tr>
+								<!--  witsml:cementingFluid -->
+								<xsl:if test="count(witsml:cementingFluid) > 0">
+									<tr height="5px">
+										<td/>
+									</tr>
+									<tr>
+										<td>
+										</td>
+									</tr>
+									<tr>
+										<td class="SectionHead">Cementing Fluid Details</td>
+									</tr>
+									<xsl:variable name="element_cementingFluid" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cementingFluid']/xsd:sequence"/>
+									<xsl:variable name="url_typeFluid">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='mudClass']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_descFluid">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='descFluid']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_density">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='density']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_volPumped">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='volPumped']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_yp">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='yp']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_ratioMixWater">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='ratioMixWater']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_pcFreeWater">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='pcFreeWater']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_eTimThickening">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='eTimThickening']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<xsl:variable name="url_comments">
+										<xsl:value-of select="$element_cementingFluid//xsd:element[@name='comments']/@sawsdl:modelReference"/>
+									</xsl:variable>
+									<tr>
+										<td>
+											<table id="table2">
+												<tr>
+													<td align="center" width="80" valign="top">
+														<a target="_blank" href="{$url_typeFluid}">Fluid Type</a>
+													</td>
+													<td align="center" width="50" valign="top">
+														<a target="_blank" href="{$url_volPumped}">Volume Pumped <xsl:value-of select="witsml:cementingFluid/witsml:volPumped/@uom"/>
+														</a>
+													</td>
+													<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="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="50" valign="top">
+														<a target="_blank" href="{$url_ratioMixWater}">Mix Water Ratio <xsl:value-of select="witsml:cementingFluid/witsml:ratioMixWater/@uom"/>
+														</a>
+													</td>
+													<td align="center" width="50" valign="top">
+														<a target="_blank" href="{$url_pcFreeWater}">Free Water <xsl:value-of select="witsml:cementingFluid/witsml:pcFreeWater/@uom"/>
+														</a>
+													</td>
+													<td align="center" width="50" valign="top">
+														<a target="_blank" href="{$url_eTimThickening}">Thick Time <xsl:value-of select="witsml:cementingFluid/witsml:eTimThickening/@uom"/>
+														</a>
+													</td>
+													<td align="left" width="210" valign="top">
+														<a target="_blank" href="{$url_descFluid}">Fluid Description</a>
+													</td>
+													<td align="left" width="230" valign="top">
+														<a target="_blank" href="{$url_comments}">Comments</a>
+													</td>
+
+												</tr>
+												<xsl:for-each select="witsml:cementingFluid">
+													<tr class="light">
+														<td align="center">
+															<xsl:value-of select="witsml:typeFluid"/>
+														</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:yp"/>
+														</td>
+														<td align="center">
+															<xsl:value-of select="witsml:ratioMixWater"/>
+														</td>
+														<td align="center">
+															<xsl:value-of select="witsml:pcFreeWater"/>
+														</td>
+														<td align="center">
+															<xsl:value-of select="witsml:eTimThickening"/>
+														</td>
+														<td align="left">
+															<xsl:value-of select="witsml:descFluid"/>
+														</td>
+														<td align="left">
+															<xsl:value-of select="witsml:comments"/>
+														</td>
+													</tr>
+												</xsl:for-each>
+											</table>
+										</td>
+									</tr>
+								</xsl:if>
+							</xsl:for-each>
+						</xsl:if>
+						<!-- END Added/changed 22feb2011 -->
+						<!--  porePressure -->
+						<xsl:if test="count(witsml:porePressure) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Pore Pressure</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table2">
+										<xsl:variable name="element_drillReportPorePressure" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPorePressure']/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="{$url_readingKind}">Reading</a>
+											</td>
+											<td align="center" width="100" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_equivalentMudWeight}" target="_blank">Equ Mud Weight</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:porePressure/witsml:equivalentMudWeight/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td align="center" valign="top">
+												<a target="_blank" href="{$url_dTim}">Time</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_md}">Depth mMD</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_tvd}">Depth mTVD</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:porePressure">
+											<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="concat(substring-before(substring(witsml:dTim, 0,17), 'T'), ' ', substring-after(substring(witsml:dTim, 0,17), 'T'))"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:md"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tvd"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!--  surveyStation -->
+						<xsl:if test="count(witsml:surveyStation) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Survey Station</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table2">
+										<xsl:variable name="element_drillReportSurveyStation" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportSurveyStation']/xsd:sequence"/>
+										<xsl:variable name="url_md">
+											<xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='md']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvd">
+											<xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_incl">
+											<xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='incl']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_azi">
+											<xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='azi']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_md}">Depth mMD</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_tvd}">Depth mTVD</a>
+											</td>
+											<td align="center" width="70" valign="top">
+												<a target="_blank" href="{$url_incl}">Inclination deg</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_azi}">Azimuth deg</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:surveyStation">
+											<tr class="light" align="center">
+												<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"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!--  logInfo -->
+						<xsl:if test="count(witsml:logInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Log Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table2">
+										<xsl:variable name="element_drillReportLogInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLogInfo']/xsd:sequence"/>
+										<xsl:variable name="url_serviceCompany">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='serviceCompany']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_runNumber">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='runNumber']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tool">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tool']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tempBHCT">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHCT']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tempBHST">
+											<xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHST']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td colspan="2" align="left">
+												<a target="_blank" href="{$url_serviceCompany}">Logging company:</a>
+											</td>
+											<td colspan="6" class="light">
+												<xsl:value-of select="witsml:logInfo/witsml:serviceCompany"/>
+											</td>
+										</tr>
+										<tr>
+											<td align="center" width="30" valign="top">
+												<a target="_blank" href="{$url_runNumber}">Run No</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdTop}">Depth Top mMD</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$url_mdBottom}">Depth Bottom mMD</a>
+											</td>
+											<td align="center" width="100" valign="top">
+												<a target="_blank" href="{$url_tool}">Tool</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<table id="two">
+													<tr>
+														<td align="center">
+															<a href="{$url_tempBHCT}" target="_blank">BHCT</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:logInfo/witsml:tempBHCT/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td align="center" width="60" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_tempBHST}" target="_blank">BHST</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:logInfo/witsml:tempBHST/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<!-- 
+											<td align="center" width="80">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center"><a href="{$urlRDS}" target="_blank">Ellapsed time since circulation stopped</a></td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead"><xsl:value-of select="witsml:logInfo/witsml:eTimStatic/@uom" /></td>
+													</tr>
+												</table> 
+											</td>
+											<td align="center" width="100">
+												<table <table id="two" width="100%">
+													<tr>
+														<td align="center"><a href="{$urlRDS}" target="_blank">Depth to the temperature measurement tool</a></td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">(mMD</td>
+													</tr>
+												</table> 
+											</td>
+											 -->
+										</tr>
+										<xsl:for-each select="witsml:logInfo">
+											<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"/>
+												</td>
+												<!-- 
+												<td align="center">
+													<xsl:value-of select="witsml:eTimStatic" />
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:mdTempTool" />
+												</td>
+												 -->
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- Changed 19jan2011 -->
+						<!--  coreInfo -->
+						<xsl:if test="count(witsml:coreInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Core Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table2">
+										<xsl:variable name="element_drillReportCoreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportCoreInfo']/xsd:sequence"/>
+										<xsl:variable name="url_coreNumber">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreNumber']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_lenRecovered">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenRecovered']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_recoverPc">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='recoverPc']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_lenBarrel">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenBarrel']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_innerBarrelType">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='innerBarrelType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_coreDescription">
+											<xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreDescription']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="40" align="center" valign="top">
+												<a target="_blank" href="{$url_coreNumber}">Core No</a>
+											</td>
+											<td width="60" align="center" valign="top">
+												<a target="_blank" href="{$url_mdTop}">Depth Top mMD</a>
+											</td>
+											<td width="60" align="center" valign="top">
+												<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">
+												<table id="two">
+													<tr>
+														<td align="center"><a href="{$url_lenRecovered}" target="_blank">Core length</a></td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">m</td>
+													</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>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">%</td>
+													</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>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">m</td>
+													</tr>
+												</table> 
+											</td>-->
+											<td width="80" align="center" valign="top">
+												<a target="_blank" href="{$url_innerBarrelType}">Inner barrel type</a>
+											</td>
+											<td align="left" valign="top">
+												<a target="_blank" href="{$url_coreDescription}">Description</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:coreInfo">
+											<tr class="light">
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:coreNumber"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdTop"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdBottom"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:lenRecovered"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:recoverPc"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:lenBarrel"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:innerBarrelType"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:coreDescription"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- END Changed 19jan2011 -->
+						<!--  wellTestInfo -->
+						<xsl:if test="count(witsml:wellTestInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<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">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_testNumber">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testNumber']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_testType">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_chokeOrificeSize">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chokeOrificeSize']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_densityOil">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='densityOil']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_flowRateOil">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateOil']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_flowRateGas">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateGas']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_flowRateWater">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateWater']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presShutIn">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presShutIn']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presFlowing">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presFlowing']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presBottom">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_gasOilRatio">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='gasOilRatio']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_waterOilRatio">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='waterOilRatio']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_chloride">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chloride']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_carbonDioxide">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='carbonDioxide']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_hydrogenSulfide">
+											<xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='hydrogenSulfide']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td align="left" valign="top">
+												<a href="{$url_dTim}" target="_blank">Time</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_testNumber}" target="_blank">Test No.</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_testType}" target="_blank">Type</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_mdTop}" target="_blank">Depth Top mMD</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_mdBottom}" target="_blank">Depth Bottom mMD</a>
+											</td>
+											<!-- 
+											<td align="left"><a href="{$urlRDS}" target="_blank">TVD to Top</a></td>
+											<td align="left"><a href="{$urlRDS}" target="_blank">TVD to Bottom</a></td>
+											 -->
+											<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>-->
+											<td align="left" valign="top">
+												<a href="{$url_densityOil}" target="_blank">Density Crude Oil <xsl:value-of select="witsml:wellTestInfo/witsml:densityOil/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_flowRateOil}" target="_blank">Oil Flow Rate <xsl:value-of select="witsml:wellTestInfo/witsml:flowRateOil/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_flowRateGas}" target="_blank">Gas Flow Rate <xsl:value-of select="witsml:wellTestInfo/witsml:flowRateGas/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_flowRateWater}" target="_blank">Water Flow Rate <xsl:value-of select="witsml:wellTestInfo/witsml:flowRateWater/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_presShutIn}" target="_blank">Shut in Pressure <xsl:value-of select="witsml:wellTestInfo/witsml:presShutIn/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_presFlowing}" target="_blank">Flow Pressure <xsl:value-of select="witsml:wellTestInfo/witsml:presFlowing/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_presBottom}" target="_blank">Bottom Hole Pressure <xsl:value-of select="witsml:wellTestInfo/witsml:presBottom/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_gasOilRatio}" target="_blank">Gas Oil Ratio <xsl:value-of select="witsml:wellTestInfo/witsml:gasOilRatio/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_waterOilRatio}" target="_blank">Water Oil Ratio <xsl:value-of select="witsml:wellTestInfo/witsml:waterOilRatio/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_chloride}" target="_blank">Chloride Content <xsl:value-of select="witsml:wellTestInfo/witsml:chloride/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_carbonDioxide}" target="_blank">CO2 Content <xsl:value-of select="witsml:wellTestInfo/witsml:carbonDioxide/@uom"/>
+												</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_hydrogenSulfide}" target="_blank">H2S Content <xsl:value-of select="witsml:wellTestInfo/witsml:hydrogenSulfide/@uom"/>
+												</a>
+											</td>
+											<!-- 
+											<td align="left"><a href="{$urlRDS}" target="_blank">Total Oil Vol Produced <xsl:value-of select="witsml:wellTestInfo/witsml:volOilTotal/@uom"/></a></td>
+											<td align="left"><a href="{$urlRDS}" target="_blank">Total Gas Vol Produced <xsl:value-of select="witsml:wellTestInfo/witsml:volGasTotal/@uom"/></a></td>
+											<td align="left"><a href="{$urlRDS}" target="_blank">Total Water Vol Produced <xsl:value-of select="witsml:wellTestInfo/witsml:volWaterTotal/@uom"/></a></td>
+											<td align="left"><a href="{$urlRDS}" target="_blank">Total Oil Vol Stored <xsl:value-of select="witsml:wellTestInfo/witsml:volOilStored/@uom"/></a></td>
+											 -->
+										</tr>
+										<xsl:for-each select="witsml:wellTestInfo">
+											<tr class="light">
+												<td>
+													<xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:testNumber"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:testType"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:mdTop"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:mdBottom"/>
+												</td>
+												<!-- 
+												<td><xsl:value-of select="witsml:tvdTop"/> <xsl:value-of select="witsml:tvdTop/@uom"/></td>
+												<td><xsl:value-of select="witsml:tvdBottom"/> <xsl:value-of select="witsml:tvdBottom/@uom"/></td>
+												 -->
+												<td>
+													<xsl:value-of select="witsml:chokeOrificeSize"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:densityOil"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:flowRateOil"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:flowRateGas"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:flowRateWater"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:presShutIn"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:presFlowing"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:presBottom"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:gasOilRatio"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:waterOilRatio"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:chloride"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:carbonDioxide"/>
+												</td>
+												<td>
+													<xsl:value-of select="witsml:hydrogenSulfide"/>
+												</td>
+												<!-- 
+												<td><xsl:value-of select="witsml:volOilTotal"/></td>
+												<td><xsl:value-of select="witsml:volGasTotal"/></td>
+												<td><xsl:value-of select="witsml:volWaterTotal"/></td>
+												<td><xsl:value-of select="witsml:volOilStored"/></td>
+												 -->
+											</tr>
+										</xsl:for-each>
+										<!--"witsml:wellTestInfo" -->
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!--  Foramtion Test Info -->
+						<xsl:if test="count(witsml:formTestInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<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">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presPore">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='presPore']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_goodSealm">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='goodSeal']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdSample">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='mdSample']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dominateComponent">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='dominateComponent']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_densityHC">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='densityHC']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_volumeSample">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='volumeSample']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_description">
+											<xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="60" align="center" valign="top">
+												<a href="{$url_md}" target="_blank">Depth mMD</a>
+											</td>
+											<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" 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">Dominant 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">
+												<a href="{$url_description}" target="_blank">Description</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:formTestInfo">
+											<tr class="light">
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:md"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:presPore"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:if test="witsml:goodSeal='true' or witsml:goodSeal='1'">yes</xsl:if>
+													<xsl:if test="witsml:goodSeal='false' or witsml:goodSeal='0'">no</xsl:if>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdSample"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:dominateComponent"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:densityHC"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:volumeSample"/>
+												</td>
+												<td align="left">
+													<xsl:value-of select="witsml:description"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+										<!--"witsml:formTestInfo" -->
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!--  stratInfo  -->
+						<xsl:if test="count(witsml:stratInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<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">
+											<xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdTop">
+											<xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_description">
+											<xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="60" align="center" valign="top">
+												<a href="{$url_mdTop}" target="_blank">Depth to Top of Formation mMD</a>
+											</td>
+											<td width="60" align="center" valign="top">
+												<a href="{$url_tvdTop}" target="_blank">Depth to Top of Formation mTVD</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_description}" target="_blank">
+													<b>Formation Name</b>
+												</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:stratInfo">
+											<tr class="light">
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdTop"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:tvdTop"/>
+												</td>
+												<td align="left">
+													<xsl:value-of select="witsml:description"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- Changed 18jan2011 -->
+						<!--  lithShowInfo -->
+						<xsl:if test="count(witsml:lithShowInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<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">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdTop">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdBottom">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_show">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='show']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_lithology">
+											<xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='lithology']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="60" align="center" valign="top">
+												<a href="{$url_mdTop}" target="_blank">Start Depth mMD</a>
+											</td>
+											<td width="60" align="center" valign="top">
+												<a href="{$url_mdBottom}" target="_blank">End Depth mMD</a>
+											</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">
+												<a href="{$url_show}" target="_blank">Shows Description</a>
+											</td>
+											<td align="left" valign="top">
+												<a href="{$url_lithology}" target="_blank">
+													<b>Lithology Description</b>
+												</a>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:lithShowInfo">
+											<tr class="light">
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdTop"/>
+												</td>
+												<td valign="top" align="center">
+													<xsl:value-of select="witsml:mdBottom"/>
+												</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>
+												<td valign="top" align="center">
+													<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"/>
+												</td>
+												<td valign="top">
+													<xsl:value-of select="witsml:lithology"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+										<!--"witsml:lithShowInfo" -->
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- END Changed 18jan2011 -->
+						<!--  controlIncidentInfo  -->
+						<xsl:for-each select="witsml:controlIncidentInfo">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Well Control Incident</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">
+										<xsl:variable name="element_drillReportControlIncidentInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportControlIncidentInfo']/xsd:sequence"/>
+										<xsl:variable name="url_dTim">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdInflow">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdInflow']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdInflow">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tvdInflow']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_eTimLost">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='eTimLost']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimRegained">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTimRegained']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBit">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdBit']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_wtMud">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='wtMud']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_porePressure">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='porePressure']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdCsgLast">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_volMudGained">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='volMudGained']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presShutInCasing">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInCasing']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_presShutInDrill">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInDrill']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_incidentType">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='incidentType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_killingType">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='killingType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_formation">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='formation']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tempBottom">
+											<xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tempBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="60" align="center" valign="top" class="ColHead">
+												<a href="{$url_dTim}" target="_blank">Date</a>
+											</td>
+											<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>
+											<!-- 
+													<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="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" 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="80" align="center" valign="top" class="ColHead">
+												<a href="{$url_killingType}" target="_blank">Killing Procd</a>
+											</td>
+											<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" 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> -->
+										</tr>
+										<!--  End header -->
+										<tr class="light">
+											<td valign="top" align="center">
+												<xsl:value-of select="substring-before(witsml:dTim, 'T')"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:mdInflow"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:tvdInflow"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:eTimLost"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="substring-after(substring(witsml:dTimRegained, 0, 17), 'T')"/>
+											</td>
+											<!-- <td valign="top"><xsl:value-of select="witsml:diaBit"/></td>  -->
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:mdBit"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:wtMud"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:porePressure"/>
+											</td>
+											<!-- <td valign="top"><xsl:value-of select="witsml:diaCsgLast"/></td>  -->
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:mdCsgLast"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:volMudGained"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:presShutInCasing"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:presShutInDrill"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:incidentType"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:killingType"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:formation"/>
+											</td>
+											<td valign="top" align="center">
+												<xsl:value-of select="witsml:tempBottom"/>
+											</td>
+											<!-- <td valign="top"><xsl:value-of select="witsml:presMaxChoke"/></td>  -->
+										</tr>
+										<tr>
+											<td/>
+											<td align="left" colspan="16" class="light">
+												<xsl:value-of select="witsml:description"/>
+											</td>
+										</tr>
+									</table>
+								</td>
+							</tr>
+						</xsl:for-each>
+						<!-- Changed 19jan2011 -->
+						<!-- perfInfo  -->
+						<xsl:if test="count(witsml:perfInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<td class="SectionHead">Perforation Information</td>
+							</tr>
+							<tr>
+								<td>
+									<table id="table1">
+										<xsl:variable name="element_drillReportPerfInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPerfInfo']/xsd:sequence"/>
+										<xsl:variable name="url_dTimOpen">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimOpen']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_dTimClose">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimClose']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdTop">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdBottom">
+											<xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td width="110" align="center" valign="top">
+												<a href="{$url_dTimOpen}" target="_blank">Time of Opening Well Perf</a>
+											</td>
+											<td width="110" align="center" valign="top">
+												<a href="{$url_dTimClose}" target="_blank">Time of Closing Well Perf</a>
+											</td>
+											<td width="110" align="center" valign="top">
+												<a href="{$url_dTimClose}" target="_blank">Duration Well Perf</a>
+											</td>
+											<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>
+										<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="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">
+													<xsl:value-of select="substring-after($duration, 'PT')"/>
+												</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:tvdTop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tvdBottom"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+						<!-- END Changed 19jan2011 -->
+						<!--  gasReadingInfo -->
+						<xsl:if test="count(witsml:gasReadingInfo) &gt; 0">
+							<tr height="5px">
+								<td/>
+							</tr>
+							<tr>
+								<td>
+									<hr/>
+								</td>
+							</tr>
+							<tr>
+								<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">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_readingType">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='readingType']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdTop">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_mdBottom">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdTop">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_tvdBottom">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_gasHigh">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasHigh']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_gasLow">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasLow']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_meth">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='meth']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_eth">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='eth']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_prop">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='prop']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_ibut">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ibut']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<xsl:variable name="url_ipent">
+											<xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ipent']/@sawsdl:modelReference"/>
+										</xsl:variable>
+										<tr>
+											<td align="center" valign="top">
+												<a href="{$url_dTim}" target="_blank">Time</a>
+											</td>
+											<td align="center" valign="top">
+												<a href="{$url_readingType}" target="_blank">Class</a>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_mdTop}" target="_blank">Depth to Top</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">mMD</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_mdBottom}" target="_blank">Depth to Bottom</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">mMD</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_tvdTop}" target="_blank">Depth to Top</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_tvdBottom}" target="_blank">Depth to Bottom</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_gasHigh}" target="_blank">Highest Gas</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:gasHigh/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_gasLow}" target="_blank">Lowest Gas</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:gasLow/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_meth}" target="_blank">C1</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:meth/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_eth}" target="_blank">C2</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:eth/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_prop}" target="_blank">C3</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center">
+															<a href="{$url_prop}" target="_blank">
+																<xsl:value-of select="witsml:gasReadingInfo/witsml:prop/@uom"/>
+															</a>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_ibut}" target="_blank">IC4</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:ibut/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+											<td width="60" align="center" valign="top">
+												<table id="two" width="100%">
+													<tr>
+														<td align="center">
+															<a href="{$url_ipent}" target="_blank">IC5</a>
+														</td>
+													</tr>
+													<tr>
+														<td align="center" class="ColHead">
+															<xsl:value-of select="witsml:gasReadingInfo/witsml:ipent/@uom"/>
+														</td>
+													</tr>
+												</table>
+											</td>
+										</tr>
+										<xsl:for-each select="witsml:gasReadingInfo">
+											<tr class="light">
+												<td align="center">
+													<xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:readingType"/>
+												</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:tvdTop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:tvdBottom"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:gasHigh"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:gasLow"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:meth"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:eth"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:prop"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:ibut"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:ipent"/>
+												</td>
+											</tr>
+										</xsl:for-each>
+									</table>
+								</td>
+							</tr>
+						</xsl:if>
+					</table>
+				</xsl:for-each>
+			</body>
+		</html>
+	</xsl:template>
+	<xsl:template match="witsml:wellboreInfo">
+		<xsl:variable name="urlRDS" select="'http://www.posccaesar.org'"/>
+		<xsl:variable name="element_drillReportWellboreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellboreInfo']/xsd:sequence"/>
+		<xsl:variable name="element_drillReportStatusInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStatusInfo']/xsd:sequence"/>
+		<xsl:variable name="url_operator">
+			<xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='operator']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_drillContractor">
+			<xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='drillContractor']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_rigAlias">
+			<xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='rigAlias']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<!-- xsl:variable name="url_namingSystem"><xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='namingSystem']/@sawsdl:modelReference"/></xsl:variable -->
+		<xsl:variable name="url_dTimSpud">
+			<xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='dTimSpud']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_dateDrillComplete">
+			<xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='dateDrillComplete']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_elevKelly">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='elevKelly']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_waterDepth">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='waterDepth']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_operator}">Operator:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:operator"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_drillContractor}">Drilling contractor:</a>
+			</td>
+			<td colspan="3">
+				<xsl:value-of select="witsml:drillContractor"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a href="{$url_rigAlias}" target="_blank">Rig Name:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD Name']/witsml:name"/>
+			</td>
+			<td class="dark">
+				<a href="{$url_rigAlias}" target="_blank">NPD Rig Id:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:rigAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a href="{$url_elevKelly}" target="_blank">Elevation RKB-MSL <xsl:value-of select="../witsml:statusInfo/witsml:elevKelly/@uom"/>:</a>
+			</td>
+			<td>
+				<xsl:value-of select="../witsml:statusInfo/witsml:elevKelly"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_waterDepth}">Water Depth MSL <xsl:value-of select="../witsml:statusInfo/witsml:waterDepth/@uom" />:</a>
+			</td>
+			<td class="light">
+				<xsl:value-of select="../witsml:statusInfo/witsml:waterDepth"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_dTimSpud}">Spud Date:</a>
+			</td>
+			<td>
+				<xsl:value-of select="substring-before(witsml:dTimSpud, 'T')"/>
+			</td>
+			<!-- 
+			<td class="dark"><a target="_blank" href="{url_dTimPreSpud}">Pre Spud Time:</a></td>
+			<td><xsl:value-of select="substring-before(witsml:dTimPreSpud, 'T')" /></td>
+			 -->
+			<td class="dark">
+				<a target="_blank" href="{$url_dateDrillComplete}">Date Well Complete:</a>
+			</td>
+			<td class="light">
+				<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"/>
+		<xsl:variable name="url_typeWellbore">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='typeWellbore']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_mdKickoff">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdKickoff']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_tvdKickoff">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdKickoff']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_mdPlugTop">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdPlugTop']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_md">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_tvd">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_distDrill">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='distDrill']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_ropCurrent">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='ropCurrent']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_diaHole">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='diaHole']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_presTestType">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='presTestType']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_strengthForm">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='strengthForm']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_mdStrengthForm">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdStrengthForm']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_tvdStrengthForm">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdStrengthForm']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_diaCsgLast">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='diaCsgLast']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_mdCsgLast">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_tvdCsgLast">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdCsgLast']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_tightWell">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tightWell']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_hpht">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='hpht']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_avgPresBH">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='avgPresBH']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_expTempBH">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='expTempBH']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<xsl:variable name="url_fixedRig">
+			<xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='fixedRig']/@sawsdl:modelReference"/>
+		</xsl:variable>
+		<!-- Added 18jan2011 -->
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_tightWell}">Tight well:</a>
+			</td>
+			<td class="light">
+				<xsl:if test="witsml:tightWell='true' or witsml:tightWell='1'">yes</xsl:if>
+				<xsl:if test="witsml:tightWell='false' or witsml:tightWell='0'">no</xsl:if>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_hpht}">High Pressure - High Temperature:</a>
+			</td>
+			<td class="light">
+				<xsl:if test="witsml:hpht='true' or witsml:hpht='1'">yes</xsl:if>
+				<xsl:if test="witsml:hpht='false' or witsml:hpht='0'">no</xsl:if>
+			</td>
+		</tr>
+		<!-- END Added 18jan2011 -->
+		<!-- Added 26jan2011 -->
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_avgPresBH}">Pressure <xsl:value-of select="witsml:avgPresBH/@uom" />:</a>
+			</td>
+			<td class="light">
+				<xsl:value-of select="witsml:avgPresBH"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_expTempBH}">Temperature <xsl:value-of select="witsml:expTempBH/@uom" />:</a>
+			</td>
+			<td class="light">
+				<xsl:value-of select="witsml:expTempBH"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<!-- END Added 26jan2011 -->
+			<!-- Added 07feb2011 -->
+			<td class="dark">
+				<a target="_blank" href="{$url_fixedRig}">Fixed rig:</a>
+			</td>
+			<td class="light">
+				<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" />
+				<xsl:value-of select="$element_rigTypes//xsd:enumeration[@value=$element_rigType]" />-->
+			</td>
+			<!-- END Added 07feb2011 -->
+			<!-- wellbore type and kick off -->
+			<td class="dark">
+				<a target="_blank" href="{$url_typeWellbore}">Wellbore type:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:typeWellbore"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_mdKickoff}">Depth at Kick Off mMD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:mdKickoff"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_tvdKickoff}">Depth at Kick Off mTVD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:tvdKickoff"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_md}">Depth mMD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:md"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_tvd}">Depth mTVD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:tvd"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td>
+				<a target="_blank" href="{$url_mdPlugTop}">Plug Back Depth mMD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:mdPlugTop"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_distDrill}">Dist Drilled <xsl:value-of select="witsml:distDrill/@uom"/>:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:distDrill"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<!-- 
+			<td class="dark"><a target="_blank" href="{$urlRDS}">Depth planned mMD:</a></td>
+			<td><xsl:value-of select="witsml:mdPlanned" /></td>
+			 -->
+			<td class="dark">
+				<a target="_blank" href="{$url_ropCurrent}">Penetration Rate <xsl:value-of select="witsml:ropCurrent/@uom"/>:</a>
+			</td>
+			<td class="light">
+				<xsl:value-of select="witsml:ropCurrent"/>
+			</td>
+			<!-- hole dia -->
+			<td width="160">
+				<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"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td>
+				<a target="_blank" href="{$url_presTestType}">Pressure Test Type:</a>
+			</td>
+			<td class="light">
+				<xsl:value-of select="witsml:presTestType"/>
+			</td>
+			<!-- formation strength and  pressure test -->
+			<td width="160">
+				<a target="_blank" href="{$url_strengthForm}">Formation Strength <xsl:value-of select="witsml:strengthForm/@uom"/>:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:strengthForm"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td width="215">
+				<a target="_blank" href="{$url_mdStrengthForm}">Depth At Formation Strength mMD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:mdStrengthForm"/>
+			</td>
+			<td>
+				<a target="_blank" href="{$url_tvdStrengthForm}">Depth At Formation Strength mTVD:</a>
+			</td>
+			<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>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:diaCsgLast"/>
+			</td>
+			<td class="dark">
+				<a target="_blank" href="{$url_mdCsgLast}">Depth At Last Casing mMD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:mdCsgLast"/>
+			</td>
+		</tr>
+		<tr class="light">
+			<td class="dark">
+				<a target="_blank" href="{$url_tvdCsgLast}">Depth At Last Casing mTVD:</a>
+			</td>
+			<td>
+				<xsl:value-of select="witsml:tvdCsgLast"/>
+			</td>
+		</tr>
+	</xsl:template>
+</xsl:stylesheet>
