Index: projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_PDFReport_transformation_2011_03_09.xsl
===================================================================
--- projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_PDFReport_transformation_2011_03_09.xsl (revision 204)
+++ projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_PDFReport_transformation_2011_03_09.xsl (revision 211)
@@ -56,9 +56,6 @@
 									</fo:table-cell>
 									<fo:table-cell vertical-align="middle" horisontal-align="right">
-										<fo:block font-weight="bold" text-align="right" font-size="11pt">End time:  <xsl:if test="string(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0, 17))">
-												<fo:inline font-weight="bold">
-													<xsl:value-of select="substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0, 17)"/>
-												</fo:inline>
-											</xsl:if>
+										<fo:block font-weight="bold" text-align="right" font-size="11pt">End time:
+													<xsl:value-of select="concat(substring-before(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0,17), 'T'), ' ', substring-after(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0,17), 'T'))"/>
 										</fo:block>
 									</fo:table-cell>
@@ -167,9 +164,8 @@
 									<fo:table-cell vertical-align="middle">
 										<fo:block>
-											<xsl:if test="string(concat(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0, 17), &quot;-&quot;, substring(/witsml:drillReports/witsml:drillReport/witsml:dTimStart, 0, 17)))">
-												<fo:inline>
-													<xsl:value-of select="concat(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0, 17), &quot;-&quot;, substring(/witsml:drillReports/witsml:drillReport/witsml:dTimStart, 0, 17))"/>
-												</fo:inline>
-											</xsl:if>
+												<xsl:value-of select="concat(substring-before(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimStart, 0,17), 'T'), ' ', 
+												substring-after(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimStart, 0,17), 'T'), ' - ', 
+												substring-before(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0,17), 'T'), ' ', 
+												substring-after(substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0,17), 'T'))"/>
 										</fo:block>
 									</fo:table-cell>
@@ -225,5 +221,5 @@
 											<xsl:if test="string(substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0, 17))">
 												<fo:inline>
-													<xsl:value-of select="substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0, 17)"/>
+													<xsl:value-of select="concat(substring-before(substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0,17), 'T'), ' ', substring-after(substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0,17), 'T'))"/>
 												</fo:inline>
 											</xsl:if>
@@ -820,10 +816,10 @@
 															<fo:table-cell>
 																<fo:block>
-																	<fo:basic-link external-destination="url({$url_proprietaryCode})">Main Oper Class</fo:basic-link>
-																</fo:block>
-															</fo:table-cell>
-															<fo:table-cell>
-																<fo:block>
-																	<fo:basic-link external-destination="url({$url_state})">Main Oper Eval Class</fo:basic-link>
+																	<fo:basic-link external-destination="url({$url_proprietaryCode})">Main - Sub Activity</fo:basic-link>
+																</fo:block>
+															</fo:table-cell>
+															<fo:table-cell>
+																<fo:block>
+																	<fo:basic-link external-destination="url({$url_state})">State</fo:basic-link>
 																</fo:block>
 															</fo:table-cell>
@@ -1025,5 +1021,5 @@
 																		<xsl:if test="string(substring(witsml:dTim, 0, 17))">
 																			<fo:inline>
-																				<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
+																				<xsl:value-of select="concat(substring-before(substring(witsml:dTim, 0,17), 'T'), ' ', substring-after(substring(witsml:dTim, 0,17), 'T'))"/>
 																			</fo:inline>
 																		</xsl:if>
@@ -1070,5 +1066,5 @@
 																		<xsl:if test="string(substring(witsml:dTimRepair, 0, 17))">
 																			<fo:inline>
-																				<xsl:value-of select="substring(witsml:dTimRepair, 0, 17)"/>
+																				<xsl:value-of select="concat(substring-before(substring(witsml:dTimRepair, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimRepair, 0,17), 'T'))"/>
 																			</fo:inline>
 																		</xsl:if>
@@ -1431,16 +1427,16 @@
 											<fo:block>
 												<fo:table table-layout="fixed" width="100%" border-collapse="collapse">
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="1"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="1"/>
 													<fo:table-column column-width="proportional-column-width(8.333)" column-number="2"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="3"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="4"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="5"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="6"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="7"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="8"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="9"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="10"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="11"/>
-													<fo:table-column column-width="proportional-column-width(8.333)" column-number="12"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="3"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="4"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="5"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="6"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="7"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="8"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="9"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="10"/>
+													<fo:table-column column-width="proportional-column-width(6.333)" column-number="11"/>
+													<fo:table-column column-width="proportional-column-width(28.333)" column-number="12"/>
 													<fo:table-body>
 														<fo:table-row font-weight="bold">
@@ -1674,17 +1670,17 @@
 															<fo:table-column column-width="proportional-column-width(5)" column-number="1"/>
 															<fo:table-column column-width="proportional-column-width(5)" column-number="2"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="3"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="4"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="5"/>
-															<fo:table-column column-width="proportional-column-width(7)" column-number="6"/>
+															<fo:table-column column-width="proportional-column-width(5)" column-number="3"/>
+															<fo:table-column column-width="proportional-column-width(6)" column-number="4"/>
+															<fo:table-column column-width="proportional-column-width(5)" column-number="5"/>
+															<fo:table-column column-width="proportional-column-width(5)" column-number="6"/>
 															<fo:table-column column-width="proportional-column-width(6)" column-number="7"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="8"/>
-															<fo:table-column column-width="proportional-column-width(5.5)" column-number="9"/>
+															<fo:table-column column-width="proportional-column-width(5.5)" column-number="8"/>
+															<fo:table-column column-width="proportional-column-width(5)" column-number="9"/>
 															<fo:table-column column-width="proportional-column-width(9)" column-number="10"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="11"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="12"/>
+															<fo:table-column column-width="proportional-column-width(6)" column-number="11"/>
+															<fo:table-column column-width="proportional-column-width(5)" column-number="12"/>
 															<fo:table-column column-width="proportional-column-width(9)" column-number="13"/>
-															<fo:table-column column-width="proportional-column-width(6.5)" column-number="14"/>
-															<fo:table-column column-width="proportional-column-width(8)" column-number="15"/>
+															<fo:table-column column-width="proportional-column-width(6)" column-number="14"/>
+															<fo:table-column column-width="proportional-column-width(17.5)" column-number="15"/>
 															<fo:table-body>
 																<fo:table-row font-weight="bold">
@@ -1830,5 +1826,5 @@
 																			<xsl:if test="string(substring(witsml:eTimPresHeld, 0, 17))">
 																				<fo:inline>
-																					<xsl:value-of select="substring(witsml:eTimPresHeld, 0, 17)"/>
+																					<xsl:value-of select="concat(substring-before(substring(witsml:eTimPresHeld, 0,17), 'T'), ' ', substring-after(substring(witsml:eTimPresHeld, 0,17), 'T'))"/>
 																				</fo:inline>
 																			</xsl:if>
@@ -1898,20 +1894,17 @@
 													<fo:block>
 														<fo:table table-layout="fixed" width="100%" border-collapse="collapse">
-															<fo:table-column column-width="proportional-column-width(10)" column-number="1"/>
-															<fo:table-column column-width="proportional-column-width(12)" column-number="2"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="3"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="4"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="5"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
-															<fo:table-column column-width="proportional-column-width(10)" column-number="8"/>
-															<fo:table-column column-width="proportional-column-width(18)" column-number="9"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="1"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="2"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="3"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="4"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="5"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="6"/>
+															<fo:table-column column-width="proportional-column-width(7)" column-number="7"/>
+															<fo:table-column column-width="proportional-column-width(21)" column-number="8"/>
+															<fo:table-column column-width="proportional-column-width(30)" column-number="9"/>
 															<fo:table-body>
 																<fo:table-row font-weight="bold">
 																	<fo:table-cell>
 																		<fo:block>Fluid type</fo:block>
-																	</fo:table-cell>
-																	<fo:table-cell>
-																		<fo:block>Fluid Description</fo:block>
 																	</fo:table-cell>
 																	<fo:table-cell>
@@ -1974,4 +1967,7 @@
 																			</xsl:if>
 																		</fo:block>
+																	</fo:table-cell>
+																	<fo:table-cell text-align="left">
+																		<fo:block>Fluid Description</fo:block>
 																	</fo:table-cell>
 																	<fo:table-cell  text-align="left">
@@ -1986,13 +1982,4 @@
 																					<fo:inline>
 																						<xsl:value-of select="witsml:typeFluid"/>
-																					</fo:inline>
-																				</xsl:if>
-																			</fo:block>
-																		</fo:table-cell>
-																		<fo:table-cell>
-																			<fo:block>
-																				<xsl:if test="string(witsml:descFluid)">
-																					<fo:inline>
-																						<xsl:value-of select="witsml:descFluid"/>
 																					</fo:inline>
 																				</xsl:if>
@@ -2053,4 +2040,13 @@
 																			</fo:block>
 																		</fo:table-cell>
+																		<fo:table-cell text-align="left">
+																			<fo:block>
+																				<xsl:if test="string(witsml:descFluid)">
+																					<fo:inline>
+																						<xsl:value-of select="witsml:descFluid"/>
+																					</fo:inline>
+																				</xsl:if>
+																			</fo:block>
+																		</fo:table-cell>
 																		<fo:table-cell  text-align="left">
 																			<fo:block>
@@ -2198,5 +2194,5 @@
 																		<xsl:if test="string(substring(witsml:dTim, 0, 17))">
 																			<fo:inline>
-																				<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
+																				<xsl:value-of select="concat(substring-before(substring(witsml:dTim, 0,17), 'T'), ' ', substring-after(substring(witsml:dTim, 0,17), 'T'))"/>
 																			</fo:inline>
 																		</xsl:if>
@@ -3293,12 +3289,12 @@
 											<fo:block>
 												<fo:table table-layout="fixed" width="100%" border-collapse="collapse">
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
-													<fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="1"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="2"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="3"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="4"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="5"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="6"/>
+													<fo:table-column column-width="proportional-column-width(8)" column-number="7"/>
+													<fo:table-column column-width="proportional-column-width(44)" column-number="8"/>
 													<fo:table-body>
 														<fo:table-row font-weight="bold">
@@ -4269,5 +4265,5 @@
 																		<xsl:if test="string(substring(witsml:dTimOpen, 0 ,17))">
 																			<fo:inline>
-																				<xsl:value-of select="substring(witsml:dTimOpen, 0 ,17)"/>
+																				<xsl:value-of select="concat(substring-before(substring(witsml:dTimOpen, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimOpen, 0,17), 'T'))"/>
 																			</fo:inline>
 																		</xsl:if>
@@ -4278,5 +4274,5 @@
 																		<xsl:if test="string(substring(witsml:dTimClose, 0, 17))">
 																			<fo:inline>
-																				<xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
+																				<xsl:value-of select="concat(substring-before(substring(witsml:dTimClose, 0,17), 'T'), ' ', substring-after(substring(witsml:dTimClose, 0,17), 'T'))"/>
 																			</fo:inline>
 																		</xsl:if>
