Show
Ignore:
Timestamp:
03/30/11 10:33:08 (13 years ago)
Author:
yaolu
Message:

Did changes for both HTML report and PDF report so it is closer to how WITSML should be.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • projects/DailyDrillingReport_1.2/XML/PDFreport/ddr_HTMLReport_transformation_2011_03_09.xsl

    r152 r159  
    22<xslt:stylesheet xmlns:date="http://exslt.org/dates-and-times" xmlns:str="http://exslt.org/strings" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0" xmlns:xc="http://www.ecrion.com/2008/xc" xmlns:xfd="http://www.ecrion.com/xfd/1.0" xmlns:svg="http://www.w3.org/2000/svg" xmlns:msxsl="urn:schemas-microsoft-com:xslt" 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:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" extension-element-prefixes="date str"> 
    33<xslt:output indent="yes" encoding="utf-8"/> 
    4 <xslt:param name="XFCrtLocalDate">2011-03-22</xslt:param> 
    5 <xslt:param name="XFCrtLocalTime">14:27:24</xslt:param> 
    6 <xslt:param name="XFCrtLocalDateTime">2011-03-22T14:27:24</xslt:param> 
    7 <xslt:param name="XFCrtUTCDate">2011-03-22</xslt:param> 
    8 <xslt:param name="XFCrtUTCTime">13:27:24</xslt:param> 
    9 <xslt:param name="XFCrtUTCDateTime">2011-03-22T13:27:24</xslt:param> 
     4<xslt:param name="XFCrtLocalDate">2011-03-30</xslt:param> 
     5<xslt:param name="XFCrtLocalTime">10:29:36</xslt:param> 
     6<xslt:param name="XFCrtLocalDateTime">2011-03-30T10:29:36</xslt:param> 
     7<xslt:param name="XFCrtUTCDate">2011-03-30</xslt:param> 
     8<xslt:param name="XFCrtUTCTime">08:29:36</xslt:param> 
     9<xslt:param name="XFCrtUTCDateTime">2011-03-30T08:29:36</xslt:param> 
    1010<xslt:param name="XFOutputFormat"/> 
    1111<!-- 
     
    312312                                                        <fo:table-cell vertical-align="middle"> 
    313313                                                                <fo:block> 
    314                                                                         <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='true'">yes</xsl:if> 
    315                                                                         <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='false'">no</xsl:if> 
     314                                                                        <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> 
     315                                                                        <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> 
    316316                                                                </fo:block> 
    317317                                                        </fo:table-cell> 
     
    321321                                                        <fo:table-cell vertical-align="middle"> 
    322322                                                                <fo:block> 
    323                                                                         <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='true'">yes</xsl:if> 
    324                                                                         <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='false'">no</xsl:if> 
     323                                                                        <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> 
     324                                                                        <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> 
    325325                                                                </fo:block> 
    326326                                                        </fo:table-cell> 
     
    10051005                                                                                                </fo:table-cell> 
    10061006                                                                                                <fo:table-cell> 
    1007                                                                                                         <fo:block>Dull grade</fo:block> 
    1008                                                                                                 </fo:table-cell> 
    1009                                                                                                 <fo:table-cell> 
    10101007                                                                                                        <fo:block>Hole made (run)</fo:block> 
    10111008                                                                                                        <fo:block> 
     
    10541051</fo:inline></xsl:if> 
    10551052                                                                                                        </fo:block> 
     1053                                                                                                </fo:table-cell> 
     1054                                                                                                <fo:table-cell> 
     1055                                                                                                        <fo:block>Dull grade</fo:block> 
    10561056                                                                                                </fo:table-cell> 
    10571057                                                                                        </fo:table-row> 
     
    11021102                                                                                                <fo:table-cell> 
    11031103                                                                                                        <fo:block> 
     1104                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart)"><fo:inline> 
     1105<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/> 
     1106</fo:inline></xsl:if> 
     1107                                                                                                        </fo:block> 
     1108                                                                                                </fo:table-cell> 
     1109                                                                                                <fo:table-cell> 
     1110                                                                                                        <fo:block> 
     1111                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:eTimOpBit)"><fo:inline> 
     1112<xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/> 
     1113</fo:inline></xsl:if> 
     1114                                                                                                        </fo:block> 
     1115                                                                                                </fo:table-cell> 
     1116                                                                                                <fo:table-cell> 
     1117                                                                                                        <fo:block> 
     1118                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:ropAv)"><fo:inline> 
     1119<xsl:value-of select="witsml:bitRun/witsml:ropAv"/> 
     1120</fo:inline></xsl:if> 
     1121                                                                                                        </fo:block> 
     1122                                                                                                </fo:table-cell> 
     1123                                                                                                <fo:table-cell> 
     1124                                                                                                        <fo:block> 
     1125                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:mdTotHoleMade)"><fo:inline> 
     1126<xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade"/> 
     1127</fo:inline></xsl:if> 
     1128                                                                                                        </fo:block> 
     1129                                                                                                </fo:table-cell> 
     1130                                                                                                <fo:table-cell> 
     1131                                                                                                        <fo:block> 
     1132                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:totHrsDrilled)"><fo:inline> 
     1133<xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled"/> 
     1134</fo:inline></xsl:if> 
     1135                                                                                                        </fo:block> 
     1136                                                                                                </fo:table-cell> 
     1137                                                                                                <fo:table-cell> 
     1138                                                                                                        <fo:block> 
     1139                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:ropMx)"><fo:inline> 
     1140<xsl:value-of select="witsml:bitRun/witsml:ropMx"/> 
     1141</fo:inline></xsl:if> 
     1142                                                                                                        </fo:block> 
     1143                                                                                                </fo:table-cell> 
     1144                                                                                                <fo:table-cell> 
     1145                                                                                                        <fo:block> 
    11041146                                                                                                                <xsl:if test="string(witsml:dullGrade)"><fo:inline> 
    11051147<xsl:value-of select="witsml:dullGrade"/> 
    1106 </fo:inline></xsl:if> 
    1107                                                                                                         </fo:block> 
    1108                                                                                                 </fo:table-cell> 
    1109                                                                                                 <fo:table-cell> 
    1110                                                                                                         <fo:block> 
    1111                                                                                                                 <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart)"><fo:inline> 
    1112 <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/> 
    1113 </fo:inline></xsl:if> 
    1114                                                                                                         </fo:block> 
    1115                                                                                                 </fo:table-cell> 
    1116                                                                                                 <fo:table-cell> 
    1117                                                                                                         <fo:block> 
    1118                                                                                                                 <xsl:if test="string(witsml:bit/Run/witsml:eTimOpBit)"><fo:inline> 
    1119 <xsl:value-of select="witsml:bit/Run/witsml:eTimOpBit"/> 
    1120 </fo:inline></xsl:if> 
    1121                                                                                                         </fo:block> 
    1122                                                                                                 </fo:table-cell> 
    1123                                                                                                 <fo:table-cell> 
    1124                                                                                                         <fo:block> 
    1125                                                                                                                 <xsl:if test="string(witsml:ropAv)"><fo:inline> 
    1126 <xsl:value-of select="witsml:ropAv"/> 
    1127 </fo:inline></xsl:if> 
    1128                                                                                                         </fo:block> 
    1129                                                                                                 </fo:table-cell> 
    1130                                                                                                 <fo:table-cell> 
    1131                                                                                                         <fo:block> 
    1132                                                                                                                 <xsl:if test="string(witsml:bitRun/witsml:mdTotHoleMade)"><fo:inline> 
    1133 <xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade"/> 
    1134 </fo:inline></xsl:if> 
    1135                                                                                                         </fo:block> 
    1136                                                                                                 </fo:table-cell> 
    1137                                                                                                 <fo:table-cell> 
    1138                                                                                                         <fo:block> 
    1139                                                                                                                 <xsl:if test="string(witsml:bitRun/witsml:totHrsDrilled)"><fo:inline> 
    1140 <xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled"/> 
    1141 </fo:inline></xsl:if> 
    1142                                                                                                         </fo:block> 
    1143                                                                                                 </fo:table-cell> 
    1144                                                                                                 <fo:table-cell> 
    1145                                                                                                         <fo:block> 
    1146                                                                                                                 <xsl:if test="string(witsml:ropMx)"><fo:inline> 
    1147 <xsl:value-of select="witsml:ropMx"/> 
    11481148</fo:inline></xsl:if> 
    11491149                                                                                                        </fo:block> 
     
    12751275                                                                                                <fo:table-cell> 
    12761276                                                                                                        <fo:block> 
    1277                                                                                                                 <xsl:variable name="element_casing" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='stimStageType']/xsd:restriction"/> 
    1278                                                                                                                 <xsl:variable name="casingTypes" select="witsml:casing_liner_tubing_run/witsml:kind"/> 
    1279                                                                                                                 <xsl:if test="string($element_casing//xsd:enumeration[@value=$casingTypes])"><fo:inline> 
    1280 <xsl:value-of select="$element_casing//xsd:enumeration[@value=$casingTypes]"/> 
    1281 </fo:inline></xsl:if> 
    1282                                                                                                         </fo:block> 
    1283                                                                                                 </fo:table-cell> 
    1284                                                                                                 <fo:table-cell> 
    1285                                                                                                         <fo:block> 
    1286                                                                                                                 <xsl:if test="string(substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimStart, 0, 17), 'T'))"><fo:inline> 
    1287 <xsl:value-of select="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimStart, 0, 17), 'T')"/> 
     1277                                                                                                                <xsl:if test="string(witsml:casing_liner_tubing_run/witsml:tubularJobType)"><fo:inline> 
     1278<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:tubularJobType"/> 
     1279</fo:inline></xsl:if> 
     1280                                                                                                        </fo:block> 
     1281                                                                                                </fo:table-cell> 
     1282                                                                                                <fo:table-cell> 
     1283                                                                                                        <fo:block> 
     1284                                                                                                                <xsl:if test="string(substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T'))"><fo:inline> 
     1285<xsl:value-of select="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T')"/> 
    12881286</fo:inline></xsl:if> 
    12891287                                                                                                        </fo:block> 
     
    14301428                                                                                                        </fo:table-cell> 
    14311429                                                                                                        <fo:table-cell> 
    1432                                                                                                                 <fo:block>Plug failed to bump</fo:block> 
     1430                                                                                                                <fo:block>Plug bumped</fo:block> 
    14331431                                                                                                        </fo:table-cell> 
    14341432                                                                                                        <fo:table-cell> 
     
    14411439                                                                                                        </fo:table-cell> 
    14421440                                                                                                        <fo:table-cell> 
    1443                                                                                                                 <fo:block>Float failed</fo:block> 
     1441                                                                                                                <fo:block>Float held</fo:block> 
    14441442                                                                                                        </fo:table-cell> 
    14451443                                                                                                        <fo:table-cell> 
     
    14811479                                                                                                        <fo:table-cell> 
    14821480                                                                                                                <fo:block> 
    1483                                                                                                                         <xsl:variable name="element_jobTypes" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='cementJobTypes']/xsd:restriction"/> 
    1484                                                                                                                         <xsl:variable name="jobTypes" select="witsml:jobType"/> 
    1485                                                                                                                         <xsl:if test="string($element_jobTypes//xsd:enumeration[@value=$jobTypes])"><fo:inline> 
    1486 <xsl:value-of select="$element_jobTypes//xsd:enumeration[@value=$jobTypes]"/> 
     1481                                                                                                                        <xsl:if test="string(witsml:jobType)"><fo:inline> 
     1482<xsl:value-of select="witsml:jobType"/> 
    14871483</fo:inline></xsl:if> 
    14881484                                                                                                                </fo:block> 
     
    15041500                                                                                                        <fo:table-cell> 
    15051501                                                                                                                <fo:block> 
    1506                                                                                                                         <xsl:if test="witsml:topPlug='true'">yes</xsl:if> 
    1507                                                                                                                         <xsl:if test="witsml:topPlug='false'">no</xsl:if> 
    1508                                                                                                                 </fo:block> 
    1509                                                                                                         </fo:table-cell> 
    1510                                                                                                         <fo:table-cell> 
    1511                                                                                                                 <fo:block> 
    1512                                                                                                                         <xsl:if test="witsml:botPlug='true'">yes</xsl:if> 
    1513                                                                                                                         <xsl:if test="witsml:botPlug='false'">no</xsl:if> 
    1514                                                                                                                 </fo:block> 
    1515                                                                                                         </fo:table-cell> 
    1516                                                                                                         <fo:table-cell> 
    1517                                                                                                                 <fo:block> 
    1518                                                                                                                         <xsl:if test="witsml:plugBumped='true'">yes</xsl:if> 
    1519                                                                                                                         <xsl:if test="witsml:plugBumped='false'">no</xsl:if> 
     1502                                                                                                                        <xsl:if test="witsml:topPlug='true' or witsml:topPlug='1'">yes</xsl:if> 
     1503                                                                                                                        <xsl:if test="witsml:topPlug='false' or witsml:topPlug='0'">no</xsl:if> 
     1504                                                                                                                </fo:block> 
     1505                                                                                                        </fo:table-cell> 
     1506                                                                                                        <fo:table-cell> 
     1507                                                                                                                <fo:block> 
     1508                                                                                                                        <xsl:if test="witsml:botPlug='true' or witsml:botPlug='1'">yes</xsl:if> 
     1509                                                                                                                        <xsl:if test="witsml:botPlug='false' or witsml:botPlug='0'">no</xsl:if> 
     1510                                                                                                                </fo:block> 
     1511                                                                                                        </fo:table-cell> 
     1512                                                                                                        <fo:table-cell> 
     1513                                                                                                                <fo:block> 
     1514                                                                                                                        <xsl:if test="witsml:plugBumped='true' or witsml:plugBumped='1'">yes</xsl:if> 
     1515                                                                                                                        <xsl:if test="witsml:plugBumped='false' or witsml:plugBumped='0'">no</xsl:if> 
    15201516                                                                                                                </fo:block> 
    15211517                                                                                                        </fo:table-cell> 
     
    15291525                                                                                                        <fo:table-cell> 
    15301526                                                                                                                <fo:block> 
    1531                                                                                                                         <xsl:if test="witsml:floatHeld='true'">yes</xsl:if> 
    1532                                                                                                                         <xsl:if test="witsml:floatHeld='false'">no</xsl:if> 
     1527                                                                                                                        <xsl:if test="witsml:floatHeld='true' or witsml:floatHeld='1'">yes</xsl:if> 
     1528                                                                                                                        <xsl:if test="witsml:floatHeld='false' or witsml:floatHeld='0'">no</xsl:if> 
    15331529                                                                                                                </fo:block> 
    15341530                                                                                                        </fo:table-cell> 
     
    15421538                                                                                                        <fo:table-cell> 
    15431539                                                                                                                <fo:block> 
    1544                                                                                                                         <xsl:if test="witsml:annFlowAfter='true'">yes</xsl:if> 
    1545                                                                                                                         <xsl:if test="witsml:annFlowAfter='false'">no</xsl:if> 
     1540                                                                                                                        <xsl:if test="witsml:annFlowAfter='true' or witsml:annFlowAfter='1'">yes</xsl:if> 
     1541                                                                                                                        <xsl:if test="witsml:annFlowAfter='false' or witsml:annFlowAfter='0'">no</xsl:if> 
    15461542                                                                                                                </fo:block> 
    15471543                                                                                                        </fo:table-cell> 
     
    15551551                                                                                                        <fo:table-cell> 
    15561552                                                                                                                <fo:block> 
    1557                                                                                                                         <xsl:if test="witsml:reciprocated='true'">yes</xsl:if> 
    1558                                                                                                                         <xsl:if test="witsml:reciprocated='false'">no</xsl:if> 
    1559                                                                                                                 </fo:block> 
    1560                                                                                                         </fo:table-cell> 
    1561                                                                                                         <fo:table-cell> 
    1562                                                                                                                 <fo:block> 
    1563                                                                                                                         <xsl:if test="witsml:rotated='true'">yes</xsl:if> 
    1564                                                                                                                         <xsl:if test="witsml:rotated='false'">no</xsl:if> 
     1553                                                                                                                        <xsl:if test="witsml:reciprocated='true' or witsml:reciprocated='1'">yes</xsl:if> 
     1554                                                                                                                        <xsl:if test="witsml:reciprocated='false' or witsml:reciprocated='0'">no</xsl:if> 
     1555                                                                                                                </fo:block> 
     1556                                                                                                        </fo:table-cell> 
     1557                                                                                                        <fo:table-cell> 
     1558                                                                                                                <fo:block> 
     1559                                                                                                                        <xsl:if test="witsml:rotated='true' or witsml:rotated='1'">yes</xsl:if> 
     1560                                                                                                                        <xsl:if test="witsml:rotated='false' or witsml:rotated='0'">no</xsl:if> 
    15651561                                                                                                                </fo:block> 
    15661562                                                                                                        </fo:table-cell> 
     
    16621658                                                                                                        <fo:table-cell> 
    16631659                                                                                                                <fo:block> 
    1664                                                                                                                         <xsl:variable name="element_fluidTypes" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='fluidTypes']/xsd:restriction"/> 
    1665                                                                                                                         <xsl:variable name="fluidTypes" select="witsml:typeFluid"/> 
    1666                                                                                                                         <xsl:if test="string($element_fluidTypes//xsd:enumeration[@value=$fluidTypes])"><fo:inline> 
    1667 <xsl:value-of select="$element_fluidTypes//xsd:enumeration[@value=$fluidTypes]"/> 
     1660                                                                                                                        <xsl:if test="string(witsml:typeFluid)"><fo:inline> 
     1661<xsl:value-of select="witsml:typeFluid"/> 
    16681662</fo:inline></xsl:if> 
    16691663                                                                                                                </fo:block> 
     
    28402834                                                                                                <fo:table-cell> 
    28412835                                                                                                        <fo:block> 
    2842                                                                                                                 <xsl:if test="witsml:goodSeal='true'">yes</xsl:if> 
    2843                                                                                                                 <xsl:if test="witsml:goodSeal='false'">no</xsl:if> 
     2836                                                                                                                <xsl:if test="witsml:goodSeal='true' or witsml:goodSeal='1'">yes</xsl:if> 
     2837                                                                                                                <xsl:if test="witsml:goodSeal='false' or witsml:goodSeal='0'">no</xsl:if> 
    28442838                                                                                                        </fo:block> 
    28452839                                                                                                </fo:table-cell>