Index: projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_HTMLReport_transformation_2011_03_09.xfd
===================================================================
--- projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_HTMLReport_transformation_2011_03_09.xfd (revision 152)
+++ projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_HTMLReport_transformation_2011_03_09.xfd (revision 159)
@@ -261,6 +261,6 @@
 							<fo:table-cell vertical-align="middle">
 								<fo:block>
-									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='true'">yes</xsl:if>
-									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='false'">no</xsl:if>
+									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='true' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='1'">yes</xsl:if>
+									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='false' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='0'">no</xsl:if>
 								</fo:block>
 							</fo:table-cell>
@@ -270,6 +270,6 @@
 							<fo:table-cell vertical-align="middle">
 								<fo:block>
-									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='true'">yes</xsl:if>
-									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='false'">no</xsl:if>
+									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='true' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='1'">yes</xsl:if>
+									<xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='false' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='0'">no</xsl:if>
 								</fo:block>
 							</fo:table-cell>
@@ -856,41 +856,41 @@
 												</fo:table-cell>
 												<fo:table-cell>
+													<fo:block>Hole made (run)</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>Hours drilled (run)</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>ROP</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>Total hole made</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>Total hours drilled</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>Total ROP</fo:block>
+													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
 													<fo:block>Dull grade</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>Hole made (run)</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>Hours drilled (run)</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>ROP</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>Total hole made</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>Total hours drilled</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>Total ROP</fo:block>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom"/>
-													</fo:block>
 												</fo:table-cell>
 											</fo:table-row>
@@ -928,35 +928,35 @@
 												<fo:table-cell>
 													<fo:block>
+														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="witsml:bitRun/witsml:eTimOpBit"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="witsml:bitRun/witsml:ropAv"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="witsml:bitRun/witsml:mdTotHoleMade"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="witsml:bitRun/witsml:totHrsDrilled"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="witsml:bitRun/witsml:ropMx"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
 														<xfd:field xpath="witsml:dullGrade"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="witsml:bit/Run/witsml:eTimOpBit"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="witsml:ropAv"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="witsml:bitRun/witsml:mdTotHoleMade"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="witsml:bitRun/witsml:totHrsDrilled"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="witsml:ropMx"/>
 													</fo:block>
 												</fo:table-cell>
@@ -1071,12 +1071,10 @@
 												<fo:table-cell>
 													<fo:block>
-														<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"/>
-														<xfd:field xpath="$element_casing//xsd:enumeration[@value=$casingTypes]"/>
-													</fo:block>
-												</fo:table-cell>
-												<fo:table-cell>
-													<fo:block>
-														<xfd:field xpath="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimStart, 0, 17), 'T')"/>
+														<xfd:field xpath="witsml:casing_liner_tubing_run/witsml:tubularJobType"/>
+													</fo:block>
+												</fo:table-cell>
+												<fo:table-cell>
+													<fo:block>
+														<xfd:field xpath="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T')"/>
 													</fo:block>
 												</fo:table-cell>
@@ -1200,5 +1198,5 @@
 													</fo:table-cell>
 													<fo:table-cell>
-														<fo:block>Plug failed to bump</fo:block>
+														<fo:block>Plug bumped</fo:block>
 													</fo:table-cell>
 													<fo:table-cell>
@@ -1209,5 +1207,5 @@
 													</fo:table-cell>
 													<fo:table-cell>
-														<fo:block>Float failed</fo:block>
+														<fo:block>Float held</fo:block>
 													</fo:table-cell>
 													<fo:table-cell>
@@ -1243,7 +1241,5 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:variable name="element_jobTypes" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='cementJobTypes']/xsd:restriction"/>
-															<xsl:variable name="jobTypes" select="witsml:jobType"/>
-															<xfd:field xpath="$element_jobTypes//xsd:enumeration[@value=$jobTypes]"/>
+															<xfd:field xpath="witsml:jobType"/>
 														</fo:block>
 													</fo:table-cell>
@@ -1260,18 +1256,18 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:if test="witsml:topPlug='true'">yes</xsl:if>
-															<xsl:if test="witsml:topPlug='false'">no</xsl:if>
-														</fo:block>
-													</fo:table-cell>
-													<fo:table-cell>
-														<fo:block>
-															<xsl:if test="witsml:botPlug='true'">yes</xsl:if>
-															<xsl:if test="witsml:botPlug='false'">no</xsl:if>
-														</fo:block>
-													</fo:table-cell>
-													<fo:table-cell>
-														<fo:block>
-															<xsl:if test="witsml:plugBumped='true'">yes</xsl:if>
-															<xsl:if test="witsml:plugBumped='false'">no</xsl:if>
+															<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>
+														</fo:block>
+													</fo:table-cell>
+													<fo:table-cell>
+														<fo:block>
+															<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>
+														</fo:block>
+													</fo:table-cell>
+													<fo:table-cell>
+														<fo:block>
+															<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>
 														</fo:block>
 													</fo:table-cell>
@@ -1283,6 +1279,6 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:if test="witsml:floatHeld='true'">yes</xsl:if>
-															<xsl:if test="witsml:floatHeld='false'">no</xsl:if>
+															<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>
 														</fo:block>
 													</fo:table-cell>
@@ -1294,6 +1290,6 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:if test="witsml:annFlowAfter='true'">yes</xsl:if>
-															<xsl:if test="witsml:annFlowAfter='false'">no</xsl:if>
+															<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>
 														</fo:block>
 													</fo:table-cell>
@@ -1305,12 +1301,12 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:if test="witsml:reciprocated='true'">yes</xsl:if>
-															<xsl:if test="witsml:reciprocated='false'">no</xsl:if>
-														</fo:block>
-													</fo:table-cell>
-													<fo:table-cell>
-														<fo:block>
-															<xsl:if test="witsml:rotated='true'">yes</xsl:if>
-															<xsl:if test="witsml:rotated='false'">no</xsl:if>
+															<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>
+														</fo:block>
+													</fo:table-cell>
+													<fo:table-cell>
+														<fo:block>
+															<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>
 														</fo:block>
 													</fo:table-cell>
@@ -1399,7 +1395,5 @@
 													<fo:table-cell>
 														<fo:block>
-															<xsl:variable name="element_fluidTypes" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='fluidTypes']/xsd:restriction"/>
-															<xsl:variable name="fluidTypes" select="witsml:typeFluid"/>
-															<xfd:field xpath="$element_fluidTypes//xsd:enumeration[@value=$fluidTypes]"/>
+															<xfd:field xpath="witsml:typeFluid"/>
 														</fo:block>
 													</fo:table-cell>
@@ -2412,6 +2406,6 @@
 												<fo:table-cell>
 													<fo:block>
-														<xsl:if test="witsml:goodSeal='true'">yes</xsl:if>
-														<xsl:if test="witsml:goodSeal='false'">no</xsl:if>
+														<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>
 													</fo:block>
 												</fo:table-cell>
