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 131)
+++ projects/DailyDrillingReport_1.2/XML/HTMLreport/ddr_HTMLReport_transformation_2011_02_07.xsl (revision 135)
@@ -20,7 +20,7 @@
 								<table id="table1" width="100%">
 									<tr>
-										<td width="40%" align="left" class="ReportHeader">Summary report Wellbore: <xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
-										</td>
-										<td width="60%" align="right" class="ReportHeader">End time: <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
+										<td width="45%" align="left" class="ReportHeader">Summary report Wellbore: <xsl:value-of select="witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
+										</td>
+										<td width="55%" align="right" class="ReportHeader">End time: <xsl:value-of select="substring(witsml:dTimEnd, 0,17)"/>
 										</td>
 									</tr>
@@ -400,39 +400,26 @@
 										<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_diaBit}">Bit size <xsl:value-of select="witsml:bitRecord/witsml:diaBit/@uom"/>
-												</a>
-											</td>
-											<td align="left" width="170" valign="top">
-												<a target="_blank" href="{$url_manufacturer}">Manufacturer</a>
 											</td>
 											<td align="center" width="80" valign="top">
 												<a target="_blank" href="{$url_codeMfg}">Model</a>
 											</td>
-											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Serial NO.</a>
-											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">TFA <xsl:value-of select="witsml:bitRecord/witsml:tfa/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Hours drilled<br />
+													<xsl:value-of select="witsml:bitRun/witsml:eTimOpBit/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Time start</a>
+												<a target="_blank" href="{$urlRDS}">MD start<br />
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleStart/@uom"/>
+												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Time end</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hours drilled <xsl:value-of select="witsml:bitRecord/witsml:hrsDrilled/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">MD start <xsl:value-of select="witsml:bitRecord/witsml:mdHoleStart/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">MD end <xsl:value-of select="witsml:bitRecord/witsml:mdHoleEnd/@uom"/>
+												<a target="_blank" href="{$urlRDS}">MD end<br />
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleStop/@uom"/>
 												</a>
 											</td>
@@ -441,57 +428,31 @@
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max WOB <xsl:value-of select="witsml:bitRecord/witsml:maxWob/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Hole made (run)<br />
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleMadeRun/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max RPM <xsl:value-of select="witsml:bitRecord/witsml:maxRpm/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Hours drilled (run)<br />
+													<xsl:value-of select="witsml:bitRun/witsml:hrsDrilledRun/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max circ rate <xsl:value-of select="witsml:bitRecord/witsml:maxCircRate/@uom"/>
+												<a target="_blank" href="{$urlRDS}">ROP<br />
+													<xsl:value-of select="witsml:bitRun/witsml:ropAv/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max SSP <xsl:value-of select="witsml:bitRecord/witsml:maxSsp/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Total hole made<br />
+													<xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hole made (run) <xsl:value-of select="witsml:bitRecord/witsml:mdHoleMadeRun/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Total hours drilled<br />
+													<xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Hours drilled (run) <xsl:value-of select="witsml:bitRecord/witsml:hrsDrilledRun/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">ROP <xsl:value-of select="witsml:bitRecord/witsml:rop/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total WOB <xsl:value-of select="witsml:bitRecord/witsml:maxTotWob/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total RPM <xsl:value-of select="witsml:bitRecord/witsml:maxTotRpm/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total circ rate <xsl:value-of select="witsml:bitRecord/witsml:maxTotCircRate/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Max total SSP <xsl:value-of select="witsml:bitRecord/witsml:maxTotSsp/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total hole made <xsl:value-of select="witsml:bitRecord/witsml:mdTotHoleMade/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total hours drilled <xsl:value-of select="witsml:bitRecord/witsml:totHrsDrilled/@uom"/>
-												</a>
-											</td>
-											<td align="center" width="50" valign="top">
-												<a target="_blank" href="{$urlRDS}">Total ROP <xsl:value-of select="witsml:bitRecord/witsml:totHrsDrilled/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Total ROP<br />
+													<xsl:value-of select="witsml:bitRun/witsml:ropMx/@uom"/>
 												</a>
 											</td>
@@ -500,35 +461,20 @@
 											<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:diaBit"/>
-												</td>
-												<td width="170">
-													<xsl:value-of select="witsml:manufacturer"/>
-												</td>
-												<td align="center">
 													<xsl:value-of select="witsml:codeMfg"/>
 												</td>
 												<td align="center">
-													<xsl:value-of select="witsml:serialNo"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:tfa"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="substring(witsml:dTimIn, 0, 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="substring(witsml:dTimOut, 0, 17)"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:hrsDrilled"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleStart"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleEnd"/>
+													<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">
@@ -536,44 +482,20 @@
 												</td>
 												<td align="center">
-													<xsl:value-of select="witsml:maxWob"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxRpm"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxCircRate"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxSpp"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdHoleMadeRun"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:hrsDrilledRun"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:rop"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotWob"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotRpm"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotCircRate"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:maxTotSpp"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:mdTotHoleMade"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:totHrsDrilled"/>
-												</td>
-												<td align="center">
-													<xsl:value-of select="witsml:totRop"/>
+													<xsl:value-of select="witsml:bitRun/witsml:mdHoleMadeRun"/>
+												</td>
+												<td align="center">
+													<xsl:value-of select="witsml:bitRun/witsml:hrsDrilledRun"/>
+												</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:ropMx"/>
 												</td>
 											</tr>
@@ -621,13 +543,13 @@
 										</td>
 										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal outside diameter <xsl:value-of select="witsml:pipe/witsml:OD/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Nominal outside diameter <xsl:value-of select="witsml:casing_liner_tubing/witsml:OD/@uom"/>
 											</a>
 										</td>
 										<td align="center" width="100" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal inside diameter <xsl:value-of select="witsml:pipe/witsml:ID/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Nominal inside diameter <xsl:value-of select="witsml:casing_liner_tubing/witsml:ID/@uom"/>
 											</a>
 										</td>
 										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Nominal Weight <xsl:value-of select="witsml:pipe/witsml:weight/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Nominal Weight <xsl:value-of select="witsml:casing_liner_tubing/witsml:weight/@uom"/>
 											</a>
 										</td>
@@ -639,17 +561,17 @@
 										</td>
 										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Length <xsl:value-of select="witsml:pipe/witsml:length/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Length <xsl:value-of select="witsml:casing_liner_tubing/witsml:length/@uom"/>
 											</a>
 										</td>
 										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Top/Hangar MD <xsl:value-of select="witsml:pipe/witsml:MDTopHangar/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Top/Hangar MD <xsl:value-of select="witsml:casing_liner_tubing/witsml:MDTopHangar/@uom"/>
 											</a>
 										</td>
 										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Bottom/Shoe MD <xsl:value-of select="witsml:pipe/witsml:MDBottomShoe/@uom"/>
+											<a target="_blank" href="{$urlRDS}">Bottom/Shoe MD <xsl:value-of select="witsml:casing_liner_tubing/witsml:MDBottomShoe/@uom"/>
 											</a>
 										</td>
 									</tr>
-									<xsl:for-each select="witsml:cs_stimTubular">
+									<xsl:for-each select="witsml:casing_liner_tubing">
 										<tr class="light">
 											<td align="center">
@@ -659,13 +581,13 @@
 											</td>
 											<td align="center">
-												<xsl:variable name="element_casing" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='tubularTypes']/xsd:restriction"/>
-												<xsl:variable name="casingTypes" select="witsml:casingType" />
+												<xsl:variable name="element_casing" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='StimStageType']/xsd:restriction"/>
+												<xsl:variable name="casingTypes" select="witsml:casing_liner_tubing_run/witsml:kind" />
 												<xsl:value-of select="$element_casing//xsd:enumeration[@value=$casingTypes]"/>
 											</td>
 											<td align="center">
-												<xsl:value-of select="substring-after(substring(witsml:dTimRun, 0, 17), 'T')"/>
+												<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:description"/>
+												<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:description"/>
 											</td>
 											<td align="center">
@@ -701,74 +623,74 @@
 						<!-- witsml:cement -->
 						<!--<xsl:if test="count(witsml:cement) > 0">-->
-						<tr height="5px">
-							<td/>
-						</tr>
-						<tr>
-							<td>
-								<hr/>
-							</td>
-						</tr>
-						<tr>
-							<td class="SectionHead">Cement information</td>
-						</tr>
-						<tr>
-							<td>
-								<table id="table2">
-									<xsl:variable name="element_cement" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cement']/xsd:sequence"/>
-									<!--<xsl:variable name="url_readingKind"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/></xsl:variable>
+						<xsl: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='cement']/xsd:sequence"/>
+										<!--<xsl:variable name="url_readingKind"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/></xsl:variable>
 						    			<xsl:variable name="url_equivalentMudWeight"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='equivalentMudWeight']/@sawsdl:modelReference"/></xsl:variable>
 						    			<xsl:variable name="url_dTim"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='dTim']/@sawsdl:modelReference"/></xsl:variable>
 						    			<xsl:variable name="url_md"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='md']/@sawsdl:modelReference"/></xsl:variable>
 						    			<xsl:variable name="url_tvd"><xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='tvd']/@sawsdl:modelReference"/></xsl:variable>-->
-									<tr>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">Start Time</a>
-										</td>
-										<td align="center" valign="top">
-											<a target="_blank" href="{$urlRDS}">End Time</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Job Type</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Casing string diameter</a>
-										</td>
-										<td align="center" width="100" valign="top">
-											<a target="_blank" href="{$urlRDS}">Comments</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Top plug used</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Bottom plug used</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Plug failed to bump</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Plug bump pressure <xsl:value-of select="witsml:cs_cementStage/witsml:presBump/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Float failed</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Pressure release time</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Full returns</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">cement volume returns <xsl:value-of select="witsml:cs_cementStage/witsml:volReturns/@uom"/>
-											</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Reciprocated</a>
-										</td>
-										<td align="center" width="60" valign="top">
-											<a target="_blank" href="{$urlRDS}">Rotated</a>
-										</td>
-									</tr>
-									<xsl:for-each select="witsml:cs_cementStage">
+										<tr>
+											<td align="center" valign="top">
+												<a target="_blank" href="{$urlRDS}">Start Time</a>
+											</td>
+											<td align="center" valign="top">
+												<a target="_blank" href="{$urlRDS}">End Time</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Job Type</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Casing string diameter</a>
+											</td>
+											<td align="center" width="100" valign="top">
+												<a target="_blank" href="{$urlRDS}">Comments</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Top plug used</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Bottom plug used</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Plug failed to bump</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Plug bump pressure <xsl:value-of select="witsml:cementStage/witsml:presBump/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Float failed</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Pressure release time</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Full returns</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">cement volume returns <xsl:value-of select="witsml:cementStage/witsml:volReturns/@uom"/>
+												</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Reciprocated</a>
+											</td>
+											<td align="center" width="60" valign="top">
+												<a target="_blank" href="{$urlRDS}">Rotated</a>
+											</td>
+										</tr>
 										<tr class="light">
 											<td align="center">
@@ -820,11 +742,10 @@
 											</td>
 										</tr>
-									</xsl:for-each>
-								</table>
-							</td>
-						</tr>
-						<!--</xsl:if>-->
-						<!--  witsml:fluid -->
-						<xsl:if test="count(witsml:fluid) &gt; 0">
+									</table>
+								</td>
+							</tr>
+							<!--</xsl:if>-->
+							<!--  witsml:cementingFluid -->
+							<!--<xsl:if test="count(witsml:cementingFluid) &gt; 0">-->
 							<tr height="5px">
 								<td/>
@@ -832,5 +753,4 @@
 							<tr>
 								<td>
-									<hr/>
 								</td>
 							</tr>
@@ -838,32 +758,32 @@
 								<td class="SectionHead">Cement Fluid Details</td>
 							</tr>
+							<xsl:variable name="element_fluid" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cementingFluid']/xsd:sequence"/>
+							<xsl:variable name="url_dTimFluid">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_mdFluid">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='md']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_mudClass">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='mudClass']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_density">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='density']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_pv">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='pv']/@sawsdl:modelReference"/>
+							</xsl:variable>
+							<xsl:variable name="url_yp">
+								<xsl:value-of select="$element_fluid//xsd:element[@name='yp']/@sawsdl:modelReference"/>
+							</xsl:variable>
 							<tr>
 								<td>
 									<table id="table2">
-										<xsl:variable name="element_fluid" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_cementingFluid']/xsd:sequence"/>
-										<xsl:variable name="url_dTim">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
-										</xsl:variable>
-										<xsl:variable name="url_md">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='md']/@sawsdl:modelReference"/>
-										</xsl:variable>
-										<xsl:variable name="url_mudClass">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='mudClass']/@sawsdl:modelReference"/>
-										</xsl:variable>
-										<xsl:variable name="url_density">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='density']/@sawsdl:modelReference"/>
-										</xsl:variable>
-										<xsl:variable name="url_pv">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='pv']/@sawsdl:modelReference"/>
-										</xsl:variable>
-										<xsl:variable name="url_yp">
-											<xsl:value-of select="$element_fluid//xsd:element[@name='yp']/@sawsdl:modelReference"/>
-										</xsl:variable>
 										<tr>
-											<td align="left" valign="top">
-												<a target="_blank" href="{$url_dTim}">Sample Time</a>
+											<td align="left"  width="60" valign="top">
+												<a target="_blank" href="{$url_dTimFluid}">Sample Time</a>
 											</td>
 											<td align="center" width="60" valign="top">
-												<a target="_blank" href="{$url_md}">MD At Logging <xsl:value-of select="witsml:cs_cementingFluid/witsml:mdLog/@uom" />
+												<a target="_blank" href="{$url_mdFluid}">MD At Logging <xsl:value-of select="witsml:cementingFluid/witsml:mdLog/@uom" />
 												</a>
 											</td>
@@ -875,29 +795,29 @@
 											</td>
 											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$urlRDS}">Volume Pumped <xsl:value-of select="witsml:cs_cementingFluid/witsml:volPumped/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Volume Pumped <xsl:value-of select="witsml:cementingFluid/witsml:volPumped/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="100" valign="top">
-												<a target="_blank" href="{$url_density}">Fluid Density <xsl:value-of select="witsml:cs_cementingFluid/witsml:density/@uom"/>
+												<a target="_blank" href="{$url_density}">Fluid Density <xsl:value-of select="witsml:cementingFluid/witsml:density/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="120" valign="top">
-												<a target="_blank" href="{$url_pv}">Fluid Viscosity <xsl:value-of select="witsml:cs_cementingFluid/witsml:pv/@uom"/>
+												<a target="_blank" href="{$url_pv}">Fluid Viscosity <xsl:value-of select="witsml:cementingFluid/witsml:pv/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$url_yp}">Yield Point <xsl:value-of select="witsml:cs_cementingFluid/witsml:yp/@uom"/>
+												<a target="_blank" href="{$url_yp}">Yield Point <xsl:value-of select="witsml:cementingFluid/witsml:yp/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Mix Water Ratio <xsl:value-of select="witsml:cs_cementingFluid/witsml:ratioMixWater/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Mix Water Ratio <xsl:value-of select="witsml:cementingFluid/witsml:ratioMixWater/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Free Water <xsl:value-of select="witsml:cs_cementingFluid/witsml:pcFreeWater/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Free Water <xsl:value-of select="witsml:cementingFluid/witsml:pcFreeWater/@uom"/>
 												</a>
 											</td>
 											<td align="center" width="80" valign="top">
-												<a target="_blank" href="{$urlRDS}">Thick Time <xsl:value-of select="witsml:cs_cementingFluid/witsml:eTimThickening/@uom"/>
+												<a target="_blank" href="{$urlRDS}">Thick Time <xsl:value-of select="witsml:cementingFluid/witsml:eTimThickening/@uom"/>
 												</a>
 											</td>
@@ -905,7 +825,7 @@
 												<a target="_blank" href="{$urlRDS}">Comments</a>
 											</td>
-											<td/>
+
 										</tr>
-										<xsl:for-each select="witsml:cs_cementingFluid">
+										<xsl:for-each select="witsml:cementingFluid">
 											<tr class="light">
 												<td>
@@ -947,5 +867,4 @@
 													<xsl:value-of select="witsml:comment"/>
 												</td>
-												<td/>
 											</tr>
 										</xsl:for-each>
@@ -953,5 +872,6 @@
 								</td>
 							</tr>
-						</xsl:if>
+						</xsl:for-each>
+						<!-- </xsl:if> -->
 						<!-- END Added/changed 18jan2011 -->
 						<!--  porePressure -->
