root / projects / DailyDrillingReport_1.2 / XML / PDFreport / ddr_PDFReport_transformation_2011_03_09.xsl @ 182

Revision 179, 242.1 kB (checked in by yaolu, 13 years ago)

Added a new version of the files the PDF only using xml2pdf

Line 
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<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">
3        <xslt:output indent="yes" encoding="utf-8"/>
4        <xslt:param name="XFCrtLocalDate">2011-04-06</xslt:param>
5        <xslt:param name="XFCrtLocalTime">14:08:03</xslt:param>
6        <xslt:param name="XFCrtLocalDateTime">2011-04-06T14:08:03</xslt:param>
7        <xslt:param name="XFCrtUTCDate">2011-04-06</xslt:param>
8        <xslt:param name="XFCrtUTCTime">12:08:03</xslt:param>
9        <xslt:param name="XFCrtUTCDateTime">2011-04-06T12:08:03</xslt:param>
10        <xslt:param name="XFOutputFormat"/>
11        <!--
12                This stylesheet was generated for a 'en_US' Translation ID.
13                The Translation ID applies to both the whole text in a document and the locale-long and locale-short date formats.
14          -->
15        <!-- ============================ GROUPING KEYS =============================== -->
16        <!-- ============================ RAW XSL =============================== -->
17        <!-- =========================== SCRIPTS ================================ -->
18        <!-- ========================= ROOT TEMPLATE =========================== -->
19        <xsl:template match="/">
20                <fo:root>
21                        <fo:layout-master-set>
22                                <fo:simple-page-master master-name="Letter Page" page-width="30cm" page-height="20cm">
23                                        <fo:region-body region-name="xsl-region-body" margin="67.200px"/>
24                                        <fo:region-before region-name="xsl-region-before" display-align="after" extent="67.200px"/>
25                                        <fo:region-after region-name="xsl-region-after" display-align="before" extent="67.200px"/>
26                                        <fo:region-start region-name="xsl-region-start" extent="67.200px"/>
27                                        <fo:region-end region-name="xsl-region-end" extent="67.200px"/>
28                                </fo:simple-page-master>
29                        </fo:layout-master-set>
30                        <fo:page-sequence master-reference="Letter Page">
31                                <fo:flow flow-name="xsl-region-body" font-family="Times" font-size="11pt">
32                                        <xsl:variable name="ddrSchema">
33                                                <xsl:value-of select="'..\HTMLreport\WITSML_drillReport_profiled_schema_2011_01_29.xsd'"/>
34                                        </xsl:variable>
35                                        <xsl:variable name="element_objDrillReport_sequence" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='obj_drillReport']/xsd:sequence/xsd:sequence"/>
36                                        <xsl:variable name="element_drillReportWellboreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellboreInfo']/xsd:sequence"/>
37                                        <xsl:variable name="element_drillReportStatusInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStatusInfo']/xsd:sequence"/>
38                                        <xsl:variable name="urlRDS">
39                                                <xsl:value-of select="'http://www.posccaesar.org'"/>
40                                        </xsl:variable>
41                                        <xslt:comment> Report header </xslt:comment>
42                                        <fo:block>
43                                                <fo:table margin-top="-5.200px" table-layout="fixed" width="100%" border-collapse="collapse">
44                                                        <fo:table-column column-width="proportional-column-width(50.44)" column-number="1"/>
45                                                        <fo:table-column column-width="proportional-column-width(49.56)" column-number="2"/>
46                                                        <fo:table-body>
47                                                                <fo:table-row>
48                                                                        <fo:table-cell vertical-align="middle" horisontal-align="left">
49                                                                                <fo:block font-weight="bold" font-size="11pt">Summary report Wellbore: <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name)">
50                                                                                                <fo:inline>
51                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
52                                                                                                </fo:inline>
53                                                                                        </xsl:if>
54                                                                                </fo:block>
55                                                                        </fo:table-cell>
56                                                                        <fo:table-cell vertical-align="middle" horisontal-align="right">
57                                                                                <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))">
58                                                                                                <fo:inline font-weight="bold">
59                                                                                                        <xsl:value-of select="substring(/witsml:drillReports/witsml:drillReport/witsml:dTimEnd, 0, 17)"/>
60                                                                                                </fo:inline>
61                                                                                        </xsl:if>
62                                                                                </fo:block>
63                                                                        </fo:table-cell>
64                                                                </fo:table-row>
65                                                        </fo:table-body>
66                                                </fo:table>
67                                                <fo:leader rule-thickness="5px" leader-length="100%" leader-pattern="rule"/>
68                                                <fo:leader/>
69                                        </fo:block>
70                                        <xslt:comment> Wellbore info </xslt:comment>
71                                        <fo:block>
72                                                <xsl:variable name="url_versionKind">
73                                                        <xsl:value-of select="$element_objDrillReport_sequence//xsd:element[@name='versionKind']/@sawsdl:modelReference"/>
74                                                </xsl:variable>
75                                                <xsl:variable name="url_createDate">
76                                                        <xsl:value-of select="$element_objDrillReport_sequence//xsd:element[@name='createDate']/@sawsdl:modelReference"/>
77                                                </xsl:variable>
78                                                <xsl:variable name="url_operator">
79                                                        <xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='operator']/@sawsdl:modelReference"/>
80                                                </xsl:variable>
81                                                <xsl:variable name="url_drillContractor">
82                                                        <xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='drillContractor']/@sawsdl:modelReference"/>
83                                                </xsl:variable>
84                                                <xsl:variable name="url_rigAlias">
85                                                        <xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='rigAlias']/@sawsdl:modelReference"/>
86                                                </xsl:variable>
87                                                <xsl:variable name="url_dTimSpud">
88                                                        <xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='dTimSpud']/@sawsdl:modelReference"/>
89                                                </xsl:variable>
90                                                <xsl:variable name="url_dateDrillComplete">
91                                                        <xsl:value-of select="$element_drillReportWellboreInfo//xsd:element[@name='dateDrillComplete']/@sawsdl:modelReference"/>
92                                                </xsl:variable>
93                                                <xsl:variable name="url_elevKelly">
94                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='elevKelly']/@sawsdl:modelReference"/>
95                                                </xsl:variable>
96                                                <xsl:variable name="url_typeWellbore">
97                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='typeWellbore']/@sawsdl:modelReference"/>
98                                                </xsl:variable>
99                                                <xsl:variable name="url_mdKickoff">
100                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdKickoff']/@sawsdl:modelReference"/>
101                                                </xsl:variable>
102                                                <xsl:variable name="url_tvdKickoff">
103                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdKickoff']/@sawsdl:modelReference"/>
104                                                </xsl:variable>
105                                                <xsl:variable name="url_mdPlugTop">
106                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdPlugTop']/@sawsdl:modelReference"/>
107                                                </xsl:variable>
108                                                <xsl:variable name="url_md">
109                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
110                                                </xsl:variable>
111                                                <xsl:variable name="url_tvd">
112                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
113                                                </xsl:variable>
114                                                <xsl:variable name="url_distDrill">
115                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='distDrill']/@sawsdl:modelReference"/>
116                                                </xsl:variable>
117                                                <xsl:variable name="url_ropCurrent">
118                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='ropCurrent']/@sawsdl:modelReference"/>
119                                                </xsl:variable>
120                                                <xsl:variable name="url_diaHole">
121                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='diaHole']/@sawsdl:modelReference"/>
122                                                </xsl:variable>
123                                                <xsl:variable name="url_presTestType">
124                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='presTestType']/@sawsdl:modelReference"/>
125                                                </xsl:variable>
126                                                <xsl:variable name="url_strengthForm">
127                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='strengthForm']/@sawsdl:modelReference"/>
128                                                </xsl:variable>
129                                                <xsl:variable name="url_mdStrengthForm">
130                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdStrengthForm']/@sawsdl:modelReference"/>
131                                                </xsl:variable>
132                                                <xsl:variable name="url_tvdStrengthForm">
133                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdStrengthForm']/@sawsdl:modelReference"/>
134                                                </xsl:variable>
135                                                <xsl:variable name="url_diaCsgLast">
136                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='diaCsgLast']/@sawsdl:modelReference"/>
137                                                </xsl:variable>
138                                                <xsl:variable name="url_mdCsgLast">
139                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
140                                                </xsl:variable>
141                                                <xsl:variable name="url_tvdCsgLast">
142                                                        <xsl:value-of select="$element_drillReportStatusInfo//xsd:element[@name='tvdCsgLast']/@sawsdl:modelReference"/>
143                                                </xsl:variable>
144                                                <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
145                                                        <fo:table-column column-width="proportional-column-width(17.79)" column-number="1"/>
146                                                        <fo:table-column column-width="proportional-column-width(17.33)" column-number="2"/>
147                                                        <fo:table-column column-width="proportional-column-width(18.898)" column-number="3"/>
148                                                        <fo:table-column column-width="proportional-column-width(45.982)" column-number="4"/>
149                                                        <fo:table-body>
150                                                                <fo:table-row>
151                                                                        <fo:table-cell vertical-align="middle">
152                                                                                <fo:block font-weight="bold">Report Number:</fo:block>
153                                                                        </fo:table-cell>
154                                                                        <fo:table-cell vertical-align="middle">
155                                                                                <fo:block>
156                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:reportNo)">
157                                                                                                <fo:inline>
158                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:reportNo"/>
159                                                                                                </fo:inline>
160                                                                                        </xsl:if>
161                                                                                </fo:block>
162                                                                        </fo:table-cell>
163                                                                        <fo:table-cell vertical-align="middle">
164                                                                                <fo:block font-size="11pt" font-weight="bold">Period:</fo:block>
165                                                                        </fo:table-cell>
166                                                                        <fo:table-cell vertical-align="middle">
167                                                                                <fo:block>
168                                                                                        <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)))">
169                                                                                                <fo:inline>
170                                                                                                        <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))"/>
171                                                                                                </fo:inline>
172                                                                                        </xsl:if>
173                                                                                </fo:block>
174                                                                        </fo:table-cell>
175                                                                </fo:table-row>
176                                                                <fo:table-row>
177                                                                        <fo:table-cell vertical-align="middle">
178                                                                                <fo:block font-weight="bold">Wellbore:</fo:block>
179                                                                        </fo:table-cell>
180                                                                        <fo:table-cell vertical-align="middle">
181                                                                                <fo:block>
182                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name)">
183                                                                                                <fo:inline>
184                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD code']/witsml:name"/>
185                                                                                                </fo:inline>
186                                                                                        </xsl:if>
187                                                                                </fo:block>
188                                                                        </fo:table-cell>
189                                                                        <fo:table-cell vertical-align="middle">
190                                                                                <fo:block font-size="11pt" font-weight="bold">Wellbore Id:</fo:block>
191                                                                        </fo:table-cell>
192                                                                        <fo:table-cell vertical-align="middle">
193                                                                                <fo:block>
194                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD number']/witsml:name)">
195                                                                                                <fo:inline>
196                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreAlias[witsml:namingSystem='NPD number']/witsml:name"/>
197                                                                                                </fo:inline>
198                                                                                        </xsl:if>
199                                                                                </fo:block>
200                                                                        </fo:table-cell>
201                                                                </fo:table-row>
202                                                                <fo:table-row>
203                                                                        <fo:table-cell vertical-align="middle">
204                                                                                <fo:block font-weight="bold">
205                                                                                        <fo:basic-link external-destination="url({$url_versionKind})" font-weight="bold">Status:</fo:basic-link>
206                                                                 </fo:block>
207                                                                        </fo:table-cell>
208                                                                        <fo:table-cell vertical-align="middle">
209                                                                                <fo:block>
210                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:versionKind)">
211                                                                                                <fo:inline>
212                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:versionKind"/>
213                                                                                                </fo:inline>
214                                                                                        </xsl:if>
215                                                                                </fo:block>
216                                                                        </fo:table-cell>
217                                                                        <fo:table-cell vertical-align="middle">
218                                                                                <fo:block font-size="11pt" font-weight="bold">
219                                                                                        <fo:basic-link external-destination="url({$url_createDate})" font-weight="bold">Created date:</fo:basic-link>
220                                                                 </fo:block>
221                                                                        </fo:table-cell>
222                                                                        <fo:table-cell vertical-align="middle">
223                                                                                <fo:block>
224                                                                                        <xsl:if test="string(substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0, 17))">
225                                                                                                <fo:inline>
226                                                                                                        <xsl:value-of select="substring(/witsml:drillReports/witsml:drillReport/witsml:createDate, 0, 17)"/>
227                                                                                                </fo:inline>
228                                                                                        </xsl:if>
229                                                                                </fo:block>
230                                                                        </fo:table-cell>
231                                                                </fo:table-row>
232                                                                <fo:table-row>
233                                                                        <fo:table-cell vertical-align="middle">
234                                                                                <fo:block font-weight="bold">
235                                                                                        <fo:basic-link external-destination="url({$url_operator})" font-weight="bold">Operator:</fo:basic-link>
236                                                                 </fo:block>
237                                                                        </fo:table-cell>
238                                                                        <fo:table-cell vertical-align="middle">
239                                                                                <fo:block>
240                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:operator)">
241                                                                                                <fo:inline>
242                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:operator"/>
243                                                                                                </fo:inline>
244                                                                                        </xsl:if>
245                                                                                </fo:block>
246                                                                        </fo:table-cell>
247                                                                        <fo:table-cell vertical-align="middle">
248                                                                                <fo:block font-size="11pt" font-weight="bold">
249                                                                                        <fo:basic-link external-destination="url({$url_drillContractor})" font-weight="bold">Drilling contractor:</fo:basic-link>
250                                                                 </fo:block>
251                                                                        </fo:table-cell>
252                                                                        <fo:table-cell vertical-align="middle">
253                                                                                <fo:block>
254                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:drillContractor)">
255                                                                                                <fo:inline>
256                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:drillContractor"/>
257                                                                                                </fo:inline>
258                                                                                        </xsl:if>
259                                                                                </fo:block>
260                                                                        </fo:table-cell>
261                                                                </fo:table-row>
262                                                                <fo:table-row>
263                                                                        <fo:table-cell vertical-align="middle">
264                                                                                <fo:block font-weight="bold">
265                                                                                        <fo:basic-link external-destination="url({$url_rigAlias})" font-weight="bold">Rig name:</fo:basic-link>
266                                                                 </fo:block>
267                                                                        </fo:table-cell>
268                                                                        <fo:table-cell vertical-align="middle">
269                                                                                <fo:block>
270                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:rigAlias[witsml:namingSystem='NPD name']/witsml:name)">
271                                                                                                <fo:inline>
272                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:rigAlias[witsml:namingSystem='NPD name']/witsml:name"/>
273                                                                                                </fo:inline>
274                                                                                        </xsl:if>
275                                                                                </fo:block>
276                                                                        </fo:table-cell>
277                                                                        <fo:table-cell vertical-align="middle">
278                                                                                <fo:block font-size="11pt" font-weight="bold">
279                                                                                        <fo:basic-link external-destination="url({$url_rigAlias})" font-weight="bold">NPD Rig Id:</fo:basic-link>
280                                                                                        <fo:inline font-size="11pt" font-weight="bold"> </fo:inline> </fo:block>
281                                                                        </fo:table-cell>
282                                                                        <fo:table-cell vertical-align="middle">
283                                                                                <fo:block>
284                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:rigAlias[witsml:namingSystem='NPD code']/witsml:name)">
285                                                                                                <fo:inline>
286                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:rigAlias[witsml:namingSystem='NPD code']/witsml:name"/>
287                                                                                                </fo:inline>
288                                                                                        </xsl:if>
289                                                                                </fo:block>
290                                                                        </fo:table-cell>
291                                                                </fo:table-row>
292                                                                <fo:table-row height="17.840px" overflow="hidden">
293                                                                        <fo:table-cell vertical-align="middle">
294                                                                                <fo:block font-weight="bold">
295                                                                                        <fo:basic-link external-destination="url({$url_dTimSpud})" font-weight="bold">Spud date:</fo:basic-link>
296                                                                 </fo:block>
297                                                                        </fo:table-cell>
298                                                                        <fo:table-cell vertical-align="middle">
299                                                                                <fo:block>
300                                                                                        <xsl:if test="string(substring-before(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:dTimSpud, 'T'))">
301                                                                                                <fo:inline>
302                                                                                                        <xsl:value-of select="substring-before(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:dTimSpud, 'T')"/>
303                                                                                                </fo:inline>
304                                                                                        </xsl:if>
305                                                                                </fo:block>
306                                                                        </fo:table-cell>
307                                                                        <fo:table-cell vertical-align="middle">
308                                                                                <fo:block font-size="11pt" font-weight="bold">
309                                                                                        <fo:basic-link external-destination="url({$url_dateDrillComplete})" font-weight="bold">Date Well Complete:</fo:basic-link>
310                                                                 </fo:block>
311                                                                        </fo:table-cell>
312                                                                        <fo:table-cell vertical-align="middle">
313                                                                                <fo:block> <xsl:if test="string(substring-before(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:dateDrillComplete, 'T'))">
314                                                                                                <fo:inline>
315                                                                                                        <xsl:value-of select="substring-before(/witsml:drillReports/witsml:drillReport/witsml:wellboreInfo/witsml:dateDrillComplete, 'T')"/>
316                                                                                                </fo:inline>
317                                                                                        </xsl:if>
318                                                                                </fo:block>
319                                                                        </fo:table-cell>
320                                                                </fo:table-row>
321                                                                <fo:table-row>
322                                                                        <fo:table-cell vertical-align="middle">
323                                                                                <fo:block font-weight="bold">Elevation RKB-MSL <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:elevKelly/@uom)">
324                                                                                                <fo:inline font-weight="bold">
325                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:elevKelly/@uom"/>
326                                                                                                </fo:inline>
327                                                                                        </xsl:if>:</fo:block>
328                                                                        </fo:table-cell>
329                                                                        <fo:table-cell vertical-align="middle">
330                                                                                <fo:block>
331                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:elevKelly)">
332                                                                                                <fo:inline>
333                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:elevKelly"/>
334                                                                                                </fo:inline>
335                                                                                        </xsl:if>
336                                                                                </fo:block>
337                                                                        </fo:table-cell>
338                                                                        <fo:table-cell vertical-align="middle">
339                                                                                <fo:block font-size="11pt" font-weight="bold">Water depth MSL <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:waterDepth/@uom)">
340                                                                                                <fo:inline>
341                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:waterDepth/@uom"/>
342                                                                                                </fo:inline>
343                                                                                        </xsl:if>:</fo:block>
344                                                                        </fo:table-cell>
345                                                                        <fo:table-cell vertical-align="middle">
346                                                                                <fo:block>
347                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:waterDepth)">
348                                                                                                <fo:inline>
349                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:waterDepth"/>
350                                                                                                </fo:inline>
351                                                                                        </xsl:if>
352                                                                                </fo:block>
353                                                                        </fo:table-cell>
354                                                                </fo:table-row>
355                                                                <fo:table-row>
356                                                                        <fo:table-cell vertical-align="middle">
357                                                                                <fo:block font-weight="bold">
358                                                                                        <fo:basic-link external-destination="url({$urlRDS})" font-weight="bold">Tight well</fo:basic-link></fo:block>
359                                                                        </fo:table-cell>
360                                                                        <fo:table-cell vertical-align="middle">
361                                                                                <fo:block>
362                                                                                        <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>
363                                                                                        <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>
364                                                                                </fo:block>
365                                                                        </fo:table-cell>
366                                                                        <fo:table-cell vertical-align="middle">
367                                                                                <fo:block font-size="11pt" font-weight="bold">
368                                                                                        <fo:basic-link external-destination="url({$urlRDS})" font-weight="bold">High pressure - High temperature</fo:basic-link>  </fo:block>
369                                                                        </fo:table-cell>
370                                                                        <fo:table-cell vertical-align="middle">
371                                                                                <fo:block>
372                                                                                        <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>
373                                                                                        <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>
374                                                                                </fo:block>
375                                                                        </fo:table-cell>
376                                                                </fo:table-row>
377                                                                <fo:table-row>
378                                                                        <fo:table-cell vertical-align="middle">
379                                                                                <fo:block font-weight="bold">
380                                                                                        <fo:basic-link external-destination="url({$urlRDS})">Pressure </fo:basic-link>
381                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:avgPresBH/@uom)">
382                                                                                                <fo:inline>
383                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:avgPresBH/@uom"/>
384                                                                                                </fo:inline>
385                                                                                        </xsl:if></fo:block>
386                                                                        </fo:table-cell>
387                                                                        <fo:table-cell vertical-align="middle">
388                                                                                <fo:block>
389                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:avgPresBH)">
390                                                                                                <fo:inline>
391                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:avgPresBH"/>
392                                                                                                </fo:inline>
393                                                                                        </xsl:if>
394                                                                                </fo:block>
395                                                                        </fo:table-cell>
396                                                                        <fo:table-cell vertical-align="middle">
397                                                                                <fo:block font-size="11pt" font-weight="bold">
398                                                                                        <fo:basic-link external-destination="url({$urlRDS})">Temperature </fo:basic-link>
399                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:expTempBH/@uom)">
400                                                                                                <fo:inline>
401                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:expTempBH/@uom"/>
402                                                                                                </fo:inline>
403                                                                                        </xsl:if></fo:block>
404                                                                        </fo:table-cell>
405                                                                        <fo:table-cell vertical-align="middle">
406                                                                                <fo:block>
407                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:expTempBH)">
408                                                                                                <fo:inline>
409                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:expTempBH"/>
410                                                                                                </fo:inline>
411                                                                                        </xsl:if>
412                                                                                </fo:block>
413                                                                        </fo:table-cell>
414                                                                </fo:table-row>
415                                                                <fo:table-row>
416                                                                        <fo:table-cell vertical-align="middle">
417                                                                                <fo:block font-weight="bold">Fixed rig</fo:block>
418                                                                        </fo:table-cell>
419                                                                        <fo:table-cell vertical-align="middle">
420                                                                                <fo:block>
421                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:fixedRig)">
422                                                                                                <fo:inline>
423                                                                                                        <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:fixedRig='true' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:fixedRig='1'">yes</xsl:if>
424                                                                                                        <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:fixedRig='false' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:fixedRig='0'">no</xsl:if>
425                                                                                                </fo:inline>
426                                                                                        </xsl:if>
427                                                                                </fo:block>
428                                                                        </fo:table-cell>
429                                                                        <fo:table-cell vertical-align="middle">
430                                                                                <fo:block font-size="11pt" font-weight="bold">
431                                                                                        <fo:basic-link external-destination="url({$url_typeWellbore})">Wellbore type:</fo:basic-link>   </fo:block>
432                                                                        </fo:table-cell>
433                                                                        <fo:table-cell vertical-align="middle">
434                                                                                <fo:block>
435                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:typeWellbore)">
436                                                                                                <fo:inline>
437                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:typeWellbore"/>
438                                                                                                </fo:inline>
439                                                                                        </xsl:if>
440                                                                                </fo:block>
441                                                                        </fo:table-cell>
442                                                                </fo:table-row>
443                                                                <fo:table-row>
444                                                                        <fo:table-cell vertical-align="middle">
445                                                                                <fo:block font-weight="bold">
446                                                                                        <fo:basic-link external-destination="url({$url_mdKickoff})">Depth at Kick Off mMD:</fo:basic-link>   </fo:block>
447                                                                        </fo:table-cell>
448                                                                        <fo:table-cell vertical-align="middle">
449                                                                                <fo:block>
450                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdKickoff)">
451                                                                                                <fo:inline>
452                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdKickoff"/>
453                                                                                                </fo:inline>
454                                                                                        </xsl:if>
455                                                                                </fo:block>
456                                                                        </fo:table-cell>
457                                                                        <fo:table-cell vertical-align="middle">
458                                                                                <fo:block font-size="11pt" font-weight="bold">
459                                                                                        <fo:basic-link external-destination="url({$url_tvdKickoff})">Depth at Kick Off mTVD:</fo:basic-link>  </fo:block>
460                                                                        </fo:table-cell>
461                                                                        <fo:table-cell vertical-align="middle">
462                                                                                <fo:block>
463                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdKickoff)">
464                                                                                                <fo:inline>
465                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdKickoff"/>
466                                                                                                </fo:inline>
467                                                                                        </xsl:if>
468                                                                                </fo:block>
469                                                                        </fo:table-cell>
470                                                                </fo:table-row>
471                                                                <fo:table-row>
472                                                                        <fo:table-cell vertical-align="middle">
473                                                                                <fo:block font-weight="bold">
474                                                                                        <fo:basic-link external-destination="url({$url_md})">Depth mMD:</fo:basic-link>  </fo:block>
475                                                                        </fo:table-cell>
476                                                                        <fo:table-cell vertical-align="middle">
477                                                                                <fo:block>
478                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:md)">
479                                                                                                <fo:inline>
480                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:md"/>
481                                                                                                </fo:inline>
482                                                                                        </xsl:if>
483                                                                                </fo:block>
484                                                                        </fo:table-cell>
485                                                                        <fo:table-cell vertical-align="middle">
486                                                                                <fo:block font-size="11pt" font-weight="bold">
487                                                                                        <fo:basic-link external-destination="url({$url_tvd})">Depth mTVD:</fo:basic-link>  </fo:block>
488                                                                        </fo:table-cell>
489                                                                        <fo:table-cell vertical-align="middle">
490                                                                                <fo:block>
491                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvd)">
492                                                                                                <fo:inline>
493                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvd"/>
494                                                                                                </fo:inline>
495                                                                                        </xsl:if>
496                                                                                </fo:block>
497                                                                        </fo:table-cell>
498                                                                </fo:table-row>
499                                                                <fo:table-row>
500                                                                        <fo:table-cell vertical-align="middle">
501                                                                                <fo:block font-weight="bold">
502                                                                                        <fo:basic-link external-destination="url({$url_mdPlugTop})">Plug Back Depth mMD:</fo:basic-link>  </fo:block>
503                                                                        </fo:table-cell>
504                                                                        <fo:table-cell vertical-align="middle">
505                                                                                <fo:block>
506                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdPlugTop)">
507                                                                                                <fo:inline>
508                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdPlugTop"/>
509                                                                                                </fo:inline>
510                                                                                        </xsl:if>
511                                                                                </fo:block>
512                                                                        </fo:table-cell>
513                                                                        <fo:table-cell vertical-align="middle">
514                                                                                <fo:block font-size="11pt" font-weight="bold">
515                                                                                        <fo:basic-link external-destination="url({$url_distDrill})">Dist Drilled</fo:basic-link>  <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:distDrill/@uom)">
516                                                                                                <fo:inline>
517                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:distDrill/@uom"/>
518                                                                                                </fo:inline>
519                                                                                        </xsl:if></fo:block>
520                                                                        </fo:table-cell>
521                                                                        <fo:table-cell vertical-align="middle">
522                                                                                <fo:block>
523                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:distDrill)">
524                                                                                                <fo:inline>
525                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:distDrill"/>
526                                                                                                </fo:inline>
527                                                                                        </xsl:if>
528                                                                                </fo:block>
529                                                                        </fo:table-cell>
530                                                                </fo:table-row>
531                                                                <fo:table-row>
532                                                                        <fo:table-cell vertical-align="middle">
533                                                                                <fo:block font-weight="bold">
534                                                                                        <fo:basic-link external-destination="url({$url_ropCurrent})">Penetration Rate</fo:basic-link> <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:ropCurrent/@uom)">
535                                                                                                <fo:inline>
536                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:ropCurrent/@uom"/>
537                                                                                                </fo:inline>
538                                                                                        </xsl:if></fo:block>
539                                                                        </fo:table-cell>
540                                                                        <fo:table-cell vertical-align="middle">
541                                                                                <fo:block>
542                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:ropCurrent)">
543                                                                                                <fo:inline>
544                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:ropCurrent"/>
545                                                                                                </fo:inline>
546                                                                                        </xsl:if>
547                                                                                </fo:block>
548                                                                        </fo:table-cell>
549                                                                        <fo:table-cell vertical-align="middle">
550                                                                                <fo:block font-size="11pt" font-weight="bold">
551                                                                                        <fo:basic-link external-destination="url({$url_diaHole})">Hole Dia </fo:basic-link>
552                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaHole/@uom)">
553                                                                                                <fo:inline>
554                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaHole/@uom"/>
555                                                                                                </fo:inline>
556                                                                                        </xsl:if></fo:block>
557                                                                        </fo:table-cell>
558                                                                        <fo:table-cell vertical-align="middle">
559                                                                                <fo:block>
560                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaHole)">
561                                                                                                <fo:inline>
562                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaHole"/>
563                                                                                                </fo:inline>
564                                                                                        </xsl:if>
565                                                                                </fo:block>
566                                                                        </fo:table-cell>
567                                                                </fo:table-row>
568                                                                <fo:table-row>
569                                                                        <fo:table-cell vertical-align="middle">
570                                                                                <fo:block font-weight="bold">
571                                                                                        <fo:basic-link external-destination="url({$url_presTestType})">Pressure Test Type:</fo:basic-link>  </fo:block>
572                                                                        </fo:table-cell>
573                                                                        <fo:table-cell vertical-align="middle">
574                                                                                <fo:block>
575                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:presTestType)">
576                                                                                                <fo:inline>
577                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:presTestType"/>
578                                                                                                </fo:inline>
579                                                                                        </xsl:if>
580                                                                                </fo:block>
581                                                                        </fo:table-cell>
582                                                                        <fo:table-cell vertical-align="middle">
583                                                                                <fo:block font-size="11pt" font-weight="bold">
584                                                                                        <fo:basic-link external-destination="url({$url_strengthForm})">Formation Strength</fo:basic-link>
585                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:strengthForm/@uom)">
586                                                                                                <fo:inline>
587                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:strengthForm/@uom"/>
588                                                                                                </fo:inline>
589                                                                                        </xsl:if></fo:block>
590                                                                        </fo:table-cell>
591                                                                        <fo:table-cell vertical-align="middle">
592                                                                                <fo:block>
593                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:strengthForm)">
594                                                                                                <fo:inline>
595                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:strengthForm"/>
596                                                                                                </fo:inline>
597                                                                                        </xsl:if>
598                                                                                </fo:block>
599                                                                        </fo:table-cell>
600                                                                </fo:table-row>
601                                                                <fo:table-row>
602                                                                        <fo:table-cell vertical-align="middle">
603                                                                                <fo:block font-weight="bold">
604                                                                                        <fo:basic-link external-destination="url({$url_mdStrengthForm})">Depth At Formation Strength mMD:</fo:basic-link>   </fo:block>
605                                                                        </fo:table-cell>
606                                                                        <fo:table-cell vertical-align="middle">
607                                                                                <fo:block>
608                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdStrengthForm)">
609                                                                                                <fo:inline>
610                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdStrengthForm"/>
611                                                                                                </fo:inline>
612                                                                                        </xsl:if>
613                                                                                </fo:block>
614                                                                        </fo:table-cell>
615                                                                        <fo:table-cell vertical-align="middle">
616                                                                                <fo:block font-size="11pt" font-weight="bold">
617                                                                                        <fo:basic-link external-destination="url({$url_tvdStrengthForm})">Depth At Formation Strength mTVD</fo:basic-link></fo:block>
618                                                                        </fo:table-cell>
619                                                                        <fo:table-cell vertical-align="middle">
620                                                                                <fo:block>
621                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdStrengthForm)">
622                                                                                                <fo:inline>
623                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdStrengthForm"/>
624                                                                                                </fo:inline>
625                                                                                        </xsl:if>
626                                                                                </fo:block>
627                                                                        </fo:table-cell>
628                                                                </fo:table-row>
629                                                                <fo:table-row>
630                                                                        <fo:table-cell vertical-align="middle">
631                                                                                <fo:block font-weight="bold">
632                                                                                        <fo:basic-link external-destination="url({$url_diaCsgLast})">Dia Last Casing</fo:basic-link>  <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaCsgLast/@uom)">
633                                                                                                <fo:inline>
634                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaCsgLast/@uom"/>
635                                                                                                </fo:inline>
636                                                                                        </xsl:if></fo:block>
637                                                                        </fo:table-cell>
638                                                                        <fo:table-cell vertical-align="middle">
639                                                                                <fo:block>
640                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaCsgLast)">
641                                                                                                <fo:inline>
642                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:diaCsgLast"/>
643                                                                                                </fo:inline>
644                                                                                        </xsl:if>
645                                                                                </fo:block>
646                                                                        </fo:table-cell>
647                                                                        <fo:table-cell vertical-align="middle">
648                                                                                <fo:block font-size="11pt" font-weight="bold">
649                                                                                        <fo:basic-link external-destination="url({$url_mdCsgLast})">Depth At Last Casing mMD:</fo:basic-link>
650                                                                 </fo:block>
651                                                                        </fo:table-cell>
652                                                                        <fo:table-cell vertical-align="middle">
653                                                                                <fo:block>
654                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdCsgLast)">
655                                                                                                <fo:inline>
656                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:mdCsgLast"/>
657                                                                                                </fo:inline>
658                                                                                        </xsl:if>
659                                                                                </fo:block>
660                                                                        </fo:table-cell>
661                                                                </fo:table-row>
662                                                                <fo:table-row>
663                                                                        <fo:table-cell vertical-align="middle">
664                                                                                <fo:block font-weight="bold">
665                                                                                        <fo:basic-link external-destination="url({$url_tvdCsgLast})">Depth At Last Casing mTVD:</fo:basic-link>
666                                                                 </fo:block>
667                                                                        </fo:table-cell>
668                                                                        <fo:table-cell vertical-align="middle">
669                                                                                <fo:block>
670                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdCsgLast)">
671                                                                                                <fo:inline>
672                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tvdCsgLast"/>
673                                                                                                </fo:inline>
674                                                                                        </xsl:if>
675                                                                                </fo:block>
676                                                                        </fo:table-cell>
677                                                                        <fo:table-cell vertical-align="middle">
678                                                                                <fo:block font-size="11pt" font-weight="bold"> </fo:block>
679                                                                        </fo:table-cell>
680                                                                        <fo:table-cell vertical-align="middle">
681                                                                                <fo:block> </fo:block>
682                                                                        </fo:table-cell>
683                                                                </fo:table-row>
684                                                        </fo:table-body>
685                                                </fo:table>
686                                        </fo:block>
687                                        <xslt:comment> Summary of activity </xslt:comment>
688                                        <fo:block break-before="page">
689                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
690                                                <fo:leader/>
691                                                <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
692                                                        <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
693                                                        <fo:table-body>
694                                                                <fo:table-row font-weight="bold" font-size="14pt">
695                                                                        <fo:table-cell>
696                                                                                <fo:block>Summary of Activities (24 Hours)</fo:block>
697                                                                        </fo:table-cell>
698                                                                </fo:table-row>
699                                                                <fo:table-row>
700                                                                        <fo:table-cell>
701                                                                                <fo:block>
702                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:sum24Hr)">
703                                                                                                <fo:inline>
704                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:sum24Hr"/>
705                                                                                                </fo:inline>
706                                                                                        </xsl:if>
707                                                                                </fo:block>
708                                                                        </fo:table-cell>
709                                                                </fo:table-row>
710                                                        </fo:table-body>
711                                                </fo:table>
712                                        </fo:block>
713                                        <xslt:comment> Summary of Planned Activities </xslt:comment>
714                                        <fo:block>
715                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
716                                                <fo:leader/>
717                                                <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
718                                                        <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
719                                                        <fo:table-body>
720                                                                <fo:table-row font-weight="bold" font-size="14pt">
721                                                                        <fo:table-cell>
722                                                                                <fo:block>Summary of Planned Activities (Next 24 Hours)</fo:block>
723                                                                        </fo:table-cell>
724                                                                </fo:table-row>
725                                                                <fo:table-row>
726                                                                        <fo:table-cell>
727                                                                                <fo:block>
728                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:forecast24Hr)">
729                                                                                                <fo:inline>
730                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:forecast24Hr"/>
731                                                                                                </fo:inline>
732                                                                                        </xsl:if>
733                                                                                </fo:block>
734                                                                        </fo:table-cell>
735                                                                </fo:table-row>
736                                                        </fo:table-body>
737                                                </fo:table>
738                                        </fo:block>
739                                        <xslt:comment> Operations </xslt:comment>
740                                        <fo:block break-before="page">
741                                                <xsl:variable name="element_activity" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_activity']/xsd:sequence"/>
742                                                <xsl:variable name="url_dTimStart">
743                                                        <xsl:value-of select="$element_activity//xsd:element[@name='dTimStart']/@sawsdl:modelReference"/>
744                                                </xsl:variable>
745                                                <xsl:variable name="url_dTimEnd">
746                                                        <xsl:value-of select="$element_activity//xsd:element[@name='dTimEnd']/@sawsdl:modelReference"/>
747                                                </xsl:variable>
748                                                <xsl:variable name="url_md">
749                                                        <xsl:value-of select="$element_activity//xsd:element[@name='md']/@sawsdl:modelReference"/>
750                                                </xsl:variable>
751                                                <xsl:variable name="url_proprietaryCode">
752                                                        <xsl:value-of select="$element_activity//xsd:element[@name='proprietaryCode']/@sawsdl:modelReference"/>
753                                                </xsl:variable>
754                                                <xsl:variable name="url_state">
755                                                        <xsl:value-of select="$element_activity//xsd:element[@name='state']/@sawsdl:modelReference"/>
756                                                </xsl:variable>
757                                                <xsl:variable name="url_comments">
758                                                        <xsl:value-of select="$element_activity//xsd:element[@name='comments']/@sawsdl:modelReference"/>
759                                                </xsl:variable>
760                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
761                                                <fo:leader/>
762                                                <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
763                                                        <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
764                                                        <fo:table-body>
765                                                                <fo:table-row font-weight="bold" font-size="14pt">
766                                                                        <fo:table-cell>
767                                                                                <fo:block>Operation</fo:block>
768                                                                        </fo:table-cell>
769                                                                </fo:table-row>
770                                                                <fo:table-row>
771                                                                        <fo:table-cell>
772                                                                                <fo:block font-weight="bold"> </fo:block>
773                                                                        </fo:table-cell>
774                                                                </fo:table-row>
775                                                                <fo:table-row>
776                                                                        <fo:table-cell>
777                                                                                <fo:block>
778                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
779                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="1"/>
780                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="2"/>
781                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="3"/>
782                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="4"/>
783                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="5"/>
784                                                                                                <fo:table-column column-width="proportional-column-width(12)" column-number="6"/>
785                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
786                                                                                                <fo:table-column column-width="proportional-column-width(48)" column-number="8"/>
787                                                                                                <fo:table-body>
788                                                                                                        <fo:table-row font-weight="bold">
789                                                                                                                <fo:table-cell>
790                                                                                                                        <fo:block>
791                                                                                                                                <fo:basic-link external-destination="url({$url_dTimStart})">Start Time</fo:basic-link>
792                                                                                                                        </fo:block>
793                                                                                                                </fo:table-cell>
794                                                                                                                <fo:table-cell>
795                                                                                                                        <fo:block>
796                                                                                                                                <fo:basic-link external-destination="url({$url_dTimEnd})">End Time</fo:basic-link>
797                                                                                                                        </fo:block>
798                                                                                                                </fo:table-cell>
799                                                                                                                <fo:table-cell>
800                                                                                                                        <fo:block>
801                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Start Depth</fo:basic-link>
802                                                                                                                        </fo:block>
803                                                                                                                        <fo:block>mMD</fo:block>
804                                                                                                                </fo:table-cell>
805                                                                                                                <fo:table-cell>
806                                                                                                                        <fo:block>
807                                                                                                                                <fo:basic-link external-destination="url({$url_md})">End Depth</fo:basic-link>
808                                                                                                                        </fo:block>
809                                                                                                                        <fo:block>mMD</fo:block>
810                                                                                                                </fo:table-cell>
811                                                                                                                <fo:table-cell>
812                                                                                                                        <fo:block>
813                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
814                                                                                                                        </fo:block>
815                                                                                                                        <fo:block>mMD</fo:block>
816                                                                                                                </fo:table-cell>
817                                                                                                                <fo:table-cell>
818                                                                                                                        <fo:block>
819                                                                                                                                <fo:basic-link external-destination="url({$url_proprietaryCode})">Main Oper Class</fo:basic-link>
820                                                                                                                        </fo:block>
821                                                                                                                </fo:table-cell>
822                                                                                                                <fo:table-cell>
823                                                                                                                        <fo:block>
824                                                                                                                                <fo:basic-link external-destination="url({$url_state})">Main Oper Eval Class</fo:basic-link>
825                                                                                                                        </fo:block>
826                                                                                                                </fo:table-cell>
827                                                                                                                <fo:table-cell>
828                                                                                                                        <fo:block>
829                                                                                                                                <fo:basic-link external-destination="url({$url_comments})">Remark</fo:basic-link>
830                                                                                                                        </fo:block>
831                                                                                                                </fo:table-cell>
832                                                                                                        </fo:table-row>
833                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:activity">
834                                                                                                                <fo:table-row>
835                                                                                                                        <fo:table-cell>
836                                                                                                                                <fo:block>
837                                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimStart, 0, 17), 'T'))">
838                                                                                                                                                <fo:inline>
839                                                                                                                                                        <xsl:value-of select="substring-after(substring(witsml:dTimStart, 0, 17), 'T')"/>
840                                                                                                                                                </fo:inline>
841                                                                                                                                        </xsl:if>
842                                                                                                                                </fo:block>
843                                                                                                                        </fo:table-cell>
844                                                                                                                        <fo:table-cell>
845                                                                                                                                <fo:block>
846                                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimEnd, 0, 17), 'T'))">
847                                                                                                                                                <fo:inline>
848                                                                                                                                                        <xsl:value-of select="substring-after(substring(witsml:dTimEnd, 0, 17), 'T')"/>
849                                                                                                                                                </fo:inline>
850                                                                                                                                        </xsl:if>
851                                                                                                                                </fo:block>
852                                                                                                                        </fo:table-cell>
853                                                                                                                        <fo:table-cell>
854                                                                                                                                <fo:block>
855                                                                                                                                        <xsl:if test="string(witsml:mdHoleStart)">
856                                                                                                                                                <fo:inline>
857                                                                                                                                                        <xsl:value-of select="witsml:mdHoleStart"/>
858                                                                                                                                                </fo:inline>
859                                                                                                                                        </xsl:if>
860                                                                                                                                </fo:block>
861                                                                                                                        </fo:table-cell>
862                                                                                                                        <fo:table-cell>
863                                                                                                                                <fo:block>
864                                                                                                                                        <xsl:if test="string(witsml:mdHoleEnd)">
865                                                                                                                                                <fo:inline>
866                                                                                                                                                        <xsl:value-of select="witsml:mdHoleEnd"/>
867                                                                                                                                                </fo:inline>
868                                                                                                                                        </xsl:if>
869                                                                                                                                </fo:block>
870                                                                                                                        </fo:table-cell>
871                                                                                                                        <fo:table-cell>
872                                                                                                                                <fo:block>
873                                                                                                                                        <xsl:if test="string(witsml:md)">
874                                                                                                                                                <fo:inline>
875                                                                                                                                                        <xsl:value-of select="witsml:md"/>
876                                                                                                                                                </fo:inline>
877                                                                                                                                        </xsl:if>
878                                                                                                                                </fo:block>
879                                                                                                                        </fo:table-cell>
880                                                                                                                        <fo:table-cell>
881                                                                                                                                <fo:block>
882                                                                                                                                        <xsl:if test="string(witsml:proprietaryCode)">
883                                                                                                                                                <fo:inline>
884                                                                                                                                                        <xsl:value-of select="witsml:proprietaryCode"/>
885                                                                                                                                                </fo:inline>
886                                                                                                                                        </xsl:if>
887                                                                                                                                </fo:block>
888                                                                                                                        </fo:table-cell>
889                                                                                                                        <fo:table-cell>
890                                                                                                                                <fo:block>
891                                                                                                                                        <xsl:if test="string(witsml:state)">
892                                                                                                                                                <fo:inline>
893                                                                                                                                                        <xsl:value-of select="witsml:state"/>
894                                                                                                                                                </fo:inline>
895                                                                                                                                        </xsl:if>
896                                                                                                                                </fo:block>
897                                                                                                                        </fo:table-cell>
898                                                                                                                        <fo:table-cell>
899                                                                                                                                <fo:block>
900                                                                                                                                        <xsl:if test="string(witsml:comments)">
901                                                                                                                                                <fo:inline>
902                                                                                                                                                        <xsl:value-of select="witsml:comments"/>
903                                                                                                                                                </fo:inline>
904                                                                                                                                        </xsl:if>
905                                                                                                                                </fo:block>
906                                                                                                                        </fo:table-cell>
907                                                                                                                </fo:table-row>
908                                                                                                        </xsl:for-each>
909                                                                                                </fo:table-body>
910                                                                                        </fo:table>
911                                                                                </fo:block>
912                                                                        </fo:table-cell>
913                                                                </fo:table-row>
914                                                        </fo:table-body>
915                                                </fo:table>
916                                        </fo:block>
917                                        <xslt:comment> Equipment failure info </xslt:comment>
918                                        <fo:block>
919                                                <xsl:variable name="element_equipFailureInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportEquipFailureInfo']/xsd:sequence"/>
920                                                <xsl:variable name="url_dTim">
921                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
922                                                </xsl:variable>
923                                                <xsl:variable name="url_md">
924                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
925                                                </xsl:variable>
926                                                <xsl:variable name="url_equipClass">
927                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='equipClass']/@sawsdl:modelReference"/>
928                                                </xsl:variable>
929                                                <xsl:variable name="url_eTimMissProduction">
930                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='eTimMissProduction']/@sawsdl:modelReference"/>
931                                                </xsl:variable>
932                                                <xsl:variable name="url_dTimRepair">
933                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='dTimRepair']/@sawsdl:modelReference"/>
934                                                </xsl:variable>
935                                                <xsl:variable name="url_description">
936                                                        <xsl:value-of select="$element_equipFailureInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
937                                                </xsl:variable>
938                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
939                                                <fo:leader/>
940                                                <fo:table>
941                                                        <fo:table-column column-width="100%"/>
942                                                        <fo:table-body>
943                                                                <fo:table-row font-weight="bold" font-size="14pt">
944                                                                        <fo:table-cell>
945                                                                                <fo:block>
946                                                                        Equipment Failure Information
947                                                                                </fo:block>
948                                                                        </fo:table-cell>
949                                                                </fo:table-row>
950                                                                <fo:table-row font-weight="bold" font-size="14pt">
951                                                                        <fo:table-cell>
952                                                                                <fo:block> </fo:block>
953                                                                        </fo:table-cell>
954                                                                </fo:table-row>
955                                                                <fo:table-row>
956                                                                        <fo:table-cell>
957                                                                                <fo:block>
958                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
959                                                                                                <fo:table-column column-width="proportional-column-width(12)" column-number="1"/>
960                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="2"/>
961                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="3"/>
962                                                                                                <fo:table-column column-width="proportional-column-width(7)" column-number="4"/>
963                                                                                                <fo:table-column column-width="proportional-column-width(14)" column-number="5"/>
964                                                                                                <fo:table-column column-width="proportional-column-width(46)" column-number="6"/>
965                                                                                                <fo:table-body>
966                                                                                                        <fo:table-row font-weight="bold">
967                                                                                                                <fo:table-cell>
968                                                                                                                        <fo:block>
969                                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Start</fo:basic-link>
970                                                                                                                        </fo:block>
971                                                                                                                </fo:table-cell>
972                                                                                                                <fo:table-cell>
973                                                                                                                        <fo:block>
974                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
975                                                                                                                        </fo:block>
976                                                                                                                        <fo:block>mMD</fo:block>
977                                                                                                                </fo:table-cell>
978                                                                                                                <fo:table-cell>
979                                                                                                                        <fo:block>
980                                                                                                                                <fo:basic-link external-destination="url({$url_equipClass})">Sub Equip Syst Class</fo:basic-link>
981                                                                                                                        </fo:block>
982                                                                                                                </fo:table-cell>
983                                                                                                                <fo:table-cell>
984                                                                                                                        <fo:block>
985                                                                                                                                <fo:basic-link external-destination="url({$url_eTimMissProduction})">Operation Downtime</fo:basic-link>
986                                                                                                                        </fo:block>
987                                                                                                                        <fo:block>
988                                                                                                                                <xsl:if test="string(/drillReports/drillReport/equipFailureInfo/eTimMissProduction/@uom)">
989                                                                                                                                        <fo:inline>
990                                                                                                                                                <xsl:value-of select="/drillReports/drillReport/equipFailureInfo/eTimMissProduction/@uom"/>
991                                                                                                                                        </fo:inline>
992                                                                                                                                </xsl:if>
993                                                                                                                        </fo:block>
994                                                                                                                </fo:table-cell>
995                                                                                                                <fo:table-cell>
996                                                                                                                        <fo:block>
997                                                                                                                                <fo:basic-link external-destination="url({$url_dTimRepair})">Equipment Repaired</fo:basic-link>
998                                                                                                                        </fo:block>
999                                                                                                                </fo:table-cell>
1000                                                                                                                <fo:table-cell>
1001                                                                                                                        <fo:block>
1002                                                                                                                                <fo:basic-link external-destination="url({$url_description})">Equip Failure Description</fo:basic-link>
1003                                                                                                                        </fo:block>
1004                                                                                                                </fo:table-cell>
1005                                                                                                        </fo:table-row>
1006                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:equipFailureInfo">
1007                                                                                                                <fo:table-row>
1008                                                                                                                        <fo:table-cell>
1009                                                                                                                                <fo:block>
1010                                                                                                                                        <xsl:if test="string(substring(witsml:dTim, 0, 17))">
1011                                                                                                                                                <fo:inline>
1012                                                                                                                                                        <xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
1013                                                                                                                                                </fo:inline>
1014                                                                                                                                        </xsl:if>
1015                                                                                                                                </fo:block>
1016                                                                                                                        </fo:table-cell>
1017                                                                                                                        <fo:table-cell>
1018                                                                                                                                <fo:block>
1019                                                                                                                                        <xsl:if test="string(witsml:md)">
1020                                                                                                                                                <fo:inline>
1021                                                                                                                                                        <xsl:value-of select="witsml:md"/>
1022                                                                                                                                                </fo:inline>
1023                                                                                                                                        </xsl:if>
1024                                                                                                                                </fo:block>
1025                                                                                                                        </fo:table-cell>
1026                                                                                                                        <fo:table-cell>
1027                                                                                                                                <fo:block>
1028                                                                                                                                        <xsl:if test="string(witsml:equipClass)">
1029                                                                                                                                                <fo:inline>
1030                                                                                                                                                        <xsl:value-of select="witsml:equipClass"/>
1031                                                                                                                                                </fo:inline>
1032                                                                                                                                        </xsl:if>
1033                                                                                                                                </fo:block>
1034                                                                                                                        </fo:table-cell>
1035                                                                                                                        <fo:table-cell>
1036                                                                                                                                <fo:block>
1037                                                                                                                                        <xsl:if test="string(witsml:eTimMissProduction)">
1038                                                                                                                                                <fo:inline>
1039                                                                                                                                                        <xsl:value-of select="witsml:eTimMissProduction"/>
1040                                                                                                                                                </fo:inline>
1041                                                                                                                                        </xsl:if>
1042                                                                                                                                </fo:block>
1043                                                                                                                        </fo:table-cell>
1044                                                                                                                        <fo:table-cell>
1045                                                                                                                                <fo:block>
1046                                                                                                                                        <xsl:if test="string(substring(witsml:dTimRepair, 0, 17))">
1047                                                                                                                                                <fo:inline>
1048                                                                                                                                                        <xsl:value-of select="substring(witsml:dTimRepair, 0, 17)"/>
1049                                                                                                                                                </fo:inline>
1050                                                                                                                                        </xsl:if>
1051                                                                                                                                </fo:block>
1052                                                                                                                        </fo:table-cell>
1053                                                                                                                        <fo:table-cell>
1054                                                                                                                                <fo:block>
1055                                                                                                                                        <xsl:if test="string(witsml:description)">
1056                                                                                                                                                <fo:inline>
1057                                                                                                                                                        <xsl:value-of select="witsml:description"/>
1058                                                                                                                                                </fo:inline>
1059                                                                                                                                        </xsl:if>
1060                                                                                                                                </fo:block>
1061                                                                                                                        </fo:table-cell>
1062                                                                                                                </fo:table-row>
1063                                                                                                        </xsl:for-each>
1064                                                                                                </fo:table-body>
1065                                                                                        </fo:table> </fo:block>
1066                                                                        </fo:table-cell>
1067                                                                </fo:table-row>
1068                                                        </fo:table-body>
1069                                                </fo:table>
1070                                        </fo:block>
1071                                        <xslt:comment> Bit Record </xslt:comment>
1072                                        <fo:block break-before="page">
1073                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1074                                                <fo:leader/>
1075                                                <xsl:variable name="element_bitRecord" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_bitRecord']/xsd:sequence"/>
1076                                                <xsl:variable name="url_numBit">
1077                                                        <xsl:value-of select="$element_bitRecord//xsd:element[@name='numBit']/@sawsdl:modelReference"/>
1078                                                </xsl:variable>
1079                                                <xsl:variable name="url_diaBit">
1080                                                        <xsl:value-of select="$element_bitRecord//xsd:element[@name='diaBit']/@sawsdl:modelReference"/>
1081                                                </xsl:variable>
1082                                                <xsl:variable name="url_codeMfg">
1083                                                        <xsl:value-of select="$element_bitRecord//xsd:element[@name='codeMfg']/@sawsdl:modelReference"/>
1084                                                </xsl:variable>
1085                                                <xsl:variable name="url_manufacturer">
1086                                                        <xsl:value-of select="$element_bitRecord//xsd:element[@name='manufacturer']/@sawsdl:modelReference"/>
1087                                                </xsl:variable>
1088                                                <fo:table width="100%">
1089                                                        <fo:table-column/>
1090                                                        <fo:table-body>
1091                                                                <fo:table-row font-weight="bold" font-size="14pt">
1092                                                                        <fo:table-cell>
1093                                                                                <fo:block>
1094                                                                        Bit Record
1095                                                                                </fo:block>
1096                                                                        </fo:table-cell>
1097                                                                </fo:table-row>
1098                                                                <fo:table-row>
1099                                                                        <fo:table-cell>
1100                                                                                <fo:block> </fo:block>
1101                                                                        </fo:table-cell>
1102                                                                </fo:table-row>
1103                                                                <fo:table-row>
1104                                                                        <fo:table-cell>
1105                                                                                <fo:block>
1106                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse" text-align="center">
1107                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="1"/>
1108                                                                                                <fo:table-column column-width="proportional-column-width(6.384)" column-number="2"/>
1109                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="3"/>
1110                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="4"/>
1111                                                                                                <fo:table-column column-width="proportional-column-width(6.692)" column-number="5"/>
1112                                                                                                <fo:table-column column-width="proportional-column-width(6.692)" column-number="6"/>
1113                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="7"/>
1114                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="8"/>
1115                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="9"/>
1116                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="10"/>
1117                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="11"/>
1118                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="12"/>
1119                                                                                                <fo:table-column column-width="proportional-column-width(11)" column-number="13"/>
1120                                                                                                <fo:table-body>
1121                                                                                                        <fo:table-row font-weight="bold">
1122                                                                                                                <fo:table-cell>
1123                                                                                                                        <fo:block>
1124                                                                                                                                <fo:basic-link external-destination="url({$url_diaBit})">Bit size</fo:basic-link>
1125                                                                                                                        </fo:block>
1126                                                                                                                        <fo:block>
1127                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:diaBit/@uom)">
1128                                                                                                                                        <fo:inline>
1129                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:diaBit/@uom"/>
1130                                                                                                                                        </fo:inline>
1131                                                                                                                                </xsl:if>
1132                                                                                                                        </fo:block>
1133                                                                                                                </fo:table-cell>
1134                                                                                                                <fo:table-cell>
1135                                                                                                                        <fo:block>
1136                                                                                                                                <fo:basic-link external-destination="url({$url_numBit})">Run No</fo:basic-link>
1137                                                                                                                        </fo:block>
1138                                                                                                                </fo:table-cell>
1139                                                                                                                <fo:table-cell>
1140                                                                                                                        <fo:block>
1141                                                                                                                                <fo:basic-link external-destination="url({$url_codeMfg})">Model</fo:basic-link>
1142                                                                                                                        </fo:block>
1143                                                                                                                </fo:table-cell>
1144                                                                                                                <fo:table-cell>
1145                                                                                                                        <fo:block>Hours drilled</fo:block>
1146                                                                                                                        <fo:block>
1147                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:eTimOpBit/@uom)">
1148                                                                                                                                        <fo:inline>
1149                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:eTimOpBit/@uom"/>
1150                                                                                                                                        </fo:inline>
1151                                                                                                                                </xsl:if>
1152                                                                                                                        </fo:block>
1153                                                                                                                </fo:table-cell>
1154                                                                                                                <fo:table-cell>
1155                                                                                                                        <fo:block>MD Start</fo:block>
1156                                                                                                                        <fo:block>
1157                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart/@uom)">
1158                                                                                                                                        <fo:inline>
1159                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart/@uom"/>
1160                                                                                                                                        </fo:inline>
1161                                                                                                                                </xsl:if>
1162                                                                                                                        </fo:block>
1163                                                                                                                </fo:table-cell>
1164                                                                                                                <fo:table-cell>
1165                                                                                                                        <fo:block>MD end</fo:block>
1166                                                                                                                        <fo:block>
1167                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom)">
1168                                                                                                                                        <fo:inline>
1169                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
1170                                                                                                                                        </fo:inline>
1171                                                                                                                                </xsl:if>
1172                                                                                                                        </fo:block>
1173                                                                                                                </fo:table-cell>
1174                                                                                                                <fo:table-cell>
1175                                                                                                                        <fo:block>Hole made (run)</fo:block>
1176                                                                                                                        <fo:block>
1177                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom)">
1178                                                                                                                                        <fo:inline>
1179                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
1180                                                                                                                                        </fo:inline>
1181                                                                                                                                </xsl:if>
1182                                                                                                                        </fo:block>
1183                                                                                                                </fo:table-cell>
1184                                                                                                                <fo:table-cell>
1185                                                                                                                        <fo:block>Hours drilled (run)</fo:block>
1186                                                                                                                        <fo:block>
1187                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom)">
1188                                                                                                                                        <fo:inline>
1189                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
1190                                                                                                                                        </fo:inline>
1191                                                                                                                                </xsl:if>
1192                                                                                                                        </fo:block>
1193                                                                                                                </fo:table-cell>
1194                                                                                                                <fo:table-cell>
1195                                                                                                                        <fo:block>ROP</fo:block>
1196                                                                                                                        <fo:block>
1197                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom)">
1198                                                                                                                                        <fo:inline>
1199                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom"/>
1200                                                                                                                                        </fo:inline>
1201                                                                                                                                </xsl:if>
1202                                                                                                                        </fo:block>
1203                                                                                                                </fo:table-cell>
1204                                                                                                                <fo:table-cell>
1205                                                                                                                        <fo:block>Total hole made</fo:block>
1206                                                                                                                        <fo:block>
1207                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom)">
1208                                                                                                                                        <fo:inline>
1209                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
1210                                                                                                                                        </fo:inline>
1211                                                                                                                                </xsl:if>
1212                                                                                                                        </fo:block>
1213                                                                                                                </fo:table-cell>
1214                                                                                                                <fo:table-cell>
1215                                                                                                                        <fo:block>Total hours drilled</fo:block>
1216                                                                                                                        <fo:block>
1217                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom)">
1218                                                                                                                                        <fo:inline>
1219                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom"/>
1220                                                                                                                                        </fo:inline>
1221                                                                                                                                </xsl:if>
1222                                                                                                                        </fo:block>
1223                                                                                                                </fo:table-cell>
1224                                                                                                                <fo:table-cell>
1225                                                                                                                        <fo:block>Total ROP</fo:block>
1226                                                                                                                        <fo:block>
1227                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom)">
1228                                                                                                                                        <fo:inline>
1229                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom"/>
1230                                                                                                                                        </fo:inline>
1231                                                                                                                                </xsl:if>
1232                                                                                                                        </fo:block>
1233                                                                                                                </fo:table-cell>
1234                                                                                                                <fo:table-cell>
1235                                                                                                                        <fo:block>Dull grade</fo:block>
1236                                                                                                                </fo:table-cell>
1237                                                                                                        </fo:table-row>
1238                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord">
1239                                                                                                                <fo:table-row>
1240                                                                                                                        <fo:table-cell>
1241                                                                                                                                <fo:block>
1242                                                                                                                                        <xsl:if test="string(witsml:diaBit)">
1243                                                                                                                                                <fo:inline>
1244                                                                                                                                                        <xsl:value-of select="witsml:diaBit"/>
1245                                                                                                                                                </fo:inline>
1246                                                                                                                                        </xsl:if>
1247                                                                                                                                </fo:block>
1248                                                                                                                        </fo:table-cell>
1249                                                                                                                        <fo:table-cell>
1250                                                                                                                                <fo:block>
1251                                                                                                                                        <xsl:if test="string(witsml:numBit)">
1252                                                                                                                                                <fo:inline>
1253                                                                                                                                                        <xsl:value-of select="witsml:numBit"/>
1254                                                                                                                                                </fo:inline>
1255                                                                                                                                        </xsl:if>
1256                                                                                                                                </fo:block>
1257                                                                                                                        </fo:table-cell>
1258                                                                                                                        <fo:table-cell>
1259                                                                                                                                <fo:block>
1260                                                                                                                                        <xsl:if test="string(witsml:codeMfg)">
1261                                                                                                                                                <fo:inline>
1262                                                                                                                                                        <xsl:value-of select="witsml:codeMfg"/>
1263                                                                                                                                                </fo:inline>
1264                                                                                                                                        </xsl:if>
1265                                                                                                                                </fo:block>
1266                                                                                                                        </fo:table-cell>
1267                                                                                                                        <fo:table-cell>
1268                                                                                                                                <fo:block>
1269                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:eTimOpBit)">
1270                                                                                                                                                <fo:inline>
1271                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/>
1272                                                                                                                                                </fo:inline>
1273                                                                                                                                        </xsl:if>
1274                                                                                                                                </fo:block>
1275                                                                                                                        </fo:table-cell>
1276                                                                                                                        <fo:table-cell>
1277                                                                                                                                <fo:block>
1278                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:mdHoleStart)">
1279                                                                                                                                                <fo:inline>
1280                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:mdHoleStart"/>
1281                                                                                                                                                </fo:inline>
1282                                                                                                                                        </xsl:if>
1283                                                                                                                                </fo:block>
1284                                                                                                                        </fo:table-cell>
1285                                                                                                                        <fo:table-cell>
1286                                                                                                                                <fo:block>
1287                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:mdHoleStop)">
1288                                                                                                                                                <fo:inline>
1289                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:mdHoleStop"/>
1290                                                                                                                                                </fo:inline>
1291                                                                                                                                        </xsl:if>
1292                                                                                                                                </fo:block>
1293                                                                                                                        </fo:table-cell>
1294                                                                                                                        <fo:table-cell>
1295                                                                                                                                <fo:block>
1296                                                                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart)">
1297                                                                                                                                                <fo:inline>
1298                                                                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/>
1299                                                                                                                                                </fo:inline>
1300                                                                                                                                        </xsl:if>
1301                                                                                                                                </fo:block>
1302                                                                                                                        </fo:table-cell>
1303                                                                                                                        <fo:table-cell>
1304                                                                                                                                <fo:block>
1305                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:eTimOpBit)">
1306                                                                                                                                                <fo:inline>
1307                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/>
1308                                                                                                                                                </fo:inline>
1309                                                                                                                                        </xsl:if>
1310                                                                                                                                </fo:block>
1311                                                                                                                        </fo:table-cell>
1312                                                                                                                        <fo:table-cell>
1313                                                                                                                                <fo:block>
1314                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:ropAv)">
1315                                                                                                                                                <fo:inline>
1316                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:ropAv"/>
1317                                                                                                                                                </fo:inline>
1318                                                                                                                                        </xsl:if>
1319                                                                                                                                </fo:block>
1320                                                                                                                        </fo:table-cell>
1321                                                                                                                        <fo:table-cell>
1322                                                                                                                                <fo:block>
1323                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:mdTotHoleMade)">
1324                                                                                                                                                <fo:inline>
1325                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade"/>
1326                                                                                                                                                </fo:inline>
1327                                                                                                                                        </xsl:if>
1328                                                                                                                                </fo:block>
1329                                                                                                                        </fo:table-cell>
1330                                                                                                                        <fo:table-cell>
1331                                                                                                                                <fo:block>
1332                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:totHrsDrilled)">
1333                                                                                                                                                <fo:inline>
1334                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled"/>
1335                                                                                                                                                </fo:inline>
1336                                                                                                                                        </xsl:if>
1337                                                                                                                                </fo:block>
1338                                                                                                                        </fo:table-cell>
1339                                                                                                                        <fo:table-cell>
1340                                                                                                                                <fo:block>
1341                                                                                                                                        <xsl:if test="string(witsml:bitRun/witsml:ropMx)">
1342                                                                                                                                                <fo:inline>
1343                                                                                                                                                        <xsl:value-of select="witsml:bitRun/witsml:ropMx"/>
1344                                                                                                                                                </fo:inline>
1345                                                                                                                                        </xsl:if>
1346                                                                                                                                </fo:block>
1347                                                                                                                        </fo:table-cell>
1348                                                                                                                        <fo:table-cell>
1349                                                                                                                                <fo:block>
1350                                                                                                                                        <xsl:if test="string(witsml:dullGrade)">
1351                                                                                                                                                <fo:inline>
1352                                                                                                                                                        <xsl:value-of select="witsml:dullGrade"/>
1353                                                                                                                                                </fo:inline>
1354                                                                                                                                        </xsl:if>
1355                                                                                                                                </fo:block>
1356                                                                                                                        </fo:table-cell>
1357                                                                                                                </fo:table-row>
1358                                                                                                        </xsl:for-each>
1359                                                                                                </fo:table-body>
1360                                                                                        </fo:table> 
1361                                                                                </fo:block>
1362                                                                        </fo:table-cell>
1363                                                                </fo:table-row>
1364                                                        </fo:table-body>
1365                                                </fo:table>
1366                                        </fo:block>
1367                                        <xslt:comment> Casing/Liner/Tubing </xslt:comment>
1368                                        <fo:block>
1369                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1370                                                <fo:leader/>
1371                                                <fo:table>
1372                                                        <fo:table-column column-width="100%"/>
1373                                                        <fo:table-body>
1374                                                                <fo:table-row font-weight="bold" font-size="14pt">
1375                                                                        <fo:table-cell>
1376                                                                                <fo:block>
1377                                                                        Casing/Liner/Tubing information
1378                                                                                </fo:block>
1379                                                                        </fo:table-cell>
1380                                                                </fo:table-row>
1381                                                                <fo:table-row>
1382                                                                        <fo:table-cell>
1383                                                                                <fo:block> </fo:block>
1384                                                                        </fo:table-cell>
1385                                                                </fo:table-row>
1386                                                                <fo:table-row>
1387                                                                        <fo:table-cell>
1388                                                                                <fo:block>
1389                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1390                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="1"/>
1391                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="2"/>
1392                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="3"/>
1393                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="4"/>
1394                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="5"/>
1395                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="6"/>
1396                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="7"/>
1397                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="8"/>
1398                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="9"/>
1399                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="10"/>
1400                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="11"/>
1401                                                                                                <fo:table-column column-width="proportional-column-width(8.333)" column-number="12"/>
1402                                                                                                <fo:table-body>
1403                                                                                                        <fo:table-row font-weight="bold">
1404                                                                                                                <fo:table-cell>
1405                                                                                                                        <fo:block>Type of pipe</fo:block>
1406                                                                                                                </fo:table-cell>
1407                                                                                                                <fo:table-cell>
1408                                                                                                                        <fo:block>Casing type</fo:block>
1409                                                                                                                </fo:table-cell>
1410                                                                                                                <fo:table-cell>
1411                                                                                                                        <fo:block>Run time</fo:block>
1412                                                                                                                </fo:table-cell>
1413                                                                                                                <fo:table-cell>
1414                                                                                                                        <fo:block>Nominal outside diameter</fo:block>
1415                                                                                                                        <fo:block>
1416                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:od/@uom)">
1417                                                                                                                                        <fo:inline>
1418                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:od/@uom"/>
1419                                                                                                                                        </fo:inline>
1420                                                                                                                                </xsl:if>
1421                                                                                                                        </fo:block>
1422                                                                                                                </fo:table-cell>
1423                                                                                                                <fo:table-cell>
1424                                                                                                                        <fo:block>Nominal inside diameter</fo:block>
1425                                                                                                                        <fo:block>
1426                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:id/@uom)">
1427                                                                                                                                        <fo:inline>
1428                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:id/@uom"/>
1429                                                                                                                                        </fo:inline>
1430                                                                                                                                </xsl:if>
1431                                                                                                                        </fo:block>
1432                                                                                                                </fo:table-cell>
1433                                                                                                                <fo:table-cell>
1434                                                                                                                        <fo:block>Nominal Weight</fo:block>
1435                                                                                                                        <fo:block>
1436                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:weight/@uom)">
1437                                                                                                                                        <fo:inline>
1438                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:weight/@uom"/>
1439                                                                                                                                        </fo:inline>
1440                                                                                                                                </xsl:if>
1441                                                                                                                        </fo:block>
1442                                                                                                                </fo:table-cell>
1443                                                                                                                <fo:table-cell>
1444                                                                                                                        <fo:block>Nominal Grade</fo:block>
1445                                                                                                                </fo:table-cell>
1446                                                                                                                <fo:table-cell>
1447                                                                                                                        <fo:block>Nominal Connection</fo:block>
1448                                                                                                                </fo:table-cell>
1449                                                                                                                <fo:table-cell>
1450                                                                                                                        <fo:block>Length</fo:block>
1451                                                                                                                        <fo:block>
1452                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom)">
1453                                                                                                                                        <fo:inline>
1454                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom"/>
1455                                                                                                                                        </fo:inline>
1456                                                                                                                                </xsl:if>
1457                                                                                                                        </fo:block>
1458                                                                                                                </fo:table-cell>
1459                                                                                                                <fo:table-cell>
1460                                                                                                                        <fo:block>MD Top/Hangar</fo:block>
1461                                                                                                                        <fo:block>
1462                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom)">
1463                                                                                                                                        <fo:inline>
1464                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom"/>
1465                                                                                                                                        </fo:inline>
1466                                                                                                                                </xsl:if>
1467                                                                                                                        </fo:block>
1468                                                                                                                </fo:table-cell>
1469                                                                                                                <fo:table-cell>
1470                                                                                                                        <fo:block>MD Bottom/Shoe</fo:block>
1471                                                                                                                        <fo:block>
1472                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdBottom/@uom)">
1473                                                                                                                                        <fo:inline>
1474                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdBottom/@uom"/>
1475                                                                                                                                        </fo:inline>
1476                                                                                                                                </xsl:if>
1477                                                                                                                        </fo:block>
1478                                                                                                                </fo:table-cell>
1479                                                                                                                <fo:table-cell>
1480                                                                                                                        <fo:block>Description</fo:block>
1481                                                                                                                </fo:table-cell>
1482                                                                                                        </fo:table-row>
1483                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing">
1484                                                                                                                <fo:table-row>
1485                                                                                                                        <fo:table-cell>
1486                                                                                                                                <fo:block>
1487                                                                                                                                        <xsl:variable name="element_pipeType" select="document($ddrSchema)/xsd:schema/xsd:simpleType[@name='tubularTypes']/xsd:restriction"/>
1488                                                                                                                                        <xsl:variable name="pipeType" select="witsml:type"/>
1489                                                                                                                                        <xsl:if test="string($element_pipeType//xsd:enumeration[@value=$pipeType])">
1490                                                                                                                                                <fo:inline>
1491                                                                                                                                                        <xsl:value-of select="$element_pipeType//xsd:enumeration[@value=$pipeType]"/>
1492                                                                                                                                                </fo:inline>
1493                                                                                                                                        </xsl:if>
1494                                                                                                                                </fo:block>
1495                                                                                                                        </fo:table-cell>
1496                                                                                                                        <fo:table-cell>
1497                                                                                                                                <fo:block>
1498                                                                                                                                        <xsl:if test="string(witsml:casing_liner_tubing_run/witsml:tubularJobType)">
1499                                                                                                                                                <fo:inline>
1500                                                                                                                                                        <xsl:value-of select="witsml:casing_liner_tubing_run/witsml:tubularJobType"/>
1501                                                                                                                                                </fo:inline>
1502                                                                                                                                        </xsl:if>
1503                                                                                                                                </fo:block>
1504                                                                                                                        </fo:table-cell>
1505                                                                                                                        <fo:table-cell>
1506                                                                                                                                <fo:block>
1507                                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T'))">
1508                                                                                                                                                <fo:inline>
1509                                                                                                                                                        <xsl:value-of select="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T')"/>
1510                                                                                                                                                </fo:inline>
1511                                                                                                                                        </xsl:if>
1512                                                                                                                                </fo:block>
1513                                                                                                                        </fo:table-cell>
1514                                                                                                                        <fo:table-cell>
1515                                                                                                                                <fo:block>
1516                                                                                                                                        <xsl:if test="string(witsml:od)">
1517                                                                                                                                                <fo:inline>
1518                                                                                                                                                        <xsl:value-of select="witsml:od"/>
1519                                                                                                                                                </fo:inline>
1520                                                                                                                                        </xsl:if>
1521                                                                                                                                </fo:block>
1522                                                                                                                        </fo:table-cell>
1523                                                                                                                        <fo:table-cell>
1524                                                                                                                                <fo:block>
1525                                                                                                                                        <xsl:if test="string(witsml:id)">
1526                                                                                                                                                <fo:inline>
1527                                                                                                                                                        <xsl:value-of select="witsml:id"/>
1528                                                                                                                                                </fo:inline>
1529                                                                                                                                        </xsl:if>
1530                                                                                                                                </fo:block>
1531                                                                                                                        </fo:table-cell>
1532                                                                                                                        <fo:table-cell>
1533                                                                                                                                <fo:block>
1534                                                                                                                                        <xsl:if test="string(witsml:weight)">
1535                                                                                                                                                <fo:inline>
1536                                                                                                                                                        <xsl:value-of select="witsml:weight"/>
1537                                                                                                                                                </fo:inline>
1538                                                                                                                                        </xsl:if>
1539                                                                                                                                </fo:block>
1540                                                                                                                        </fo:table-cell>
1541                                                                                                                        <fo:table-cell>
1542                                                                                                                                <fo:block>
1543                                                                                                                                        <xsl:if test="string(witsml:grade)">
1544                                                                                                                                                <fo:inline>
1545                                                                                                                                                        <xsl:value-of select="witsml:grade"/>
1546                                                                                                                                                </fo:inline>
1547                                                                                                                                        </xsl:if>
1548                                                                                                                                </fo:block>
1549                                                                                                                        </fo:table-cell>
1550                                                                                                                        <fo:table-cell>
1551                                                                                                                                <fo:block>
1552                                                                                                                                        <xsl:if test="string(witsml:connection)">
1553                                                                                                                                                <fo:inline>
1554                                                                                                                                                        <xsl:value-of select="witsml:connection"/>
1555                                                                                                                                                </fo:inline>
1556                                                                                                                                        </xsl:if>
1557                                                                                                                                </fo:block>
1558                                                                                                                        </fo:table-cell>
1559                                                                                                                        <fo:table-cell>
1560                                                                                                                                <fo:block>
1561                                                                                                                                        <xsl:if test="string(witsml:mdBottom - witsml:mdTop)">
1562                                                                                                                                                <fo:inline>
1563                                                                                                                                                        <xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
1564                                                                                                                                                </fo:inline>
1565                                                                                                                                        </xsl:if>
1566                                                                                                                                </fo:block>
1567                                                                                                                        </fo:table-cell>
1568                                                                                                                        <fo:table-cell>
1569                                                                                                                                <fo:block>
1570                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
1571                                                                                                                                                <fo:inline>
1572                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
1573                                                                                                                                                </fo:inline>
1574                                                                                                                                        </xsl:if>
1575                                                                                                                                </fo:block>
1576                                                                                                                        </fo:table-cell>
1577                                                                                                                        <fo:table-cell>
1578                                                                                                                                <fo:block>
1579                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
1580                                                                                                                                                <fo:inline>
1581                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
1582                                                                                                                                                </fo:inline>
1583                                                                                                                                        </xsl:if>
1584                                                                                                                                </fo:block>
1585                                                                                                                        </fo:table-cell>
1586                                                                                                                        <fo:table-cell>
1587                                                                                                                                <fo:block>
1588                                                                                                                                        <xsl:if test="string(witsml:casing_liner_tubing_run/witsml:description)">
1589                                                                                                                                                <fo:inline>
1590                                                                                                                                                        <xsl:value-of select="witsml:casing_liner_tubing_run/witsml:description"/>
1591                                                                                                                                                </fo:inline>
1592                                                                                                                                        </xsl:if>
1593                                                                                                                                </fo:block>
1594                                                                                                                        </fo:table-cell>
1595                                                                                                                </fo:table-row>
1596                                                                                                        </xsl:for-each>
1597                                                                                                </fo:table-body>
1598                                                                                        </fo:table> </fo:block>
1599                                                                        </fo:table-cell>
1600                                                                </fo:table-row>
1601                                                        </fo:table-body>
1602                                                </fo:table>
1603                                        </fo:block>
1604                                        <xslt:comment> Cement info </xslt:comment>
1605                                        <fo:block break-before="page">
1606                                                <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:cementStage">
1607                                                        <fo:block>
1608                                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1609                                                                <fo:leader/>
1610                                                                <fo:table>
1611                                                                        <fo:table-column column-width="100%"/>
1612                                                                        <fo:table-body>
1613                                                                                <fo:table-row font-weight="bold" font-size="14pt">
1614                                                                                        <fo:table-cell>
1615                                                                                                <fo:block>
1616                                                                        Cement information
1617                                                                                                </fo:block>
1618                                                                                        </fo:table-cell>
1619                                                                                </fo:table-row>
1620                                                                                <fo:table-row>
1621                                                                                        <fo:table-cell>
1622                                                                                                <fo:block> </fo:block>
1623                                                                                        </fo:table-cell>
1624                                                                                </fo:table-row>
1625                                                                                <fo:table-row>
1626                                                                                        <fo:table-cell>
1627                                                                                                <fo:block>
1628                                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1629                                                                                                                <fo:table-column column-width="proportional-column-width(5)" column-number="1"/>
1630                                                                                                                <fo:table-column column-width="proportional-column-width(5)" column-number="2"/>
1631                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="3"/>
1632                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="4"/>
1633                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="5"/>
1634                                                                                                                <fo:table-column column-width="proportional-column-width(7)" column-number="6"/>
1635                                                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="7"/>
1636                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="8"/>
1637                                                                                                                <fo:table-column column-width="proportional-column-width(5.5)" column-number="9"/>
1638                                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="10"/>
1639                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="11"/>
1640                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="12"/>
1641                                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="13"/>
1642                                                                                                                <fo:table-column column-width="proportional-column-width(6.5)" column-number="14"/>
1643                                                                                                                <fo:table-column column-width="proportional-column-width(8)" column-number="15"/>
1644                                                                                                                <fo:table-body>
1645                                                                                                                        <fo:table-row font-weight="bold">
1646                                                                                                                                <fo:table-cell>
1647                                                                                                                                        <fo:block>Start time</fo:block>
1648                                                                                                                                </fo:table-cell>
1649                                                                                                                                <fo:table-cell>
1650                                                                                                                                        <fo:block>End time</fo:block>
1651                                                                                                                                </fo:table-cell>
1652                                                                                                                                <fo:table-cell>
1653                                                                                                                                        <fo:block>Job type</fo:block>
1654                                                                                                                                </fo:table-cell>
1655                                                                                                                                <fo:table-cell>
1656                                                                                                                                        <fo:block>Casing string diameter</fo:block>
1657                                                                                                                                        <fo:block>
1658                                                                                                                                                <xsl:if test="string(witsml:casingStrDia/@uom)">
1659                                                                                                                                                        <fo:inline>
1660                                                                                                                                                                <xsl:value-of select="witsml:casingStrDia/@uom"/>
1661                                                                                                                                                        </fo:inline>
1662                                                                                                                                                </xsl:if>
1663                                                                                                                                        </fo:block>
1664                                                                                                                                </fo:table-cell>
1665                                                                                                                                <fo:table-cell>
1666                                                                                                                                        <fo:block>Top plug used</fo:block>
1667                                                                                                                                </fo:table-cell>
1668                                                                                                                                <fo:table-cell>
1669                                                                                                                                        <fo:block>Bottom plug used</fo:block>
1670                                                                                                                                </fo:table-cell>
1671                                                                                                                                <fo:table-cell>
1672                                                                                                                                        <fo:block>Plug bumped</fo:block>
1673                                                                                                                                </fo:table-cell>
1674                                                                                                                                <fo:table-cell>
1675                                                                                                                                        <fo:block>Plug bump pressure</fo:block>
1676                                                                                                                                        <fo:block>
1677                                                                                                                                                <xsl:if test="string(witsml:presBump/@uom)">
1678                                                                                                                                                        <fo:inline>
1679                                                                                                                                                                <xsl:value-of select="witsml:presBump/@uom"/>
1680                                                                                                                                                        </fo:inline>
1681                                                                                                                                                </xsl:if>
1682                                                                                                                                        </fo:block>
1683                                                                                                                                </fo:table-cell>
1684                                                                                                                                <fo:table-cell>
1685                                                                                                                                        <fo:block>Float held</fo:block>
1686                                                                                                                                </fo:table-cell>
1687                                                                                                                                <fo:table-cell>
1688                                                                                                                                        <fo:block>Pressure release time</fo:block>
1689                                                                                                                                </fo:table-cell>
1690                                                                                                                                <fo:table-cell>
1691                                                                                                                                        <fo:block>Full returns</fo:block>
1692                                                                                                                                </fo:table-cell>
1693                                                                                                                                <fo:table-cell>
1694                                                                                                                                        <fo:block>Cement volume returns</fo:block>
1695                                                                                                                                        <fo:block>
1696                                                                                                                                                <xsl:if test="string(witsml:volReturns/@uom)">
1697                                                                                                                                                        <fo:inline>
1698                                                                                                                                                                <xsl:value-of select="witsml:volReturns/@uom"/>
1699                                                                                                                                                        </fo:inline>
1700                                                                                                                                                </xsl:if>
1701                                                                                                                                        </fo:block>
1702                                                                                                                                </fo:table-cell>
1703                                                                                                                                <fo:table-cell>
1704                                                                                                                                        <fo:block>Reciprocated</fo:block>
1705                                                                                                                                </fo:table-cell>
1706                                                                                                                                <fo:table-cell>
1707                                                                                                                                        <fo:block>Rotated</fo:block>
1708                                                                                                                                </fo:table-cell>
1709                                                                                                                                <fo:table-cell>
1710                                                                                                                                        <fo:block>Comments</fo:block>
1711                                                                                                                                </fo:table-cell>
1712                                                                                                                        </fo:table-row>
1713                                                                                                                        <fo:table-row>
1714                                                                                                                                <fo:table-cell>
1715                                                                                                                                        <fo:block>
1716                                                                                                                                                <xsl:if test="string(substring-after(substring(witsml:dTimPumpStart, 0, 17), 'T'))">
1717                                                                                                                                                        <fo:inline>
1718                                                                                                                                                                <xsl:value-of select="substring-after(substring(witsml:dTimPumpStart, 0, 17), 'T')"/>
1719                                                                                                                                                        </fo:inline>
1720                                                                                                                                                </xsl:if>
1721                                                                                                                                        </fo:block>
1722                                                                                                                                </fo:table-cell>
1723                                                                                                                                <fo:table-cell>
1724                                                                                                                                        <fo:block>
1725                                                                                                                                                <xsl:if test="string(substring-after(substring(witsml:dTimPumpEnd, 0, 17), 'T'))">
1726                                                                                                                                                        <fo:inline>
1727                                                                                                                                                                <xsl:value-of select="substring-after(substring(witsml:dTimPumpEnd, 0, 17), 'T')"/>
1728                                                                                                                                                        </fo:inline>
1729                                                                                                                                                </xsl:if>
1730                                                                                                                                        </fo:block>
1731                                                                                                                                </fo:table-cell>
1732                                                                                                                                <fo:table-cell>
1733                                                                                                                                        <fo:block>
1734                                                                                                                                                <xsl:if test="string(witsml:jobType)">
1735                                                                                                                                                        <fo:inline>
1736                                                                                                                                                                <xsl:value-of select="witsml:jobType"/>
1737                                                                                                                                                        </fo:inline>
1738                                                                                                                                                </xsl:if>
1739                                                                                                                                        </fo:block>
1740                                                                                                                                </fo:table-cell>
1741                                                                                                                                <fo:table-cell>
1742                                                                                                                                        <fo:block>
1743                                                                                                                                                <xsl:if test="string(witsml:casingStrDia)">
1744                                                                                                                                                        <fo:inline>
1745                                                                                                                                                                <xsl:value-of select="witsml:casingStrDia"/>
1746                                                                                                                                                        </fo:inline>
1747                                                                                                                                                </xsl:if>
1748                                                                                                                                        </fo:block>
1749                                                                                                                                </fo:table-cell>
1750                                                                                                                                <fo:table-cell>
1751                                                                                                                                        <fo:block>
1752                                                                                                                                                <xsl:if test="witsml:topPlug='true' or witsml:topPlug='1'">yes</xsl:if>
1753                                                                                                                                                <xsl:if test="witsml:topPlug='false' or witsml:topPlug='0'">no</xsl:if>
1754                                                                                                                                        </fo:block>
1755                                                                                                                                </fo:table-cell>
1756                                                                                                                                <fo:table-cell>
1757                                                                                                                                        <fo:block>
1758                                                                                                                                                <xsl:if test="witsml:botPlug='true' or witsml:botPlug='1'">yes</xsl:if>
1759                                                                                                                                                <xsl:if test="witsml:botPlug='false' or witsml:botPlug='0'">no</xsl:if>
1760                                                                                                                                        </fo:block>
1761                                                                                                                                </fo:table-cell>
1762                                                                                                                                <fo:table-cell>
1763                                                                                                                                        <fo:block>
1764                                                                                                                                                <xsl:if test="witsml:plugBumped='true' or witsml:plugBumped='1'">yes</xsl:if>
1765                                                                                                                                                <xsl:if test="witsml:plugBumped='false' or witsml:plugBumped='0'">no</xsl:if>
1766                                                                                                                                        </fo:block>
1767                                                                                                                                </fo:table-cell>
1768                                                                                                                                <fo:table-cell>
1769                                                                                                                                        <fo:block>
1770                                                                                                                                                <xsl:if test="string(witsml:presBump)">
1771                                                                                                                                                        <fo:inline>
1772                                                                                                                                                                <xsl:value-of select="witsml:presBump"/>
1773                                                                                                                                                        </fo:inline>
1774                                                                                                                                                </xsl:if>
1775                                                                                                                                        </fo:block>
1776                                                                                                                                </fo:table-cell>
1777                                                                                                                                <fo:table-cell>
1778                                                                                                                                        <fo:block>
1779                                                                                                                                                <xsl:if test="witsml:floatHeld='true' or witsml:floatHeld='1'">yes</xsl:if>
1780                                                                                                                                                <xsl:if test="witsml:floatHeld='false' or witsml:floatHeld='0'">no</xsl:if>
1781                                                                                                                                        </fo:block>
1782                                                                                                                                </fo:table-cell>
1783                                                                                                                                <fo:table-cell>
1784                                                                                                                                        <fo:block>
1785                                                                                                                                                <xsl:if test="string(substring(witsml:eTimPresHeld, 0, 17))">
1786                                                                                                                                                        <fo:inline>
1787                                                                                                                                                                <xsl:value-of select="substring(witsml:eTimPresHeld, 0, 17)"/>
1788                                                                                                                                                        </fo:inline>
1789                                                                                                                                                </xsl:if>
1790                                                                                                                                        </fo:block>
1791                                                                                                                                </fo:table-cell>
1792                                                                                                                                <fo:table-cell>
1793                                                                                                                                        <fo:block>
1794                                                                                                                                                <xsl:if test="witsml:annFlowAfter='true' or witsml:annFlowAfter='1'">yes</xsl:if>
1795                                                                                                                                                <xsl:if test="witsml:annFlowAfter='false' or witsml:annFlowAfter='0'">no</xsl:if>
1796                                                                                                                                        </fo:block>
1797                                                                                                                                </fo:table-cell>
1798                                                                                                                                <fo:table-cell>
1799                                                                                                                                        <fo:block>
1800                                                                                                                                                <xsl:if test="string(witsml:volReturns)">
1801                                                                                                                                                        <fo:inline>
1802                                                                                                                                                                <xsl:value-of select="witsml:volReturns"/>
1803                                                                                                                                                        </fo:inline>
1804                                                                                                                                                </xsl:if>
1805                                                                                                                                        </fo:block>
1806                                                                                                                                </fo:table-cell>
1807                                                                                                                                <fo:table-cell>
1808                                                                                                                                        <fo:block>
1809                                                                                                                                                <xsl:if test="witsml:reciprocated='true' or witsml:reciprocated='1'">yes</xsl:if>
1810                                                                                                                                                <xsl:if test="witsml:reciprocated='false' or witsml:reciprocated='0'">no</xsl:if>
1811                                                                                                                                        </fo:block>
1812                                                                                                                                </fo:table-cell>
1813                                                                                                                                <fo:table-cell>
1814                                                                                                                                        <fo:block>
1815                                                                                                                                                <xsl:if test="witsml:rotated='true' or witsml:rotated='1'">yes</xsl:if>
1816                                                                                                                                                <xsl:if test="witsml:rotated='false' or witsml:rotated='0'">no</xsl:if>
1817                                                                                                                                        </fo:block>
1818                                                                                                                                </fo:table-cell>
1819                                                                                                                                <fo:table-cell>
1820                                                                                                                                        <fo:block>
1821                                                                                                                                                <xsl:if test="string(witsml:comments)">
1822                                                                                                                                                        <fo:inline>
1823                                                                                                                                                                <xsl:value-of select="witsml:comments"/>
1824                                                                                                                                                        </fo:inline>
1825                                                                                                                                                </xsl:if>
1826                                                                                                                                        </fo:block>
1827                                                                                                                                </fo:table-cell>
1828                                                                                                                        </fo:table-row>
1829                                                                                                                </fo:table-body>
1830                                                                                                        </fo:table>
1831                                                                                                </fo:block>
1832                                                                                        </fo:table-cell>
1833                                                                                </fo:table-row>
1834                                                                                <fo:table-row>
1835                                                                                        <fo:table-cell>
1836                                                                                                <fo:block/>
1837                                                                                        </fo:table-cell>
1838                                                                                </fo:table-row>
1839                                                                                <fo:table-row>
1840                                                                                        <fo:table-cell>
1841                                                                                                <fo:block>
1842                                                                                                        <fo:leader/>
1843                                                                                                </fo:block>
1844                                                                                        </fo:table-cell>
1845                                                                                </fo:table-row>
1846                                                                                <fo:table-row font-weight="bold" font-size="13pt">
1847                                                                                        <fo:table-cell>
1848                                                                                                <fo:block>Cement Fluid Information</fo:block>
1849                                                                                        </fo:table-cell>
1850                                                                                </fo:table-row>
1851                                                                                <fo:table-row>
1852                                                                                        <fo:table-cell>
1853                                                                                                <fo:block>
1854                                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1855                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="1"/>
1856                                                                                                                <fo:table-column column-width="proportional-column-width(12)" column-number="2"/>
1857                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="3"/>
1858                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="4"/>
1859                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="5"/>
1860                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
1861                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
1862                                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="8"/>
1863                                                                                                                <fo:table-column column-width="proportional-column-width(18)" column-number="9"/>
1864                                                                                                                <fo:table-body>
1865                                                                                                                        <fo:table-row font-weight="bold">
1866                                                                                                                                <fo:table-cell>
1867                                                                                                                                        <fo:block>Fluid type</fo:block>
1868                                                                                                                                </fo:table-cell>
1869                                                                                                                                <fo:table-cell>
1870                                                                                                                                        <fo:block>Fluid Description</fo:block>
1871                                                                                                                                </fo:table-cell>
1872                                                                                                                                <fo:table-cell>
1873                                                                                                                                        <fo:block>Volume pumped</fo:block>
1874                                                                                                                                        <fo:block>
1875                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:volPumped/@uom)">
1876                                                                                                                                                        <fo:inline>
1877                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:volPumped/@uom"/>
1878                                                                                                                                                        </fo:inline>
1879                                                                                                                                                </xsl:if>
1880                                                                                                                                        </fo:block>
1881                                                                                                                                </fo:table-cell>
1882                                                                                                                                <fo:table-cell>
1883                                                                                                                                        <fo:block>Fluid densitiy</fo:block>
1884                                                                                                                                        <fo:block>
1885                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:density/@uom)">
1886                                                                                                                                                        <fo:inline>
1887                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:density/@uom"/>
1888                                                                                                                                                        </fo:inline>
1889                                                                                                                                                </xsl:if>
1890                                                                                                                                        </fo:block>
1891                                                                                                                                </fo:table-cell>
1892                                                                                                                                <fo:table-cell>
1893                                                                                                                                        <fo:block>Yield point</fo:block>
1894                                                                                                                                        <fo:block>
1895                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:yp/@uom)">
1896                                                                                                                                                        <fo:inline>
1897                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:yp/@uom"/>
1898                                                                                                                                                        </fo:inline>
1899                                                                                                                                                </xsl:if>
1900                                                                                                                                        </fo:block>
1901                                                                                                                                </fo:table-cell>
1902                                                                                                                                <fo:table-cell>
1903                                                                                                                                        <fo:block>Mix water ratio</fo:block>
1904                                                                                                                                        <fo:block>
1905                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:ratioMixWater/@uom)">
1906                                                                                                                                                        <fo:inline>
1907                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:ratioMixWater/@uom"/>
1908                                                                                                                                                        </fo:inline>
1909                                                                                                                                                </xsl:if>
1910                                                                                                                                        </fo:block>
1911                                                                                                                                </fo:table-cell>
1912                                                                                                                                <fo:table-cell>
1913                                                                                                                                        <fo:block>Free water</fo:block>
1914                                                                                                                                        <fo:block>
1915                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:pcFreeWater/@uom)">
1916                                                                                                                                                        <fo:inline>
1917                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:pcFreeWater/@uom"/>
1918                                                                                                                                                        </fo:inline>
1919                                                                                                                                                </xsl:if>
1920                                                                                                                                        </fo:block>
1921                                                                                                                                </fo:table-cell>
1922                                                                                                                                <fo:table-cell>
1923                                                                                                                                        <fo:block>Thick time</fo:block>
1924                                                                                                                                        <fo:block>
1925                                                                                                                                                <xsl:if test="string(witsml:cementingFluid/witsml:eTimThickening/@uom)">
1926                                                                                                                                                        <fo:inline>
1927                                                                                                                                                                <xsl:value-of select="witsml:cementingFluid/witsml:eTimThickening/@uom"/>
1928                                                                                                                                                        </fo:inline>
1929                                                                                                                                                </xsl:if>
1930                                                                                                                                        </fo:block>
1931                                                                                                                                </fo:table-cell>
1932                                                                                                                                <fo:table-cell>
1933                                                                                                                                        <fo:block>Comments</fo:block>
1934                                                                                                                                </fo:table-cell>
1935                                                                                                                        </fo:table-row>
1936                                                                                                                        <xsl:for-each select="witsml:cementingFluid">
1937                                                                                                                                <fo:table-row>
1938                                                                                                                                        <fo:table-cell>
1939                                                                                                                                                <fo:block>
1940                                                                                                                                                        <xsl:if test="string(witsml:typeFluid)">
1941                                                                                                                                                                <fo:inline>
1942                                                                                                                                                                        <xsl:value-of select="witsml:typeFluid"/>
1943                                                                                                                                                                </fo:inline>
1944                                                                                                                                                        </xsl:if>
1945                                                                                                                                                </fo:block>
1946                                                                                                                                        </fo:table-cell>
1947                                                                                                                                        <fo:table-cell>
1948                                                                                                                                                <fo:block>
1949                                                                                                                                                        <xsl:if test="string(witsml:descFluid)">
1950                                                                                                                                                                <fo:inline>
1951                                                                                                                                                                        <xsl:value-of select="witsml:descFluid"/>
1952                                                                                                                                                                </fo:inline>
1953                                                                                                                                                        </xsl:if>
1954                                                                                                                                                </fo:block>
1955                                                                                                                                        </fo:table-cell>
1956                                                                                                                                        <fo:table-cell>
1957                                                                                                                                                <fo:block>
1958                                                                                                                                                        <xsl:if test="string(witsml:volPumped)">
1959                                                                                                                                                                <fo:inline>
1960                                                                                                                                                                        <xsl:value-of select="witsml:volPumped"/>
1961                                                                                                                                                                </fo:inline>
1962                                                                                                                                                        </xsl:if>
1963                                                                                                                                                </fo:block>
1964                                                                                                                                        </fo:table-cell>
1965                                                                                                                                        <fo:table-cell>
1966                                                                                                                                                <fo:block>
1967                                                                                                                                                        <xsl:if test="string(witsml:density)">
1968                                                                                                                                                                <fo:inline>
1969                                                                                                                                                                        <xsl:value-of select="witsml:density"/>
1970                                                                                                                                                                </fo:inline>
1971                                                                                                                                                        </xsl:if>
1972                                                                                                                                                </fo:block>
1973                                                                                                                                        </fo:table-cell>
1974                                                                                                                                        <fo:table-cell>
1975                                                                                                                                                <fo:block>
1976                                                                                                                                                        <xsl:if test="string(witsml:yp)">
1977                                                                                                                                                                <fo:inline>
1978                                                                                                                                                                        <xsl:value-of select="witsml:yp"/>
1979                                                                                                                                                                </fo:inline>
1980                                                                                                                                                        </xsl:if>
1981                                                                                                                                                </fo:block>
1982                                                                                                                                        </fo:table-cell>
1983                                                                                                                                        <fo:table-cell>
1984                                                                                                                                                <fo:block>
1985                                                                                                                                                        <xsl:if test="string(witsml:ratioMixWater)">
1986                                                                                                                                                                <fo:inline>
1987                                                                                                                                                                        <xsl:value-of select="witsml:ratioMixWater"/>
1988                                                                                                                                                                </fo:inline>
1989                                                                                                                                                        </xsl:if>
1990                                                                                                                                                </fo:block>
1991                                                                                                                                        </fo:table-cell>
1992                                                                                                                                        <fo:table-cell>
1993                                                                                                                                                <fo:block>
1994                                                                                                                                                        <xsl:if test="string(witsml:pcFreeWater)">
1995                                                                                                                                                                <fo:inline>
1996                                                                                                                                                                        <xsl:value-of select="witsml:pcFreeWater"/>
1997                                                                                                                                                                </fo:inline>
1998                                                                                                                                                        </xsl:if>
1999                                                                                                                                                </fo:block>
2000                                                                                                                                        </fo:table-cell>
2001                                                                                                                                        <fo:table-cell>
2002                                                                                                                                                <fo:block>
2003                                                                                                                                                        <xsl:if test="string(witsml:eTimThickening)">
2004                                                                                                                                                                <fo:inline>
2005                                                                                                                                                                        <xsl:value-of select="witsml:eTimThickening"/>
2006                                                                                                                                                                </fo:inline>
2007                                                                                                                                                        </xsl:if>
2008                                                                                                                                                </fo:block>
2009                                                                                                                                        </fo:table-cell>
2010                                                                                                                                        <fo:table-cell>
2011                                                                                                                                                <fo:block>
2012                                                                                                                                                        <xsl:if test="string(witsml:comments)">
2013                                                                                                                                                                <fo:inline>
2014                                                                                                                                                                        <xsl:value-of select="witsml:comments"/>
2015                                                                                                                                                                </fo:inline>
2016                                                                                                                                                        </xsl:if>
2017                                                                                                                                                </fo:block>
2018                                                                                                                                        </fo:table-cell>
2019                                                                                                                                </fo:table-row>
2020                                                                                                                        </xsl:for-each>
2021                                                                                                                        <fo:table-row>
2022                                                                                                                                <fo:table-cell>
2023                                                                                                                                        <fo:block/>
2024                                                                                                                                </fo:table-cell>
2025                                                                                                                        </fo:table-row>
2026                                                                                                                </fo:table-body>
2027                                                                                                        </fo:table> </fo:block>
2028                                                                                        </fo:table-cell>
2029                                                                                </fo:table-row>
2030                                                                        </fo:table-body>
2031                                                                </fo:table>
2032                                                        </fo:block>
2033                                                </xsl:for-each>
2034                                        </fo:block>
2035                                        <xslt:comment> Pore pressure </xslt:comment>
2036                                        <fo:block>
2037                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2038                                                <fo:leader/>
2039                                                <xsl:variable name="element_drillReportPorePressure" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPorePressure']/xsd:sequence"/>
2040                                                <xsl:variable name="url_readingKind">
2041                                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/>
2042                                                </xsl:variable>
2043                                                <xsl:variable name="url_equivalentMudWeight">
2044                                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='equivalentMudWeight']/@sawsdl:modelReference"/>
2045                                                </xsl:variable>
2046                                                <xsl:variable name="url_dTim">
2047                                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
2048                                                </xsl:variable>
2049                                                <xsl:variable name="url_md">
2050                                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='md']/@sawsdl:modelReference"/>
2051                                                </xsl:variable>
2052                                                <xsl:variable name="url_tvd">
2053                                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
2054                                                </xsl:variable>
2055                                                <fo:table>
2056                                                        <fo:table-column column-width="100%"/>
2057                                                        <fo:table-body>
2058                                                                <fo:table-row font-weight="bold" font-size="14pt">
2059                                                                        <fo:table-cell>
2060                                                                                <fo:block>
2061                                                                        Pore Pressure
2062                                                                                </fo:block>
2063                                                                        </fo:table-cell>
2064                                                                </fo:table-row>
2065                                                                <fo:table-row>
2066                                                                        <fo:table-cell>
2067                                                                                <fo:block> </fo:block>
2068                                                                        </fo:table-cell>
2069                                                                </fo:table-row>
2070                                                                <fo:table-row>
2071                                                                        <fo:table-cell>
2072                                                                                <fo:block>
2073                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2074                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="1"/>
2075                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="2"/>
2076                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="3"/>
2077                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="4"/>
2078                                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="5"/>
2079                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
2080                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
2081                                                                                                <fo:table-column column-width="proportional-column-width(5)" column-number="8"/>
2082                                                                                                <fo:table-body>
2083                                                                                                        <fo:table-row font-weight="bold">
2084                                                                                                                <fo:table-cell>
2085                                                                                                                        <fo:block>
2086                                                                                                                                <fo:basic-link external-destination="url({$url_readingKind})">Reading</fo:basic-link>
2087                                                                                                                        </fo:block>
2088                                                                                                                </fo:table-cell>
2089                                                                                                                <fo:table-cell>
2090                                                                                                                        <fo:block>
2091                                                                                                                                <fo:basic-link external-destination="url({$url_equivalentMudWeight})">Equ Mud Weight</fo:basic-link>
2092                                                                                                                        </fo:block>
2093                                                                                                                        <fo:block>
2094                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:porePressure/witsml:equivalentMudWeight/@uom)">
2095                                                                                                                                        <fo:inline>
2096                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:porePressure/witsml:equivalentMudWeight/@uom"/>
2097                                                                                                                                        </fo:inline>
2098                                                                                                                                </xsl:if>
2099                                                                                                                        </fo:block>
2100                                                                                                                        <fo:block/>
2101                                                                                                                </fo:table-cell>
2102                                                                                                                <fo:table-cell>
2103                                                                                                                        <fo:block>
2104                                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
2105                                                                                                                        </fo:block>
2106                                                                                                                </fo:table-cell>
2107                                                                                                                <fo:table-cell>
2108                                                                                                                        <fo:block>
2109                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
2110                                                                                                                        </fo:block>
2111                                                                                                                        <fo:block>mMD</fo:block>
2112                                                                                                                </fo:table-cell>
2113                                                                                                                <fo:table-cell>
2114                                                                                                                        <fo:block>
2115                                                                                                                                <fo:basic-link external-destination="url({$url_tvd})">Depth</fo:basic-link>
2116                                                                                                                        </fo:block>
2117                                                                                                                        <fo:block>mTVD</fo:block>
2118                                                                                                                </fo:table-cell>
2119                                                                                                                <fo:table-cell>
2120                                                                                                                        <fo:block> </fo:block>
2121                                                                                                                </fo:table-cell>
2122                                                                                                                <fo:table-cell>
2123                                                                                                                        <fo:block> </fo:block>
2124                                                                                                                </fo:table-cell>
2125                                                                                                                <fo:table-cell>
2126                                                                                                                        <fo:block> </fo:block>
2127                                                                                                                </fo:table-cell>
2128                                                                                                        </fo:table-row>
2129                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:porePressure">
2130                                                                                                                <fo:table-row>
2131                                                                                                                        <fo:table-cell>
2132                                                                                                                                <fo:block>
2133                                                                                                                                        <xsl:if test="string(witsml:readingKind)">
2134                                                                                                                                                <fo:inline>
2135                                                                                                                                                        <xsl:value-of select="witsml:readingKind"/>
2136                                                                                                                                                </fo:inline>
2137                                                                                                                                        </xsl:if>
2138                                                                                                                                </fo:block>
2139                                                                                                                        </fo:table-cell>
2140                                                                                                                        <fo:table-cell>
2141                                                                                                                                <fo:block>
2142                                                                                                                                        <xsl:if test="string(witsml:equivalentMudWeight)">
2143                                                                                                                                                <fo:inline>
2144                                                                                                                                                        <xsl:value-of select="witsml:equivalentMudWeight"/>
2145                                                                                                                                                </fo:inline>
2146                                                                                                                                        </xsl:if>
2147                                                                                                                                </fo:block>
2148                                                                                                                        </fo:table-cell>
2149                                                                                                                        <fo:table-cell>
2150                                                                                                                                <fo:block>
2151                                                                                                                                        <xsl:if test="string(substring(witsml:dTim, 0, 17))">
2152                                                                                                                                                <fo:inline>
2153                                                                                                                                                        <xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
2154                                                                                                                                                </fo:inline>
2155                                                                                                                                        </xsl:if>
2156                                                                                                                                </fo:block>
2157                                                                                                                        </fo:table-cell>
2158                                                                                                                        <fo:table-cell>
2159                                                                                                                                <fo:block>
2160                                                                                                                                        <xsl:if test="string(witsml:md)">
2161                                                                                                                                                <fo:inline>
2162                                                                                                                                                        <xsl:value-of select="witsml:md"/>
2163                                                                                                                                                </fo:inline>
2164                                                                                                                                        </xsl:if>
2165                                                                                                                                </fo:block>
2166                                                                                                                        </fo:table-cell>
2167                                                                                                                        <fo:table-cell>
2168                                                                                                                                <fo:block>
2169                                                                                                                                        <xsl:if test="string(witsml:tvd)">
2170                                                                                                                                                <fo:inline>
2171                                                                                                                                                        <xsl:value-of select="witsml:tvd"/>
2172                                                                                                                                                </fo:inline>
2173                                                                                                                                        </xsl:if>
2174                                                                                                                                </fo:block>
2175                                                                                                                        </fo:table-cell>
2176                                                                                                                        <fo:table-cell>
2177                                                                                                                                <fo:block> </fo:block>
2178                                                                                                                        </fo:table-cell>
2179                                                                                                                        <fo:table-cell>
2180                                                                                                                                <fo:block> </fo:block>
2181                                                                                                                        </fo:table-cell>
2182                                                                                                                        <fo:table-cell>
2183                                                                                                                                <fo:block> </fo:block>
2184                                                                                                                        </fo:table-cell>
2185                                                                                                                </fo:table-row>
2186                                                                                                        </xsl:for-each>
2187                                                                                                </fo:table-body>
2188                                                                                        </fo:table> </fo:block>
2189                                                                        </fo:table-cell>
2190                                                                </fo:table-row>
2191                                                        </fo:table-body>
2192                                                </fo:table>
2193                                        </fo:block>
2194                                        <xslt:comment> Survey Station </xslt:comment>
2195                                        <fo:block>
2196                                                <xsl:variable name="element_drillReportSurveyStation" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportSurveyStation']/xsd:sequence"/>
2197                                                <xsl:variable name="url_md">
2198                                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='md']/@sawsdl:modelReference"/>
2199                                                </xsl:variable>
2200                                                <xsl:variable name="url_tvd">
2201                                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
2202                                                </xsl:variable>
2203                                                <xsl:variable name="url_incl">
2204                                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='incl']/@sawsdl:modelReference"/>
2205                                                </xsl:variable>
2206                                                <xsl:variable name="url_azi">
2207                                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='azi']/@sawsdl:modelReference"/>
2208                                                </xsl:variable>
2209                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2210                                                <fo:leader/>
2211                                                <fo:table>
2212                                                        <fo:table-column column-width="100%"/>
2213                                                        <fo:table-body>
2214                                                                <fo:table-row font-weight="bold" font-size="14pt">
2215                                                                        <fo:table-cell>
2216                                                                                <fo:block>
2217                                                                        Survey Station
2218                                                                                </fo:block>
2219                                                                        </fo:table-cell>
2220                                                                </fo:table-row>
2221                                                                <fo:table-row>
2222                                                                        <fo:table-cell>
2223                                                                                <fo:block> </fo:block>
2224                                                                        </fo:table-cell>
2225                                                                </fo:table-row>
2226                                                                <fo:table-row>
2227                                                                        <fo:table-cell>
2228                                                                                <fo:block>
2229                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2230                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2231                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2232                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2233                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2234                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2235                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2236                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2237                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2238                                                                                                <fo:table-body>
2239                                                                                                        <fo:table-row font-weight="bold">
2240                                                                                                                <fo:table-cell>
2241                                                                                                                        <fo:block>
2242                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
2243                                                                                                                        </fo:block>
2244                                                                                                                        <fo:block>mMD</fo:block>
2245                                                                                                                </fo:table-cell>
2246                                                                                                                <fo:table-cell>
2247                                                                                                                        <fo:block>
2248                                                                                                                                <fo:basic-link external-destination="url({$url_tvd})">Depth</fo:basic-link>
2249                                                                                                                        </fo:block>
2250                                                                                                                        <fo:block>mTVD</fo:block>
2251                                                                                                                </fo:table-cell>
2252                                                                                                                <fo:table-cell>
2253                                                                                                                        <fo:block>
2254                                                                                                                                <fo:basic-link external-destination="url({$url_incl})">Inclination</fo:basic-link>
2255                                                                                                                        </fo:block>
2256                                                                                                                </fo:table-cell>
2257                                                                                                                <fo:table-cell>
2258                                                                                                                        <fo:block>
2259                                                                                                                                <fo:basic-link external-destination="url({$url_azi})">Azimuth</fo:basic-link>
2260                                                                                                                        </fo:block>
2261                                                                                                                </fo:table-cell>
2262                                                                                                                <fo:table-cell>
2263                                                                                                                        <fo:block> </fo:block>
2264                                                                                                                </fo:table-cell>
2265                                                                                                                <fo:table-cell>
2266                                                                                                                        <fo:block> </fo:block>
2267                                                                                                                </fo:table-cell>
2268                                                                                                                <fo:table-cell>
2269                                                                                                                        <fo:block> </fo:block>
2270                                                                                                                </fo:table-cell>
2271                                                                                                                <fo:table-cell>
2272                                                                                                                        <fo:block> </fo:block>
2273                                                                                                                </fo:table-cell>
2274                                                                                                        </fo:table-row>
2275                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:surveyStation">
2276                                                                                                                <fo:table-row>
2277                                                                                                                        <fo:table-cell>
2278                                                                                                                                <fo:block>
2279                                                                                                                                        <xsl:if test="string(witsml:md)">
2280                                                                                                                                                <fo:inline>
2281                                                                                                                                                        <xsl:value-of select="witsml:md"/>
2282                                                                                                                                                </fo:inline>
2283                                                                                                                                        </xsl:if>
2284                                                                                                                                </fo:block>
2285                                                                                                                        </fo:table-cell>
2286                                                                                                                        <fo:table-cell>
2287                                                                                                                                <fo:block>
2288                                                                                                                                        <xsl:if test="string(witsml:tvd)">
2289                                                                                                                                                <fo:inline>
2290                                                                                                                                                        <xsl:value-of select="witsml:tvd"/>
2291                                                                                                                                                </fo:inline>
2292                                                                                                                                        </xsl:if>
2293                                                                                                                                </fo:block>
2294                                                                                                                        </fo:table-cell>
2295                                                                                                                        <fo:table-cell>
2296                                                                                                                                <fo:block>
2297                                                                                                                                        <xsl:if test="string(witsml:incl)">
2298                                                                                                                                                <fo:inline>
2299                                                                                                                                                        <xsl:value-of select="witsml:incl"/>
2300                                                                                                                                                </fo:inline>
2301                                                                                                                                        </xsl:if>
2302                                                                                                                                </fo:block>
2303                                                                                                                        </fo:table-cell>
2304                                                                                                                        <fo:table-cell>
2305                                                                                                                                <fo:block>
2306                                                                                                                                        <xsl:if test="string(witsml:azi)">
2307                                                                                                                                                <fo:inline>
2308                                                                                                                                                        <xsl:value-of select="witsml:azi"/>
2309                                                                                                                                                </fo:inline>
2310                                                                                                                                        </xsl:if>
2311                                                                                                                                </fo:block>
2312                                                                                                                        </fo:table-cell>
2313                                                                                                                        <fo:table-cell>
2314                                                                                                                                <fo:block> </fo:block>
2315                                                                                                                        </fo:table-cell>
2316                                                                                                                        <fo:table-cell>
2317                                                                                                                                <fo:block> </fo:block>
2318                                                                                                                        </fo:table-cell>
2319                                                                                                                        <fo:table-cell>
2320                                                                                                                                <fo:block> </fo:block>
2321                                                                                                                        </fo:table-cell>
2322                                                                                                                        <fo:table-cell>
2323                                                                                                                                <fo:block> </fo:block>
2324                                                                                                                        </fo:table-cell>
2325                                                                                                                </fo:table-row>
2326                                                                                                        </xsl:for-each>
2327                                                                                                </fo:table-body>
2328                                                                                        </fo:table> </fo:block>
2329                                                                        </fo:table-cell>
2330                                                                </fo:table-row>
2331                                                        </fo:table-body>
2332                                                </fo:table>
2333                                        </fo:block>
2334                                        <xslt:comment> Log Information </xslt:comment>
2335                                        <fo:block>
2336                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2337                                                <fo:leader/>
2338                                                <xsl:variable name="element_drillReportLogInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLogInfo']/xsd:sequence"/>
2339                                                <xsl:variable name="url_serviceCompany">
2340                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='serviceCompany']/@sawsdl:modelReference"/>
2341                                                </xsl:variable>
2342                                                <xsl:variable name="url_runNumber">
2343                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='runNumber']/@sawsdl:modelReference"/>
2344                                                </xsl:variable>
2345                                                <xsl:variable name="url_mdTop">
2346                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2347                                                </xsl:variable>
2348                                                <xsl:variable name="url_mdBottom">
2349                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2350                                                </xsl:variable>
2351                                                <xsl:variable name="url_tool">
2352                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tool']/@sawsdl:modelReference"/>
2353                                                </xsl:variable>
2354                                                <xsl:variable name="url_tempBHCT">
2355                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHCT']/@sawsdl:modelReference"/>
2356                                                </xsl:variable>
2357                                                <xsl:variable name="url_tempBHST">
2358                                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHST']/@sawsdl:modelReference"/>
2359                                                </xsl:variable>
2360                                                <fo:table>
2361                                                        <fo:table-column column-width="100%"/>
2362                                                        <fo:table-body>
2363                                                                <fo:table-row font-weight="bold" font-size="14pt">
2364                                                                        <fo:table-cell>
2365                                                                                <fo:block>
2366                                                                        Log Information
2367                                                                                </fo:block>
2368                                                                        </fo:table-cell>
2369                                                                </fo:table-row>
2370                                                                <fo:table-row font-weight="bold" font-size="14pt">
2371                                                                        <fo:table-cell>
2372                                                                                <fo:block> </fo:block>
2373                                                                        </fo:table-cell>
2374                                                                </fo:table-row>
2375                                                                <fo:table-row>
2376                                                                        <fo:table-cell>
2377                                                                                <fo:block>
2378                                                                                        <fo:inline font-weight="bold">Logging Company:</fo:inline>
2379                                                                                        <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:serviceCompany)">
2380                                                                                                <fo:inline>
2381                                                                                                        <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:serviceCompany"/>
2382                                                                                                </fo:inline>
2383                                                                                        </xsl:if>
2384                                                                                </fo:block>
2385                                                                        </fo:table-cell>
2386                                                                </fo:table-row>
2387                                                                <fo:table-row>
2388                                                                        <fo:table-cell>
2389                                                                                <fo:block> </fo:block>
2390                                                                        </fo:table-cell>
2391                                                                </fo:table-row>
2392                                                                <fo:table-row>
2393                                                                        <fo:table-cell>
2394                                                                                <fo:block>
2395                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2396                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2397                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2398                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2399                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2400                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2401                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2402                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2403                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2404                                                                                                <fo:table-body>
2405                                                                                                        <fo:table-row font-weight="bold">
2406                                                                                                                <fo:table-cell>
2407                                                                                                                        <fo:block>
2408                                                                                                                                <fo:basic-link external-destination="url({$url_runNumber})">Run no</fo:basic-link>
2409                                                                                                                        </fo:block>
2410                                                                                                                </fo:table-cell>
2411                                                                                                                <fo:table-cell>
2412                                                                                                                        <fo:block>
2413                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2414                                                                                                                        </fo:block>
2415                                                                                                                        <fo:block>mMD</fo:block>
2416                                                                                                                </fo:table-cell>
2417                                                                                                                <fo:table-cell>
2418                                                                                                                        <fo:block>
2419                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2420                                                                                                                        </fo:block>
2421                                                                                                                        <fo:block>mMD</fo:block>
2422                                                                                                                </fo:table-cell>
2423                                                                                                                <fo:table-cell>
2424                                                                                                                        <fo:block>
2425                                                                                                                                <fo:basic-link external-destination="url({$url_tool})">Tool</fo:basic-link>
2426                                                                                                                        </fo:block>
2427                                                                                                                </fo:table-cell>
2428                                                                                                                <fo:table-cell>
2429                                                                                                                        <fo:block>
2430                                                                                                                                <fo:basic-link external-destination="url({$url_tempBHCT})">BHCT</fo:basic-link>
2431                                                                                                                        </fo:block>
2432                                                                                                                        <fo:block>
2433                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom)">
2434                                                                                                                                        <fo:inline>
2435                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom"/>
2436                                                                                                                                        </fo:inline>
2437                                                                                                                                </xsl:if>
2438                                                                                                                        </fo:block>
2439                                                                                                                </fo:table-cell>
2440                                                                                                                <fo:table-cell>
2441                                                                                                                        <fo:block>
2442                                                                                                                                <fo:basic-link external-destination="url({$url_tempBHST})">BHST</fo:basic-link>
2443                                                                                                                        </fo:block>
2444                                                                                                                        <fo:block>
2445                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom)">
2446                                                                                                                                        <fo:inline>
2447                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom"/>
2448                                                                                                                                        </fo:inline>
2449                                                                                                                                </xsl:if>
2450                                                                                                                        </fo:block>
2451                                                                                                                </fo:table-cell>
2452                                                                                                                <fo:table-cell>
2453                                                                                                                        <fo:block> </fo:block>
2454                                                                                                                </fo:table-cell>
2455                                                                                                                <fo:table-cell>
2456                                                                                                                        <fo:block> </fo:block>
2457                                                                                                                </fo:table-cell>
2458                                                                                                        </fo:table-row>
2459                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:logInfo">
2460                                                                                                                <fo:table-row>
2461                                                                                                                        <fo:table-cell>
2462                                                                                                                                <fo:block>
2463                                                                                                                                        <xsl:if test="string(witsml:runNumber)">
2464                                                                                                                                                <fo:inline>
2465                                                                                                                                                        <xsl:value-of select="witsml:runNumber"/>
2466                                                                                                                                                </fo:inline>
2467                                                                                                                                        </xsl:if>
2468                                                                                                                                </fo:block>
2469                                                                                                                        </fo:table-cell>
2470                                                                                                                        <fo:table-cell>
2471                                                                                                                                <fo:block>
2472                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
2473                                                                                                                                                <fo:inline>
2474                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
2475                                                                                                                                                </fo:inline>
2476                                                                                                                                        </xsl:if>
2477                                                                                                                                </fo:block>
2478                                                                                                                        </fo:table-cell>
2479                                                                                                                        <fo:table-cell>
2480                                                                                                                                <fo:block>
2481                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
2482                                                                                                                                                <fo:inline>
2483                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
2484                                                                                                                                                </fo:inline>
2485                                                                                                                                        </xsl:if>
2486                                                                                                                                </fo:block>
2487                                                                                                                        </fo:table-cell>
2488                                                                                                                        <fo:table-cell>
2489                                                                                                                                <fo:block>
2490                                                                                                                                        <xsl:if test="string(witsml:tool)">
2491                                                                                                                                                <fo:inline>
2492                                                                                                                                                        <xsl:value-of select="witsml:tool"/>
2493                                                                                                                                                </fo:inline>
2494                                                                                                                                        </xsl:if>
2495                                                                                                                                </fo:block>
2496                                                                                                                        </fo:table-cell>
2497                                                                                                                        <fo:table-cell>
2498                                                                                                                                <fo:block>
2499                                                                                                                                        <xsl:if test="string(witsml:tempBHCT)">
2500                                                                                                                                                <fo:inline>
2501                                                                                                                                                        <xsl:value-of select="witsml:tempBHCT"/>
2502                                                                                                                                                </fo:inline>
2503                                                                                                                                        </xsl:if>
2504                                                                                                                                </fo:block>
2505                                                                                                                        </fo:table-cell>
2506                                                                                                                        <fo:table-cell>
2507                                                                                                                                <fo:block>
2508                                                                                                                                        <xsl:if test="string(witsml:tempBHST)">
2509                                                                                                                                                <fo:inline>
2510                                                                                                                                                        <xsl:value-of select="witsml:tempBHST"/>
2511                                                                                                                                                </fo:inline>
2512                                                                                                                                        </xsl:if>
2513                                                                                                                                </fo:block>
2514                                                                                                                        </fo:table-cell>
2515                                                                                                                        <fo:table-cell>
2516                                                                                                                                <fo:block> </fo:block>
2517                                                                                                                        </fo:table-cell>
2518                                                                                                                        <fo:table-cell>
2519                                                                                                                                <fo:block> </fo:block>
2520                                                                                                                        </fo:table-cell>
2521                                                                                                                </fo:table-row>
2522                                                                                                        </xsl:for-each>
2523                                                                                                </fo:table-body>
2524                                                                                        </fo:table> </fo:block>
2525                                                                        </fo:table-cell>
2526                                                                </fo:table-row>
2527                                                        </fo:table-body>
2528                                                </fo:table>
2529                                        </fo:block>
2530                                        <xslt:comment> Core Information </xslt:comment>
2531                                        <fo:block>
2532                                                <xsl:variable name="element_drillReportCoreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportCoreInfo']/xsd:sequence"/>
2533                                                <xsl:variable name="url_coreNumber">
2534                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreNumber']/@sawsdl:modelReference"/>
2535                                                </xsl:variable>
2536                                                <xsl:variable name="url_mdTop">
2537                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2538                                                </xsl:variable>
2539                                                <xsl:variable name="url_mdBottom">
2540                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2541                                                </xsl:variable>
2542                                                <xsl:variable name="url_lenRecovered">
2543                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenRecovered']/@sawsdl:modelReference"/>
2544                                                </xsl:variable>
2545                                                <xsl:variable name="url_recoverPc">
2546                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='recoverPc']/@sawsdl:modelReference"/>
2547                                                </xsl:variable>
2548                                                <xsl:variable name="url_lenBarrel">
2549                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenBarrel']/@sawsdl:modelReference"/>
2550                                                </xsl:variable>
2551                                                <xsl:variable name="url_innerBarrelType">
2552                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='innerBarrelType']/@sawsdl:modelReference"/>
2553                                                </xsl:variable>
2554                                                <xsl:variable name="url_coreDescription">
2555                                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreDescription']/@sawsdl:modelReference"/>
2556                                                </xsl:variable>
2557                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2558                                                <fo:leader/>
2559                                                <fo:table>
2560                                                        <fo:table-column column-width="100%"/>
2561                                                        <fo:table-body>
2562                                                                <fo:table-row font-weight="bold" font-size="14pt">
2563                                                                        <fo:table-cell>
2564                                                                                <fo:block>
2565                                                                        Core Information
2566                                                                                </fo:block>
2567                                                                        </fo:table-cell>
2568                                                                </fo:table-row>
2569                                                                <fo:table-row>
2570                                                                        <fo:table-cell>
2571                                                                                <fo:block> </fo:block>
2572                                                                        </fo:table-cell>
2573                                                                </fo:table-row>
2574                                                                <fo:table-row>
2575                                                                        <fo:table-cell>
2576                                                                                <fo:block>
2577                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2578                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2579                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2580                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2581                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2582                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2583                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2584                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2585                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2586                                                                                                <fo:table-body>
2587                                                                                                        <fo:table-row font-weight="bold">
2588                                                                                                                <fo:table-cell>
2589                                                                                                                        <fo:block>
2590                                                                                                                                <fo:basic-link external-destination="url({$url_coreNumber})">Core no</fo:basic-link>
2591                                                                                                                        </fo:block>
2592                                                                                                                </fo:table-cell>
2593                                                                                                                <fo:table-cell>
2594                                                                                                                        <fo:block>
2595                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2596                                                                                                                        </fo:block>
2597                                                                                                                        <fo:block>mMD</fo:block>
2598                                                                                                                </fo:table-cell>
2599                                                                                                                <fo:table-cell>
2600                                                                                                                        <fo:block>
2601                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2602                                                                                                                        </fo:block>
2603                                                                                                                        <fo:block>mMD</fo:block>
2604                                                                                                                </fo:table-cell>
2605                                                                                                                <fo:table-cell>
2606                                                                                                                        <fo:block>
2607                                                                                                                                <fo:basic-link external-destination="url({$url_lenRecovered})">Core length</fo:basic-link>
2608                                                                                                                        </fo:block>
2609                                                                                                                        <fo:block>
2610                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom)">
2611                                                                                                                                        <fo:inline>
2612                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom"/>
2613                                                                                                                                        </fo:inline>
2614                                                                                                                                </xsl:if>
2615                                                                                                                        </fo:block>
2616                                                                                                                </fo:table-cell>
2617                                                                                                                <fo:table-cell>
2618                                                                                                                        <fo:block>
2619                                                                                                                                <fo:basic-link external-destination="url({$url_recoverPc})">Recover core</fo:basic-link>
2620                                                                                                                        </fo:block>
2621                                                                                                                        <fo:block>
2622                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom)">
2623                                                                                                                                        <fo:inline>
2624                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom"/>
2625                                                                                                                                        </fo:inline>
2626                                                                                                                                </xsl:if>
2627                                                                                                                        </fo:block>
2628                                                                                                                </fo:table-cell>
2629                                                                                                                <fo:table-cell>
2630                                                                                                                        <fo:block>
2631                                                                                                                                <fo:basic-link external-destination="url({$url_lenBarrel})">Core barrel length</fo:basic-link>
2632                                                                                                                        </fo:block>
2633                                                                                                                        <fo:block>
2634                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom)">
2635                                                                                                                                        <fo:inline>
2636                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom"/>
2637                                                                                                                                        </fo:inline>
2638                                                                                                                                </xsl:if>
2639                                                                                                                        </fo:block>
2640                                                                                                                </fo:table-cell>
2641                                                                                                                <fo:table-cell>
2642                                                                                                                        <fo:block>
2643                                                                                                                                <fo:basic-link external-destination="url({$url_innerBarrelType})">Inner barrel type</fo:basic-link>
2644                                                                                                                        </fo:block>
2645                                                                                                                </fo:table-cell>
2646                                                                                                                <fo:table-cell>
2647                                                                                                                        <fo:block>
2648                                                                                                                                <fo:basic-link external-destination="url({$url_coreDescription})">Description</fo:basic-link>
2649                                                                                                                        </fo:block>
2650                                                                                                                </fo:table-cell>
2651                                                                                                        </fo:table-row>
2652                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo">
2653                                                                                                                <fo:table-row>
2654                                                                                                                        <fo:table-cell>
2655                                                                                                                                <fo:block>
2656                                                                                                                                        <xsl:if test="string(witsml:coreNumber)">
2657                                                                                                                                                <fo:inline>
2658                                                                                                                                                        <xsl:value-of select="witsml:coreNumber"/>
2659                                                                                                                                                </fo:inline>
2660                                                                                                                                        </xsl:if>
2661                                                                                                                                </fo:block>
2662                                                                                                                        </fo:table-cell>
2663                                                                                                                        <fo:table-cell>
2664                                                                                                                                <fo:block>
2665                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
2666                                                                                                                                                <fo:inline>
2667                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
2668                                                                                                                                                </fo:inline>
2669                                                                                                                                        </xsl:if>
2670                                                                                                                                </fo:block>
2671                                                                                                                        </fo:table-cell>
2672                                                                                                                        <fo:table-cell>
2673                                                                                                                                <fo:block>
2674                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
2675                                                                                                                                                <fo:inline>
2676                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
2677                                                                                                                                                </fo:inline>
2678                                                                                                                                        </xsl:if>
2679                                                                                                                                </fo:block>
2680                                                                                                                        </fo:table-cell>
2681                                                                                                                        <fo:table-cell>
2682                                                                                                                                <fo:block>
2683                                                                                                                                        <xsl:if test="string(witsml:lenRecovered)">
2684                                                                                                                                                <fo:inline>
2685                                                                                                                                                        <xsl:value-of select="witsml:lenRecovered"/>
2686                                                                                                                                                </fo:inline>
2687                                                                                                                                        </xsl:if>
2688                                                                                                                                </fo:block>
2689                                                                                                                        </fo:table-cell>
2690                                                                                                                        <fo:table-cell>
2691                                                                                                                                <fo:block>
2692                                                                                                                                        <xsl:if test="string(witsml:recoverPc)">
2693                                                                                                                                                <fo:inline>
2694                                                                                                                                                        <xsl:value-of select="witsml:recoverPc"/>
2695                                                                                                                                                </fo:inline>
2696                                                                                                                                        </xsl:if>
2697                                                                                                                                </fo:block>
2698                                                                                                                        </fo:table-cell>
2699                                                                                                                        <fo:table-cell>
2700                                                                                                                                <fo:block>
2701                                                                                                                                        <xsl:if test="string(witsml:lenBarrel)">
2702                                                                                                                                                <fo:inline>
2703                                                                                                                                                        <xsl:value-of select="witsml:lenBarrel"/>
2704                                                                                                                                                </fo:inline>
2705                                                                                                                                        </xsl:if>
2706                                                                                                                                </fo:block>
2707                                                                                                                        </fo:table-cell>
2708                                                                                                                        <fo:table-cell>
2709                                                                                                                                <fo:block>
2710                                                                                                                                        <xsl:if test="string(witsml:innerBarrelType)">
2711                                                                                                                                                <fo:inline>
2712                                                                                                                                                        <xsl:value-of select="witsml:innerBarrelType"/>
2713                                                                                                                                                </fo:inline>
2714                                                                                                                                        </xsl:if>
2715                                                                                                                                </fo:block>
2716                                                                                                                        </fo:table-cell>
2717                                                                                                                        <fo:table-cell>
2718                                                                                                                                <fo:block>
2719                                                                                                                                        <xsl:if test="string(witsml:coreDescription)">
2720                                                                                                                                                <fo:inline>
2721                                                                                                                                                        <xsl:value-of select="witsml:coreDescription"/>
2722                                                                                                                                                </fo:inline>
2723                                                                                                                                        </xsl:if>
2724                                                                                                                                </fo:block>
2725                                                                                                                        </fo:table-cell>
2726                                                                                                                </fo:table-row>
2727                                                                                                        </xsl:for-each>
2728                                                                                                </fo:table-body>
2729                                                                                        </fo:table> </fo:block>
2730                                                                        </fo:table-cell>
2731                                                                </fo:table-row>
2732                                                        </fo:table-body>
2733                                                </fo:table>
2734                                        </fo:block>
2735                                        <xslt:comment> Well Test Information </xslt:comment>
2736                                        <fo:block>
2737                                                <xsl:variable name="element_drillReportWellTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellTestInfo']/xsd:sequence"/>
2738                                                <xsl:variable name="url_dTim">
2739                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
2740                                                </xsl:variable>
2741                                                <xsl:variable name="url_testNumber">
2742                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testNumber']/@sawsdl:modelReference"/>
2743                                                </xsl:variable>
2744                                                <xsl:variable name="url_testType">
2745                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testType']/@sawsdl:modelReference"/>
2746                                                </xsl:variable>
2747                                                <xsl:variable name="url_mdTop">
2748                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2749                                                </xsl:variable>
2750                                                <xsl:variable name="url_mdBottom">
2751                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2752                                                </xsl:variable>
2753                                                <xsl:variable name="url_chokeOrificeSize">
2754                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chokeOrificeSize']/@sawsdl:modelReference"/>
2755                                                </xsl:variable>
2756                                                <xsl:variable name="url_densityOil">
2757                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='densityOil']/@sawsdl:modelReference"/>
2758                                                </xsl:variable>
2759                                                <xsl:variable name="url_flowRateOil">
2760                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateOil']/@sawsdl:modelReference"/>
2761                                                </xsl:variable>
2762                                                <xsl:variable name="url_flowRateGas">
2763                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateGas']/@sawsdl:modelReference"/>
2764                                                </xsl:variable>
2765                                                <xsl:variable name="url_flowRateWater">
2766                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateWater']/@sawsdl:modelReference"/>
2767                                                </xsl:variable>
2768                                                <xsl:variable name="url_presShutIn">
2769                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presShutIn']/@sawsdl:modelReference"/>
2770                                                </xsl:variable>
2771                                                <xsl:variable name="url_presFlowing">
2772                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presFlowing']/@sawsdl:modelReference"/>
2773                                                </xsl:variable>
2774                                                <xsl:variable name="url_presBottom">
2775                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presBottom']/@sawsdl:modelReference"/>
2776                                                </xsl:variable>
2777                                                <xsl:variable name="url_gasOilRatio">
2778                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='gasOilRatio']/@sawsdl:modelReference"/>
2779                                                </xsl:variable>
2780                                                <xsl:variable name="url_waterOilRatio">
2781                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='waterOilRatio']/@sawsdl:modelReference"/>
2782                                                </xsl:variable>
2783                                                <xsl:variable name="url_chloride">
2784                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chloride']/@sawsdl:modelReference"/>
2785                                                </xsl:variable>
2786                                                <xsl:variable name="url_carbonDioxide">
2787                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='carbonDioxide']/@sawsdl:modelReference"/>
2788                                                </xsl:variable>
2789                                                <xsl:variable name="url_hydrogenSulfide">
2790                                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='hydrogenSulfide']/@sawsdl:modelReference"/>
2791                                                </xsl:variable>
2792                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2793                                                <fo:leader/>
2794                                                <fo:table>
2795                                                        <fo:table-column column-width="100%"/>
2796                                                        <fo:table-body>
2797                                                                <fo:table-row font-weight="bold" font-size="14pt">
2798                                                                        <fo:table-cell>
2799                                                                                <fo:block>
2800                                                                        Well Test Information
2801                                                                                </fo:block>
2802                                                                        </fo:table-cell>
2803                                                                </fo:table-row>
2804                                                                <fo:table-row>
2805                                                                        <fo:table-cell>
2806                                                                                <fo:block> </fo:block>
2807                                                                        </fo:table-cell>
2808                                                                </fo:table-row>
2809                                                                <fo:table-row>
2810                                                                        <fo:table-cell>
2811                                                                                <fo:block>
2812                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2813                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="1"/>
2814                                                                                                <fo:table-column column-width="proportional-column-width(3.755)" column-number="2"/>
2815                                                                                                <fo:table-column column-width="proportional-column-width(7.356)" column-number="3"/>
2816                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="4"/>
2817                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="5"/>
2818                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="6"/>
2819                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="7"/>
2820                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="8"/>
2821                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="9"/>
2822                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="10"/>
2823                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="11"/>
2824                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="12"/>
2825                                                                                                <fo:table-column column-width="proportional-column-width(6.256)" column-number="13"/>
2826                                                                                                <fo:table-column column-width="proportional-column-width(4.855)" column-number="14"/>
2827                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="15"/>
2828                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="16"/>
2829                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="17"/>
2830                                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="18"/>
2831                                                                                                <fo:table-body>
2832                                                                                                        <fo:table-row font-weight="bold">
2833                                                                                                                <fo:table-cell>
2834                                                                                                                        <fo:block>
2835                                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
2836                                                                                                                        </fo:block>
2837                                                                                                                </fo:table-cell>
2838                                                                                                                <fo:table-cell>
2839                                                                                                                        <fo:block>
2840                                                                                                                                <fo:basic-link external-destination="url({$url_testNumber})">Test no</fo:basic-link>
2841                                                                                                                        </fo:block>
2842                                                                                                                </fo:table-cell>
2843                                                                                                                <fo:table-cell>
2844                                                                                                                        <fo:block>
2845                                                                                                                                <fo:basic-link external-destination="url({$url_testType})">Type</fo:basic-link>
2846                                                                                                                        </fo:block>
2847                                                                                                                </fo:table-cell>
2848                                                                                                                <fo:table-cell>
2849                                                                                                                        <fo:block>
2850                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2851                                                                                                                        </fo:block>
2852                                                                                                                        <fo:block>mMD</fo:block>
2853                                                                                                                </fo:table-cell>
2854                                                                                                                <fo:table-cell>
2855                                                                                                                        <fo:block>
2856                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2857                                                                                                                        </fo:block>
2858                                                                                                                        <fo:block>mMD</fo:block>
2859                                                                                                                </fo:table-cell>
2860                                                                                                                <fo:table-cell>
2861                                                                                                                        <fo:block>
2862                                                                                                                                <fo:basic-link external-destination="url({$url_chokeOrificeSize})">Choke orifice Size</fo:basic-link>
2863                                                                                                                        </fo:block>
2864                                                                                                                        <fo:block>
2865                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom)">
2866                                                                                                                                        <fo:inline>
2867                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/>
2868                                                                                                                                        </fo:inline>
2869                                                                                                                                </xsl:if>
2870                                                                                                                        </fo:block>
2871                                                                                                                </fo:table-cell>
2872                                                                                                                <fo:table-cell>
2873                                                                                                                        <fo:block>
2874                                                                                                                                <fo:basic-link external-destination="url({$url_densityOil})">Density crude oil</fo:basic-link>
2875                                                                                                                        </fo:block>
2876                                                                                                                        <fo:block>
2877                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom)">
2878                                                                                                                                        <fo:inline>
2879                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom"/>
2880                                                                                                                                        </fo:inline>
2881                                                                                                                                </xsl:if>
2882                                                                                                                        </fo:block>
2883                                                                                                                </fo:table-cell>
2884                                                                                                                <fo:table-cell>
2885                                                                                                                        <fo:block>
2886                                                                                                                                <fo:basic-link external-destination="url({$url_flowRateOil})">Oil flow rate</fo:basic-link>
2887                                                                                                                        </fo:block>
2888                                                                                                                        <fo:block>
2889                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom)">
2890                                                                                                                                        <fo:inline>
2891                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom"/>
2892                                                                                                                                        </fo:inline>
2893                                                                                                                                </xsl:if>
2894                                                                                                                        </fo:block>
2895                                                                                                                </fo:table-cell>
2896                                                                                                                <fo:table-cell>
2897                                                                                                                        <fo:block>
2898                                                                                                                                <fo:basic-link external-destination="url({$url_flowRateGas})">Gas flow rate M</fo:basic-link>
2899                                                                                                                        </fo:block>
2900                                                                                                                        <fo:block>
2901                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom)">
2902                                                                                                                                        <fo:inline>
2903                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom"/>
2904                                                                                                                                        </fo:inline>
2905                                                                                                                                </xsl:if>
2906                                                                                                                        </fo:block>
2907                                                                                                                </fo:table-cell>
2908                                                                                                                <fo:table-cell>
2909                                                                                                                        <fo:block>
2910                                                                                                                                <fo:basic-link external-destination="url({$url_flowRateWater})">Water flow rate</fo:basic-link>
2911                                                                                                                        </fo:block>
2912                                                                                                                        <fo:block>
2913                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom)">
2914                                                                                                                                        <fo:inline>
2915                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom"/>
2916                                                                                                                                        </fo:inline>
2917                                                                                                                                </xsl:if>
2918                                                                                                                        </fo:block>
2919                                                                                                                </fo:table-cell>
2920                                                                                                                <fo:table-cell>
2921                                                                                                                        <fo:block>
2922                                                                                                                                <fo:basic-link external-destination="url({$url_presShutIn})">Shut in pressure</fo:basic-link>
2923                                                                                                                        </fo:block>
2924                                                                                                                        <fo:block>
2925                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom)">
2926                                                                                                                                        <fo:inline>
2927                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom"/>
2928                                                                                                                                        </fo:inline>
2929                                                                                                                                </xsl:if>
2930                                                                                                                        </fo:block>
2931                                                                                                                </fo:table-cell>
2932                                                                                                                <fo:table-cell>
2933                                                                                                                        <fo:block>
2934                                                                                                                                <fo:basic-link external-destination="url({$url_presFlowing})">Flow pressure</fo:basic-link>
2935                                                                                                                        </fo:block>
2936                                                                                                                        <fo:block>
2937                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom)">
2938                                                                                                                                        <fo:inline>
2939                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom"/>
2940                                                                                                                                        </fo:inline>
2941                                                                                                                                </xsl:if>
2942                                                                                                                        </fo:block>
2943                                                                                                                </fo:table-cell>
2944                                                                                                                <fo:table-cell>
2945                                                                                                                        <fo:block>
2946                                                                                                                                <fo:basic-link external-destination="url({$url_presBottom})">Bottom hole pressure</fo:basic-link>
2947                                                                                                                        </fo:block>
2948                                                                                                                        <fo:block>
2949                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom)">
2950                                                                                                                                        <fo:inline>
2951                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom"/>
2952                                                                                                                                        </fo:inline>
2953                                                                                                                                </xsl:if>
2954                                                                                                                        </fo:block>
2955                                                                                                                </fo:table-cell>
2956                                                                                                                <fo:table-cell>
2957                                                                                                                        <fo:block>
2958                                                                                                                                <fo:basic-link external-destination="url({$url_gasOilRatio})">Gas oil ratio</fo:basic-link>
2959                                                                                                                        </fo:block>
2960                                                                                                                        <fo:block>
2961                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom)">
2962                                                                                                                                        <fo:inline>
2963                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom"/>
2964                                                                                                                                        </fo:inline>
2965                                                                                                                                </xsl:if>
2966                                                                                                                        </fo:block>
2967                                                                                                                </fo:table-cell>
2968                                                                                                                <fo:table-cell>
2969                                                                                                                        <fo:block>
2970                                                                                                                                <fo:basic-link external-destination="url({$url_waterOilRatio})">Water oil ratio</fo:basic-link>
2971                                                                                                                        </fo:block>
2972                                                                                                                        <fo:block>
2973                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom)">
2974                                                                                                                                        <fo:inline>
2975                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom"/>
2976                                                                                                                                        </fo:inline>
2977                                                                                                                                </xsl:if>
2978                                                                                                                        </fo:block>
2979                                                                                                                </fo:table-cell>
2980                                                                                                                <fo:table-cell>
2981                                                                                                                        <fo:block>
2982                                                                                                                                <fo:basic-link external-destination="url({$url_chloride})">Chloride content</fo:basic-link>
2983                                                                                                                        </fo:block>
2984                                                                                                                        <fo:block>
2985                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom)">
2986                                                                                                                                        <fo:inline>
2987                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom"/>
2988                                                                                                                                        </fo:inline>
2989                                                                                                                                </xsl:if>
2990                                                                                                                        </fo:block>
2991                                                                                                                </fo:table-cell>
2992                                                                                                                <fo:table-cell>
2993                                                                                                                        <fo:block>
2994                                                                                                                                <fo:basic-link external-destination="url({$url_carbonDioxide})">CO2 content</fo:basic-link>
2995                                                                                                                        </fo:block>
2996                                                                                                                        <fo:block>
2997                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom)">
2998                                                                                                                                        <fo:inline>
2999                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom"/>
3000                                                                                                                                        </fo:inline>
3001                                                                                                                                </xsl:if>
3002                                                                                                                        </fo:block>
3003                                                                                                                </fo:table-cell>
3004                                                                                                                <fo:table-cell>
3005                                                                                                                        <fo:block>
3006                                                                                                                                <fo:basic-link external-destination="url({$url_hydrogenSulfide})">H2S content</fo:basic-link>
3007                                                                                                                        </fo:block>
3008                                                                                                                        <fo:block>
3009                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom)">
3010                                                                                                                                        <fo:inline>
3011                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom"/>
3012                                                                                                                                        </fo:inline>
3013                                                                                                                                </xsl:if>
3014                                                                                                                        </fo:block>
3015                                                                                                                </fo:table-cell>
3016                                                                                                        </fo:table-row>
3017                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo">
3018                                                                                                                <fo:table-row>
3019                                                                                                                        <fo:table-cell>
3020                                                                                                                                <fo:block>
3021                                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTim, 0, 17), 'T'))">
3022                                                                                                                                                <fo:inline>
3023                                                                                                                                                        <xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
3024                                                                                                                                                </fo:inline>
3025                                                                                                                                        </xsl:if>
3026                                                                                                                                </fo:block>
3027                                                                                                                        </fo:table-cell>
3028                                                                                                                        <fo:table-cell>
3029                                                                                                                                <fo:block>
3030                                                                                                                                        <xsl:if test="string(witsml:testNumber)">
3031                                                                                                                                                <fo:inline>
3032                                                                                                                                                        <xsl:value-of select="witsml:testNumber"/>
3033                                                                                                                                                </fo:inline>
3034                                                                                                                                        </xsl:if>
3035                                                                                                                                </fo:block>
3036                                                                                                                        </fo:table-cell>
3037                                                                                                                        <fo:table-cell>
3038                                                                                                                                <fo:block>
3039                                                                                                                                        <xsl:if test="string(witsml:testType)">
3040                                                                                                                                                <fo:inline>
3041                                                                                                                                                        <xsl:value-of select="witsml:testType"/>
3042                                                                                                                                                </fo:inline>
3043                                                                                                                                        </xsl:if>
3044                                                                                                                                </fo:block>
3045                                                                                                                        </fo:table-cell>
3046                                                                                                                        <fo:table-cell>
3047                                                                                                                                <fo:block>
3048                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
3049                                                                                                                                                <fo:inline>
3050                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
3051                                                                                                                                                </fo:inline>
3052                                                                                                                                        </xsl:if>
3053                                                                                                                                </fo:block>
3054                                                                                                                        </fo:table-cell>
3055                                                                                                                        <fo:table-cell>
3056                                                                                                                                <fo:block>
3057                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
3058                                                                                                                                                <fo:inline>
3059                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
3060                                                                                                                                                </fo:inline>
3061                                                                                                                                        </xsl:if>
3062                                                                                                                                </fo:block>
3063                                                                                                                        </fo:table-cell>
3064                                                                                                                        <fo:table-cell>
3065                                                                                                                                <fo:block>
3066                                                                                                                                        <xsl:if test="string(witsml:chokeOrificeSize)">
3067                                                                                                                                                <fo:inline>
3068                                                                                                                                                        <xsl:value-of select="witsml:chokeOrificeSize"/>
3069                                                                                                                                                </fo:inline>
3070                                                                                                                                        </xsl:if>
3071                                                                                                                                </fo:block>
3072                                                                                                                        </fo:table-cell>
3073                                                                                                                        <fo:table-cell>
3074                                                                                                                                <fo:block>
3075                                                                                                                                        <xsl:if test="string(witsml:densityOil)">
3076                                                                                                                                                <fo:inline>
3077                                                                                                                                                        <xsl:value-of select="witsml:densityOil"/>
3078                                                                                                                                                </fo:inline>
3079                                                                                                                                        </xsl:if>
3080                                                                                                                                </fo:block>
3081                                                                                                                        </fo:table-cell>
3082                                                                                                                        <fo:table-cell>
3083                                                                                                                                <fo:block>
3084                                                                                                                                        <xsl:if test="string(witsml:flowRateOil)">
3085                                                                                                                                                <fo:inline>
3086                                                                                                                                                        <xsl:value-of select="witsml:flowRateOil"/>
3087                                                                                                                                                </fo:inline>
3088                                                                                                                                        </xsl:if>
3089                                                                                                                                </fo:block>
3090                                                                                                                        </fo:table-cell>
3091                                                                                                                        <fo:table-cell>
3092                                                                                                                                <fo:block>
3093                                                                                                                                        <xsl:if test="string(witsml:flowRateGas)">
3094                                                                                                                                                <fo:inline>
3095                                                                                                                                                        <xsl:value-of select="witsml:flowRateGas"/>
3096                                                                                                                                                </fo:inline>
3097                                                                                                                                        </xsl:if>
3098                                                                                                                                </fo:block>
3099                                                                                                                        </fo:table-cell>
3100                                                                                                                        <fo:table-cell>
3101                                                                                                                                <fo:block>
3102                                                                                                                                        <xsl:if test="string(witsml:flowRateWater)">
3103                                                                                                                                                <fo:inline>
3104                                                                                                                                                        <xsl:value-of select="witsml:flowRateWater"/>
3105                                                                                                                                                </fo:inline>
3106                                                                                                                                        </xsl:if>
3107                                                                                                                                </fo:block>
3108                                                                                                                        </fo:table-cell>
3109                                                                                                                        <fo:table-cell>
3110                                                                                                                                <fo:block>
3111                                                                                                                                        <xsl:if test="string(witsml:presShutIn)">
3112                                                                                                                                                <fo:inline>
3113                                                                                                                                                        <xsl:value-of select="witsml:presShutIn"/>
3114                                                                                                                                                </fo:inline>
3115                                                                                                                                        </xsl:if>
3116                                                                                                                                </fo:block>
3117                                                                                                                        </fo:table-cell>
3118                                                                                                                        <fo:table-cell>
3119                                                                                                                                <fo:block>
3120                                                                                                                                        <xsl:if test="string(witsml:presFlowing)">
3121                                                                                                                                                <fo:inline>
3122                                                                                                                                                        <xsl:value-of select="witsml:presFlowing"/>
3123                                                                                                                                                </fo:inline>
3124                                                                                                                                        </xsl:if>
3125                                                                                                                                </fo:block>
3126                                                                                                                        </fo:table-cell>
3127                                                                                                                        <fo:table-cell>
3128                                                                                                                                <fo:block>
3129                                                                                                                                        <xsl:if test="string(witsml:presBottom)">
3130                                                                                                                                                <fo:inline>
3131                                                                                                                                                        <xsl:value-of select="witsml:presBottom"/>
3132                                                                                                                                                </fo:inline>
3133                                                                                                                                        </xsl:if>
3134                                                                                                                                </fo:block>
3135                                                                                                                        </fo:table-cell>
3136                                                                                                                        <fo:table-cell>
3137                                                                                                                                <fo:block>
3138                                                                                                                                        <xsl:if test="string(witsml:gasOilRatio)">
3139                                                                                                                                                <fo:inline>
3140                                                                                                                                                        <xsl:value-of select="witsml:gasOilRatio"/>
3141                                                                                                                                                </fo:inline>
3142                                                                                                                                        </xsl:if>
3143                                                                                                                                </fo:block>
3144                                                                                                                        </fo:table-cell>
3145                                                                                                                        <fo:table-cell>
3146                                                                                                                                <fo:block>
3147                                                                                                                                        <xsl:if test="string(witsml:waterOilRatio)">
3148                                                                                                                                                <fo:inline>
3149                                                                                                                                                        <xsl:value-of select="witsml:waterOilRatio"/>
3150                                                                                                                                                </fo:inline>
3151                                                                                                                                        </xsl:if>
3152                                                                                                                                </fo:block>
3153                                                                                                                        </fo:table-cell>
3154                                                                                                                        <fo:table-cell>
3155                                                                                                                                <fo:block>
3156                                                                                                                                        <xsl:if test="string(witsml:chloride)">
3157                                                                                                                                                <fo:inline>
3158                                                                                                                                                        <xsl:value-of select="witsml:chloride"/>
3159                                                                                                                                                </fo:inline>
3160                                                                                                                                        </xsl:if>
3161                                                                                                                                </fo:block>
3162                                                                                                                        </fo:table-cell>
3163                                                                                                                        <fo:table-cell>
3164                                                                                                                                <fo:block>
3165                                                                                                                                        <xsl:if test="string(witsml:carbonDioxide)">
3166                                                                                                                                                <fo:inline>
3167                                                                                                                                                        <xsl:value-of select="witsml:carbonDioxide"/>
3168                                                                                                                                                </fo:inline>
3169                                                                                                                                        </xsl:if>
3170                                                                                                                                </fo:block>
3171                                                                                                                        </fo:table-cell>
3172                                                                                                                        <fo:table-cell>
3173                                                                                                                                <fo:block>
3174                                                                                                                                        <xsl:if test="string(witsml:hydrogenSulfide)">
3175                                                                                                                                                <fo:inline>
3176                                                                                                                                                        <xsl:value-of select="witsml:hydrogenSulfide"/>
3177                                                                                                                                                </fo:inline>
3178                                                                                                                                        </xsl:if>
3179                                                                                                                                </fo:block>
3180                                                                                                                        </fo:table-cell>
3181                                                                                                                </fo:table-row>
3182                                                                                                        </xsl:for-each>
3183                                                                                                </fo:table-body>
3184                                                                                        </fo:table> </fo:block>
3185                                                                        </fo:table-cell>
3186                                                                </fo:table-row>
3187                                                        </fo:table-body>
3188                                                </fo:table>
3189                                        </fo:block>
3190                                        <xslt:comment> Formation Test </xslt:comment>
3191                                        <fo:block>
3192                                                <xsl:variable name="element_drillReportFormTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportFormTestInfo']/xsd:sequence"/>
3193                                                <xsl:variable name="url_md">
3194                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
3195                                                </xsl:variable>
3196                                                <xsl:variable name="url_presPore">
3197                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='presPore']/@sawsdl:modelReference"/>
3198                                                </xsl:variable>
3199                                                <xsl:variable name="url_goodSealm">
3200                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='goodSeal']/@sawsdl:modelReference"/>
3201                                                </xsl:variable>
3202                                                <xsl:variable name="url_mdSample">
3203                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='mdSample']/@sawsdl:modelReference"/>
3204                                                </xsl:variable>
3205                                                <xsl:variable name="url_dominateComponent">
3206                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='dominateComponent']/@sawsdl:modelReference"/>
3207                                                </xsl:variable>
3208                                                <xsl:variable name="url_densityHC">
3209                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='densityHC']/@sawsdl:modelReference"/>
3210                                                </xsl:variable>
3211                                                <xsl:variable name="url_volumeSample">
3212                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='volumeSample']/@sawsdl:modelReference"/>
3213                                                </xsl:variable>
3214                                                <xsl:variable name="url_description">
3215                                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
3216                                                </xsl:variable>
3217                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3218                                                <fo:leader/>
3219                                                <fo:table>
3220                                                        <fo:table-column column-width="100%"/>
3221                                                        <fo:table-body>
3222                                                                <fo:table-row font-weight="bold" font-size="14pt">
3223                                                                        <fo:table-cell>
3224                                                                                <fo:block>
3225                                                                        Formation Test
3226                                                                                </fo:block>
3227                                                                        </fo:table-cell>
3228                                                                </fo:table-row>
3229                                                                <fo:table-row>
3230                                                                        <fo:table-cell>
3231                                                                                <fo:block> </fo:block>
3232                                                                        </fo:table-cell>
3233                                                                </fo:table-row>
3234                                                                <fo:table-row>
3235                                                                        <fo:table-cell>
3236                                                                                <fo:block>
3237                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3238                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
3239                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
3240                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
3241                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
3242                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
3243                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
3244                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
3245                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
3246                                                                                                <fo:table-body>
3247                                                                                                        <fo:table-row font-weight="bold">
3248                                                                                                                <fo:table-cell>
3249                                                                                                                        <fo:block>
3250                                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
3251                                                                                                                        </fo:block>
3252                                                                                                                        <fo:block>mMD</fo:block>
3253                                                                                                                </fo:table-cell>
3254                                                                                                                <fo:table-cell>
3255                                                                                                                        <fo:block>
3256                                                                                                                                <fo:basic-link external-destination="url({$url_presPore})">Formation pore pressure</fo:basic-link>
3257                                                                                                                        </fo:block>
3258                                                                                                                        <fo:block>
3259                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom)">
3260                                                                                                                                        <fo:inline>
3261                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom"/>
3262                                                                                                                                        </fo:inline>
3263                                                                                                                                </xsl:if>
3264                                                                                                                        </fo:block>
3265                                                                                                                </fo:table-cell>
3266                                                                                                                <fo:table-cell>
3267                                                                                                                        <fo:block>
3268                                                                                                                                <fo:basic-link external-destination="url({$url_goodSealm})">Good seal ind</fo:basic-link>
3269                                                                                                                        </fo:block>
3270                                                                                                                </fo:table-cell>
3271                                                                                                                <fo:table-cell>
3272                                                                                                                        <fo:block>
3273                                                                                                                                <fo:basic-link external-destination="url({$url_mdSample})">Depth to sample point</fo:basic-link>
3274                                                                                                                        </fo:block>
3275                                                                                                                        <fo:block>
3276                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom)">
3277                                                                                                                                        <fo:inline>
3278                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom"/>
3279                                                                                                                                        </fo:inline>
3280                                                                                                                                </xsl:if>
3281                                                                                                                        </fo:block>
3282                                                                                                                </fo:table-cell>
3283                                                                                                                <fo:table-cell>
3284                                                                                                                        <fo:block>
3285                                                                                                                                <fo:basic-link external-destination="url({$url_dominateComponent})">Dominate fluid component</fo:basic-link>
3286                                                                                                                        </fo:block>
3287                                                                                                                </fo:table-cell>
3288                                                                                                                <fo:table-cell>
3289                                                                                                                        <fo:block>
3290                                                                                                                                <fo:basic-link external-destination="url({$url_densityHC})">HC Component density</fo:basic-link>
3291                                                                                                                        </fo:block>
3292                                                                                                                        <fo:block>
3293                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom)">
3294                                                                                                                                        <fo:inline>
3295                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom"/>
3296                                                                                                                                        </fo:inline>
3297                                                                                                                                </xsl:if>
3298                                                                                                                        </fo:block>
3299                                                                                                                </fo:table-cell>
3300                                                                                                                <fo:table-cell>
3301                                                                                                                        <fo:block>
3302                                                                                                                                <fo:basic-link external-destination="url({$url_volumeSample})">Sample volume</fo:basic-link>
3303                                                                                                                        </fo:block>
3304                                                                                                                        <fo:block>
3305                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom)">
3306                                                                                                                                        <fo:inline>
3307                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom"/>
3308                                                                                                                                        </fo:inline>
3309                                                                                                                                </xsl:if>
3310                                                                                                                        </fo:block>
3311                                                                                                                </fo:table-cell>
3312                                                                                                                <fo:table-cell>
3313                                                                                                                        <fo:block>
3314                                                                                                                                <fo:basic-link external-destination="url({$url_description})">Description</fo:basic-link>
3315                                                                                                                        </fo:block>
3316                                                                                                                </fo:table-cell>
3317                                                                                                        </fo:table-row>
3318                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo">
3319                                                                                                                <fo:table-row>
3320                                                                                                                        <fo:table-cell>
3321                                                                                                                                <fo:block>
3322                                                                                                                                        <xsl:if test="string(witsml:md)">
3323                                                                                                                                                <fo:inline>
3324                                                                                                                                                        <xsl:value-of select="witsml:md"/>
3325                                                                                                                                                </fo:inline>
3326                                                                                                                                        </xsl:if>
3327                                                                                                                                </fo:block>
3328                                                                                                                        </fo:table-cell>
3329                                                                                                                        <fo:table-cell>
3330                                                                                                                                <fo:block>
3331                                                                                                                                        <xsl:if test="string(witsml:presPore)">
3332                                                                                                                                                <fo:inline>
3333                                                                                                                                                        <xsl:value-of select="witsml:presPore"/>
3334                                                                                                                                                </fo:inline>
3335                                                                                                                                        </xsl:if>
3336                                                                                                                                </fo:block>
3337                                                                                                                        </fo:table-cell>
3338                                                                                                                        <fo:table-cell>
3339                                                                                                                                <fo:block>
3340                                                                                                                                        <xsl:if test="witsml:goodSeal='true' or witsml:goodSeal='1'">yes</xsl:if>
3341                                                                                                                                        <xsl:if test="witsml:goodSeal='false' or witsml:goodSeal='0'">no</xsl:if>
3342                                                                                                                                </fo:block>
3343                                                                                                                        </fo:table-cell>
3344                                                                                                                        <fo:table-cell>
3345                                                                                                                                <fo:block>
3346                                                                                                                                        <xsl:if test="string(witsml:mdSample)">
3347                                                                                                                                                <fo:inline>
3348                                                                                                                                                        <xsl:value-of select="witsml:mdSample"/>
3349                                                                                                                                                </fo:inline>
3350                                                                                                                                        </xsl:if>
3351                                                                                                                                </fo:block>
3352                                                                                                                        </fo:table-cell>
3353                                                                                                                        <fo:table-cell>
3354                                                                                                                                <fo:block>
3355                                                                                                                                        <xsl:if test="string(witsml:dominateComponent)">
3356                                                                                                                                                <fo:inline>
3357                                                                                                                                                        <xsl:value-of select="witsml:dominateComponent"/>
3358                                                                                                                                                </fo:inline>
3359                                                                                                                                        </xsl:if>
3360                                                                                                                                </fo:block>
3361                                                                                                                        </fo:table-cell>
3362                                                                                                                        <fo:table-cell>
3363                                                                                                                                <fo:block>
3364                                                                                                                                        <xsl:if test="string(witsml:densityHC)">
3365                                                                                                                                                <fo:inline>
3366                                                                                                                                                        <xsl:value-of select="witsml:densityHC"/>
3367                                                                                                                                                </fo:inline>
3368                                                                                                                                        </xsl:if>
3369                                                                                                                                </fo:block>
3370                                                                                                                        </fo:table-cell>
3371                                                                                                                        <fo:table-cell>
3372                                                                                                                                <fo:block>
3373                                                                                                                                        <xsl:if test="string(witsml:volumeSample)">
3374                                                                                                                                                <fo:inline>
3375                                                                                                                                                        <xsl:value-of select="witsml:volumeSample"/>
3376                                                                                                                                                </fo:inline>
3377                                                                                                                                        </xsl:if>
3378                                                                                                                                </fo:block>
3379                                                                                                                        </fo:table-cell>
3380                                                                                                                        <fo:table-cell>
3381                                                                                                                                <fo:block>
3382                                                                                                                                        <xsl:if test="string(witsml:description)">
3383                                                                                                                                                <fo:inline>
3384                                                                                                                                                        <xsl:value-of select="witsml:description"/>
3385                                                                                                                                                </fo:inline>
3386                                                                                                                                        </xsl:if>
3387                                                                                                                                </fo:block>
3388                                                                                                                        </fo:table-cell>
3389                                                                                                                </fo:table-row>
3390                                                                                                        </xsl:for-each>
3391                                                                                                </fo:table-body>
3392                                                                                        </fo:table> </fo:block>
3393                                                                        </fo:table-cell>
3394                                                                </fo:table-row>
3395                                                        </fo:table-body>
3396                                                </fo:table>
3397                                        </fo:block>
3398                                        <xslt:comment> Stratigraphic Information </xslt:comment>
3399                                        <fo:block break-before="page">
3400                                                <xsl:variable name="element_drillReportStratInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStratInfo']/xsd:sequence"/>
3401                                                <xsl:variable name="url_mdTop">
3402                                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3403                                                </xsl:variable>
3404                                                <xsl:variable name="url_tvdTop">
3405                                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3406                                                </xsl:variable>
3407                                                <xsl:variable name="url_description">
3408                                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
3409                                                </xsl:variable>
3410                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3411                                                <fo:leader/>
3412                                                <fo:table>
3413                                                        <fo:table-column column-width="100%"/>
3414                                                        <fo:table-body>
3415                                                                <fo:table-row font-weight="bold" font-size="14pt">
3416                                                                        <fo:table-cell>
3417                                                                                <fo:block>
3418                                                                        Stratigraphic Information
3419                                                                                </fo:block>
3420                                                                        </fo:table-cell>
3421                                                                </fo:table-row>
3422                                                                <fo:table-row>
3423                                                                        <fo:table-cell>
3424                                                                                <fo:block> </fo:block>
3425                                                                        </fo:table-cell>
3426                                                                </fo:table-row>
3427                                                                <fo:table-row>
3428                                                                        <fo:table-cell>
3429                                                                                <fo:block>
3430                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3431                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
3432                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
3433                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
3434                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
3435                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
3436                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
3437                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
3438                                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
3439                                                                                                <fo:table-body>
3440                                                                                                        <fo:table-row font-weight="bold" height="29.680px" overflow="hidden">
3441                                                                                                                <fo:table-cell>
3442                                                                                                                        <fo:block>
3443                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top of formation</fo:basic-link>
3444                                                                                                                        </fo:block>
3445                                                                                                                        <fo:block>mMD</fo:block>
3446                                                                                                                </fo:table-cell>
3447                                                                                                                <fo:table-cell>
3448                                                                                                                        <fo:block>
3449                                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top of formation</fo:basic-link>
3450                                                                                                                        </fo:block>
3451                                                                                                                        <fo:block>mTVD</fo:block>
3452                                                                                                                </fo:table-cell>
3453                                                                                                                <fo:table-cell>
3454                                                                                                                        <fo:block>
3455                                                                                                                                <fo:basic-link external-destination="url({$url_description})">Formation name</fo:basic-link>
3456                                                                                                                        </fo:block>
3457                                                                                                                </fo:table-cell>
3458                                                                                                                <fo:table-cell>
3459                                                                                                                        <fo:block> </fo:block>
3460                                                                                                                </fo:table-cell>
3461                                                                                                                <fo:table-cell>
3462                                                                                                                        <fo:block> </fo:block>
3463                                                                                                                </fo:table-cell>
3464                                                                                                                <fo:table-cell>
3465                                                                                                                        <fo:block> </fo:block>
3466                                                                                                                </fo:table-cell>
3467                                                                                                                <fo:table-cell>
3468                                                                                                                        <fo:block> </fo:block>
3469                                                                                                                </fo:table-cell>
3470                                                                                                                <fo:table-cell>
3471                                                                                                                        <fo:block> </fo:block>
3472                                                                                                                </fo:table-cell>
3473                                                                                                        </fo:table-row>
3474                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:stratInfo">
3475                                                                                                                <fo:table-row>
3476                                                                                                                        <fo:table-cell>
3477                                                                                                                                <fo:block>
3478                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
3479                                                                                                                                                <fo:inline>
3480                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
3481                                                                                                                                                </fo:inline>
3482                                                                                                                                        </xsl:if>
3483                                                                                                                                </fo:block>
3484                                                                                                                        </fo:table-cell>
3485                                                                                                                        <fo:table-cell>
3486                                                                                                                                <fo:block>
3487                                                                                                                                        <xsl:if test="string(witsml:tvdTop)">
3488                                                                                                                                                <fo:inline>
3489                                                                                                                                                        <xsl:value-of select="witsml:tvdTop"/>
3490                                                                                                                                                </fo:inline>
3491                                                                                                                                        </xsl:if>
3492                                                                                                                                </fo:block>
3493                                                                                                                        </fo:table-cell>
3494                                                                                                                        <fo:table-cell>
3495                                                                                                                                <fo:block>
3496                                                                                                                                        <xsl:if test="string(witsml:description)">
3497                                                                                                                                                <fo:inline>
3498                                                                                                                                                        <xsl:value-of select="witsml:description"/>
3499                                                                                                                                                </fo:inline>
3500                                                                                                                                        </xsl:if>
3501                                                                                                                                </fo:block>
3502                                                                                                                        </fo:table-cell>
3503                                                                                                                        <fo:table-cell>
3504                                                                                                                                <fo:block> </fo:block>
3505                                                                                                                        </fo:table-cell>
3506                                                                                                                        <fo:table-cell>
3507                                                                                                                                <fo:block> </fo:block>
3508                                                                                                                        </fo:table-cell>
3509                                                                                                                        <fo:table-cell>
3510                                                                                                                                <fo:block> </fo:block>
3511                                                                                                                        </fo:table-cell>
3512                                                                                                                        <fo:table-cell>
3513                                                                                                                                <fo:block> </fo:block>
3514                                                                                                                        </fo:table-cell>
3515                                                                                                                        <fo:table-cell>
3516                                                                                                                                <fo:block> </fo:block>
3517                                                                                                                        </fo:table-cell>
3518                                                                                                                </fo:table-row>
3519                                                                                                        </xsl:for-each>
3520                                                                                                </fo:table-body>
3521                                                                                        </fo:table> </fo:block>
3522                                                                        </fo:table-cell>
3523                                                                </fo:table-row>
3524                                                        </fo:table-body>
3525                                                </fo:table>
3526                                        </fo:block>
3527                                        <xslt:comment> Lithology Information </xslt:comment>
3528                                        <fo:block>
3529                                                <xsl:variable name="element_drillReportLithShowInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLithShowInfo']/xsd:sequence"/>
3530                                                <xsl:variable name="url_mdTop">
3531                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3532                                                </xsl:variable>
3533                                                <xsl:variable name="url_mdBottom">
3534                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3535                                                </xsl:variable>
3536                                                <xsl:variable name="url_tvdTop">
3537                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3538                                                </xsl:variable>
3539                                                <xsl:variable name="url_tvdBottom">
3540                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3541                                                </xsl:variable>
3542                                                <xsl:variable name="url_show">
3543                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='show']/@sawsdl:modelReference"/>
3544                                                </xsl:variable>
3545                                                <xsl:variable name="url_lithology">
3546                                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='lithology']/@sawsdl:modelReference"/>
3547                                                </xsl:variable>
3548                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3549                                                <fo:leader/>
3550                                                <fo:table>
3551                                                        <fo:table-column column-width="100%"/>
3552                                                        <fo:table-body>
3553                                                                <fo:table-row font-weight="bold" font-size="14pt">
3554                                                                        <fo:table-cell>
3555                                                                                <fo:block>
3556                                                                        Lithology Information
3557                                                                                </fo:block>
3558                                                                        </fo:table-cell>
3559                                                                </fo:table-row>
3560                                                                <fo:table-row>
3561                                                                        <fo:table-cell>
3562                                                                                <fo:block> </fo:block>
3563                                                                        </fo:table-cell>
3564                                                                </fo:table-row>
3565                                                                <fo:table-row>
3566                                                                        <fo:table-cell>
3567                                                                                <fo:block>
3568                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3569                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="1"/>
3570                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="2"/>
3571                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="3"/>
3572                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="4"/>
3573                                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="5"/>
3574                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
3575                                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
3576                                                                                                <fo:table-column column-width="proportional-column-width(35)" column-number="8"/>
3577                                                                                                <fo:table-body>
3578                                                                                                        <fo:table-row font-weight="bold">
3579                                                                                                                <fo:table-cell>
3580                                                                                                                        <fo:block>
3581                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Start Depth</fo:basic-link>
3582                                                                                                                        </fo:block>
3583                                                                                                                        <fo:block>mMD</fo:block>
3584                                                                                                                </fo:table-cell>
3585                                                                                                                <fo:table-cell>
3586                                                                                                                        <fo:block>
3587                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">End Depth</fo:basic-link>
3588                                                                                                                        </fo:block>
3589                                                                                                                        <fo:block>mMD</fo:block>
3590                                                                                                                </fo:table-cell>
3591                                                                                                                <fo:table-cell>
3592                                                                                                                        <fo:block>
3593                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Difference in Depth</fo:basic-link>
3594                                                                                                                        </fo:block>
3595                                                                                                                        <fo:block>mMD</fo:block>
3596                                                                                                                </fo:table-cell>
3597                                                                                                                <fo:table-cell>
3598                                                                                                                        <fo:block>
3599                                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Start Depth</fo:basic-link>
3600                                                                                                                        </fo:block>
3601                                                                                                                        <fo:block>mTVD</fo:block>
3602                                                                                                                </fo:table-cell>
3603                                                                                                                <fo:table-cell>
3604                                                                                                                        <fo:block>
3605                                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">End Depth</fo:basic-link>
3606                                                                                                                        </fo:block>
3607                                                                                                                        <fo:block>mTVD</fo:block>
3608                                                                                                                </fo:table-cell>
3609                                                                                                                <fo:table-cell>
3610                                                                                                                        <fo:block>
3611                                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Difference in Depth</fo:basic-link>
3612                                                                                                                        </fo:block>
3613                                                                                                                        <fo:block>mTVD</fo:block>
3614                                                                                                                </fo:table-cell>
3615                                                                                                                <fo:table-cell>
3616                                                                                                                        <fo:block>
3617                                                                                                                                <fo:basic-link external-destination="url({$url_show})">Shows Description</fo:basic-link>
3618                                                                                                                        </fo:block>
3619                                                                                                                </fo:table-cell>
3620                                                                                                                <fo:table-cell>
3621                                                                                                                        <fo:block>
3622                                                                                                                                <fo:basic-link external-destination="url({$url_lithology})">Lithology Description</fo:basic-link>
3623                                                                                                                        </fo:block>
3624                                                                                                                </fo:table-cell>
3625                                                                                                        </fo:table-row>
3626                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:lithShowInfo">
3627                                                                                                                <fo:table-row>
3628                                                                                                                        <fo:table-cell>
3629                                                                                                                                <fo:block>
3630                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
3631                                                                                                                                                <fo:inline>
3632                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
3633                                                                                                                                                </fo:inline>
3634                                                                                                                                        </xsl:if>
3635                                                                                                                                </fo:block>
3636                                                                                                                        </fo:table-cell>
3637                                                                                                                        <fo:table-cell>
3638                                                                                                                                <fo:block>
3639                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
3640                                                                                                                                                <fo:inline>
3641                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
3642                                                                                                                                                </fo:inline>
3643                                                                                                                                        </xsl:if>
3644                                                                                                                                </fo:block>
3645                                                                                                                        </fo:table-cell>
3646                                                                                                                        <fo:table-cell>
3647                                                                                                                                <fo:block>
3648                                                                                                                                        <xsl:if test="string(witsml:mdBottom - witsml:mdTop)">
3649                                                                                                                                                <fo:inline>
3650                                                                                                                                                        <xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
3651                                                                                                                                                </fo:inline>
3652                                                                                                                                        </xsl:if>
3653                                                                                                                                </fo:block>
3654                                                                                                                        </fo:table-cell>
3655                                                                                                                        <fo:table-cell>
3656                                                                                                                                <fo:block>
3657                                                                                                                                        <xsl:if test="string(witsml:tvdTop)">
3658                                                                                                                                                <fo:inline>
3659                                                                                                                                                        <xsl:value-of select="witsml:tvdTop"/>
3660                                                                                                                                                </fo:inline>
3661                                                                                                                                        </xsl:if>
3662                                                                                                                                </fo:block>
3663                                                                                                                        </fo:table-cell>
3664                                                                                                                        <fo:table-cell>
3665                                                                                                                                <fo:block>
3666                                                                                                                                        <xsl:if test="string(witsml:tvdBottom)">
3667                                                                                                                                                <fo:inline>
3668                                                                                                                                                        <xsl:value-of select="witsml:tvdBottom"/>
3669                                                                                                                                                </fo:inline>
3670                                                                                                                                        </xsl:if>
3671                                                                                                                                </fo:block>
3672                                                                                                                        </fo:table-cell>
3673                                                                                                                        <fo:table-cell>
3674                                                                                                                                <fo:block>
3675                                                                                                                                        <xsl:if test="string(witsml:tvdBottom - witsml:tvdTop)">
3676                                                                                                                                                <fo:inline>
3677                                                                                                                                                        <xsl:value-of select="witsml:tvdBottom - witsml:tvdTop"/>
3678                                                                                                                                                </fo:inline>
3679                                                                                                                                        </xsl:if>
3680                                                                                                                                </fo:block>
3681                                                                                                                        </fo:table-cell>
3682                                                                                                                        <fo:table-cell>
3683                                                                                                                                <fo:block>
3684                                                                                                                                        <xsl:if test="string(witsml:show)">
3685                                                                                                                                                <fo:inline>
3686                                                                                                                                                        <xsl:value-of select="witsml:show"/>
3687                                                                                                                                                </fo:inline>
3688                                                                                                                                        </xsl:if>
3689                                                                                                                                </fo:block>
3690                                                                                                                        </fo:table-cell>
3691                                                                                                                        <fo:table-cell>
3692                                                                                                                                <fo:block>
3693                                                                                                                                        <xsl:if test="string(witsml:lithology)">
3694                                                                                                                                                <fo:inline>
3695                                                                                                                                                        <xsl:value-of select="witsml:lithology"/>
3696                                                                                                                                                </fo:inline>
3697                                                                                                                                        </xsl:if>
3698                                                                                                                                </fo:block>
3699                                                                                                                        </fo:table-cell>
3700                                                                                                                </fo:table-row>
3701                                                                                                        </xsl:for-each>
3702                                                                                                </fo:table-body>
3703                                                                                        </fo:table> </fo:block>
3704                                                                        </fo:table-cell>
3705                                                                </fo:table-row>
3706                                                        </fo:table-body>
3707                                                </fo:table>
3708                                        </fo:block>
3709                                        <xslt:comment> Well Control Incident </xslt:comment>
3710                                        <fo:block break-before="page">
3711                                                <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:controlIncidentInfo">
3712                                                        <fo:block>
3713                                                                <xsl:variable name="element_drillReportControlIncidentInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportControlIncidentInfo']/xsd:sequence"/>
3714                                                                <xsl:variable name="url_dTim">
3715                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
3716                                                                </xsl:variable>
3717                                                                <xsl:variable name="url_mdInflow">
3718                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdInflow']/@sawsdl:modelReference"/>
3719                                                                </xsl:variable>
3720                                                                <xsl:variable name="url_tvdInflow">
3721                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tvdInflow']/@sawsdl:modelReference"/>
3722                                                                </xsl:variable>
3723                                                                <xsl:variable name="url_eTimLost">
3724                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='eTimLost']/@sawsdl:modelReference"/>
3725                                                                </xsl:variable>
3726                                                                <xsl:variable name="url_dTimRegained">
3727                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTimRegained']/@sawsdl:modelReference"/>
3728                                                                </xsl:variable>
3729                                                                <xsl:variable name="url_mdBit">
3730                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdBit']/@sawsdl:modelReference"/>
3731                                                                </xsl:variable>
3732                                                                <xsl:variable name="url_wtMud">
3733                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='wtMud']/@sawsdl:modelReference"/>
3734                                                                </xsl:variable>
3735                                                                <xsl:variable name="url_porePressure">
3736                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='porePressure']/@sawsdl:modelReference"/>
3737                                                                </xsl:variable>
3738                                                                <xsl:variable name="url_mdCsgLast">
3739                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
3740                                                                </xsl:variable>
3741                                                                <xsl:variable name="url_volMudGained">
3742                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='volMudGained']/@sawsdl:modelReference"/>
3743                                                                </xsl:variable>
3744                                                                <xsl:variable name="url_presShutInCasing">
3745                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInCasing']/@sawsdl:modelReference"/>
3746                                                                </xsl:variable>
3747                                                                <xsl:variable name="url_presShutInDrill">
3748                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInDrill']/@sawsdl:modelReference"/>
3749                                                                </xsl:variable>
3750                                                                <xsl:variable name="url_incidentType">
3751                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='incidentType']/@sawsdl:modelReference"/>
3752                                                                </xsl:variable>
3753                                                                <xsl:variable name="url_killingType">
3754                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='killingType']/@sawsdl:modelReference"/>
3755                                                                </xsl:variable>
3756                                                                <xsl:variable name="url_formation">
3757                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='formation']/@sawsdl:modelReference"/>
3758                                                                </xsl:variable>
3759                                                                <xsl:variable name="url_tempBottom">
3760                                                                        <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tempBottom']/@sawsdl:modelReference"/>
3761                                                                </xsl:variable>
3762                                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3763                                                                <fo:leader/>
3764                                                                <fo:table>
3765                                                                        <fo:table-column column-width="100%"/>
3766                                                                        <fo:table-body>
3767                                                                                <fo:table-row font-weight="bold" font-size="14pt">
3768                                                                                        <fo:table-cell>
3769                                                                                                <fo:block>
3770                                                                        Well Control Incident
3771                                                                                                </fo:block>
3772                                                                                        </fo:table-cell>
3773                                                                                </fo:table-row>
3774                                                                                <fo:table-row height="13.840px" overflow="hidden">
3775                                                                                        <fo:table-cell>
3776                                                                                                <fo:block> </fo:block>
3777                                                                                        </fo:table-cell>
3778                                                                                </fo:table-row>
3779                                                                                <fo:table-row>
3780                                                                                        <fo:table-cell>
3781                                                                                                <fo:block>
3782                                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3783                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="1"/>
3784                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="2"/>
3785                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="3"/>
3786                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="4"/>
3787                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="5"/>
3788                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="6"/>
3789                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="7"/>
3790                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="8"/>
3791                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="9"/>
3792                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="10"/>
3793                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="11"/>
3794                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="12"/>
3795                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="13"/>
3796                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="14"/>
3797                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="15"/>
3798                                                                                                                <fo:table-column column-width="proportional-column-width(6.25)" column-number="16"/>
3799                                                                                                                <fo:table-body>
3800                                                                                                                        <fo:table-row font-weight="bold">
3801                                                                                                                                <fo:table-cell>
3802                                                                                                                                        <fo:block>
3803                                                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Date</fo:basic-link>
3804                                                                                                                                        </fo:block>
3805                                                                                                                                </fo:table-cell>
3806                                                                                                                                <fo:table-cell>
3807                                                                                                                                        <fo:block>
3808                                                                                                                                                <fo:basic-link external-destination="url({$url_mdInflow})">Depth of well</fo:basic-link>
3809                                                                                                                                                <fo:block>mMD</fo:block>
3810                                                                                                                                        </fo:block>
3811                                                                                                                                </fo:table-cell>
3812                                                                                                                                <fo:table-cell>
3813                                                                                                                                        <fo:block>
3814                                                                                                                                                <fo:basic-link external-destination="url({$url_tvdInflow})">Depth of well</fo:basic-link>
3815                                                                                                                                        </fo:block>
3816                                                                                                                                        <fo:block>mTVD</fo:block>
3817                                                                                                                                </fo:table-cell>
3818                                                                                                                                <fo:table-cell>
3819                                                                                                                                        <fo:block>
3820                                                                                                                                                <fo:basic-link external-destination="url({$url_eTimLost})">Lost time</fo:basic-link>
3821                                                                                                                                        </fo:block>
3822                                                                                                                                        <fo:block>
3823                                                                                                                                                <xsl:if test="string(witsml:eTimLost/@uom)">
3824                                                                                                                                                        <fo:inline>
3825                                                                                                                                                                <xsl:value-of select="witsml:eTimLost/@uom"/>
3826                                                                                                                                                        </fo:inline>
3827                                                                                                                                                </xsl:if>
3828                                                                                                                                        </fo:block>
3829                                                                                                                                </fo:table-cell>
3830                                                                                                                                <fo:table-cell>
3831                                                                                                                                        <fo:block>
3832                                                                                                                                                <fo:basic-link external-destination="url({$url_dTimRegained})">Time for well control regain</fo:basic-link>
3833                                                                                                                                        </fo:block>
3834                                                                                                                                </fo:table-cell>
3835                                                                                                                                <fo:table-cell>
3836                                                                                                                                        <fo:block>
3837                                                                                                                                                <fo:basic-link external-destination="url({$url_mdBit})">Depth at bit</fo:basic-link>
3838                                                                                                                                                <fo:block>mMD</fo:block>
3839                                                                                                                                        </fo:block>
3840                                                                                                                                </fo:table-cell>
3841                                                                                                                                <fo:table-cell>
3842                                                                                                                                        <fo:block>
3843                                                                                                                                                <fo:basic-link external-destination="url({$url_wtMud})">Drilling fluid density</fo:basic-link>
3844                                                                                                                                        </fo:block>
3845                                                                                                                                        <fo:block>
3846                                                                                                                                                <xsl:if test="string(witsml:wtMud/@uom)">
3847                                                                                                                                                        <fo:inline>
3848                                                                                                                                                                <xsl:value-of select="witsml:wtMud/@uom"/>
3849                                                                                                                                                        </fo:inline>
3850                                                                                                                                                </xsl:if>
3851                                                                                                                                        </fo:block>
3852                                                                                                                                </fo:table-cell>
3853                                                                                                                                <fo:table-cell>
3854                                                                                                                                        <fo:block>
3855                                                                                                                                                <fo:basic-link external-destination="url({$url_porePressure})">Pore pressure</fo:basic-link>
3856                                                                                                                                        </fo:block>
3857                                                                                                                                        <fo:block>
3858                                                                                                                                                <xsl:if test="string(witsml:porePressure/@uom)">
3859                                                                                                                                                        <fo:inline>
3860                                                                                                                                                                <xsl:value-of select="witsml:porePressure/@uom"/>
3861                                                                                                                                                        </fo:inline>
3862                                                                                                                                                </xsl:if>
3863                                                                                                                                        </fo:block>
3864                                                                                                                                </fo:table-cell>
3865                                                                                                                                <fo:table-cell>
3866                                                                                                                                        <fo:block>
3867                                                                                                                                                <fo:basic-link external-destination="url({$url_mdCsgLast})">Depth to casing</fo:basic-link>
3868                                                                                                                                        </fo:block>
3869                                                                                                                                        <fo:block>mMD</fo:block>
3870                                                                                                                                </fo:table-cell>
3871                                                                                                                                <fo:table-cell>
3872                                                                                                                                        <fo:block>
3873                                                                                                                                                <fo:basic-link external-destination="url({$url_volMudGained})">Gained vol of Fluid</fo:basic-link>
3874                                                                                                                                        </fo:block>
3875                                                                                                                                        <fo:block>
3876                                                                                                                                                <xsl:if test="string(witsml:volMudGain/@uom)">
3877                                                                                                                                                        <fo:inline>
3878                                                                                                                                                                <xsl:value-of select="witsml:volMudGain/@uom"/>
3879                                                                                                                                                        </fo:inline>
3880                                                                                                                                                </xsl:if>
3881                                                                                                                                        </fo:block>
3882                                                                                                                                </fo:table-cell>
3883                                                                                                                                <fo:table-cell>
3884                                                                                                                                        <fo:block>
3885                                                                                                                                                <fo:basic-link external-destination="url({$url_presShutInCasing})">Shut in casing pressure</fo:basic-link>
3886                                                                                                                                        </fo:block>
3887                                                                                                                                        <fo:block>
3888                                                                                                                                                <xsl:if test="string(witsml:presShutInCasing/@uom)">
3889                                                                                                                                                        <fo:inline>
3890                                                                                                                                                                <xsl:value-of select="witsml:presShutInCasing/@uom"/>
3891                                                                                                                                                        </fo:inline>
3892                                                                                                                                                </xsl:if>
3893                                                                                                                                        </fo:block>
3894                                                                                                                                </fo:table-cell>
3895                                                                                                                                <fo:table-cell>
3896                                                                                                                                        <fo:block>
3897                                                                                                                                                <fo:basic-link external-destination="url({$url_presShutInDrill})">Shut in drill pipe pressure</fo:basic-link>
3898                                                                                                                                        </fo:block>
3899                                                                                                                                        <fo:block>
3900                                                                                                                                                <xsl:if test="string(witsml:presShutInDrill/@uom)">
3901                                                                                                                                                        <fo:inline>
3902                                                                                                                                                                <xsl:value-of select="witsml:presShutInDrill/@uom"/>
3903                                                                                                                                                        </fo:inline>
3904                                                                                                                                                </xsl:if>
3905                                                                                                                                        </fo:block>
3906                                                                                                                                </fo:table-cell>
3907                                                                                                                                <fo:table-cell>
3908                                                                                                                                        <fo:block>
3909                                                                                                                                                <fo:basic-link external-destination="url({$url_incidentType})">Incident class</fo:basic-link>
3910                                                                                                                                        </fo:block>
3911                                                                                                                                </fo:table-cell>
3912                                                                                                                                <fo:table-cell>
3913                                                                                                                                        <fo:block>
3914                                                                                                                                                <fo:basic-link external-destination="url({$url_killingType})">Killing procd</fo:basic-link>
3915                                                                                                                                        </fo:block>
3916                                                                                                                                </fo:table-cell>
3917                                                                                                                                <fo:table-cell>
3918                                                                                                                                        <fo:block>
3919                                                                                                                                                <fo:basic-link external-destination="url({$url_formation})">Formation</fo:basic-link>
3920                                                                                                                                        </fo:block>
3921                                                                                                                                </fo:table-cell>
3922                                                                                                                                <fo:table-cell>
3923                                                                                                                                        <fo:block>
3924                                                                                                                                                <fo:basic-link external-destination="url({$url_tempBottom})">BHT</fo:basic-link>
3925                                                                                                                                        </fo:block>
3926                                                                                                                                </fo:table-cell>
3927                                                                                                                        </fo:table-row>
3928                                                                                                                        <fo:table-row>
3929                                                                                                                                <fo:table-cell>
3930                                                                                                                                        <fo:block>
3931                                                                                                                                                <xsl:if test="string(substring(substring-before(witsml:dTim, 'T'), 0, 17))">
3932                                                                                                                                                        <fo:inline>
3933                                                                                                                                                                <xsl:value-of select="substring(substring-before(witsml:dTim, 'T'), 0, 17)"/>
3934                                                                                                                                                        </fo:inline>
3935                                                                                                                                                </xsl:if>
3936                                                                                                                                        </fo:block>
3937                                                                                                                                </fo:table-cell>
3938                                                                                                                                <fo:table-cell>
3939                                                                                                                                        <fo:block>
3940                                                                                                                                                <xsl:if test="string(witsml:mdInflow)">
3941                                                                                                                                                        <fo:inline>
3942                                                                                                                                                                <xsl:value-of select="witsml:mdInflow"/>
3943                                                                                                                                                        </fo:inline>
3944                                                                                                                                                </xsl:if>
3945                                                                                                                                        </fo:block>
3946                                                                                                                                </fo:table-cell>
3947                                                                                                                                <fo:table-cell>
3948                                                                                                                                        <fo:block>
3949                                                                                                                                                <xsl:if test="string(witsml:tvdInflow)">
3950                                                                                                                                                        <fo:inline>
3951                                                                                                                                                                <xsl:value-of select="witsml:tvdInflow"/>
3952                                                                                                                                                        </fo:inline>
3953                                                                                                                                                </xsl:if>
3954                                                                                                                                        </fo:block>
3955                                                                                                                                </fo:table-cell>
3956                                                                                                                                <fo:table-cell>
3957                                                                                                                                        <fo:block>
3958                                                                                                                                                <xsl:if test="string(witsml:eTimLost)">
3959                                                                                                                                                        <fo:inline>
3960                                                                                                                                                                <xsl:value-of select="witsml:eTimLost"/>
3961                                                                                                                                                        </fo:inline>
3962                                                                                                                                                </xsl:if>
3963                                                                                                                                        </fo:block>
3964                                                                                                                                </fo:table-cell>
3965                                                                                                                                <fo:table-cell>
3966                                                                                                                                        <fo:block>
3967                                                                                                                                                <xsl:if test="string(substring-after(substring(witsml:dTimRegained, 0, 17), 'T'))">
3968                                                                                                                                                        <fo:inline>
3969                                                                                                                                                                <xsl:value-of select="substring-after(substring(witsml:dTimRegained, 0, 17), 'T')"/>
3970                                                                                                                                                        </fo:inline>
3971                                                                                                                                                </xsl:if>
3972                                                                                                                                        </fo:block>
3973                                                                                                                                </fo:table-cell>
3974                                                                                                                                <fo:table-cell>
3975                                                                                                                                        <fo:block>
3976                                                                                                                                                <xsl:if test="string(witsml:mdBit)">
3977                                                                                                                                                        <fo:inline>
3978                                                                                                                                                                <xsl:value-of select="witsml:mdBit"/>
3979                                                                                                                                                        </fo:inline>
3980                                                                                                                                                </xsl:if>
3981                                                                                                                                        </fo:block>
3982                                                                                                                                </fo:table-cell>
3983                                                                                                                                <fo:table-cell>
3984                                                                                                                                        <fo:block>
3985                                                                                                                                                <xsl:if test="string(witsml:wtMud)">
3986                                                                                                                                                        <fo:inline>
3987                                                                                                                                                                <xsl:value-of select="witsml:wtMud"/>
3988                                                                                                                                                        </fo:inline>
3989                                                                                                                                                </xsl:if>
3990                                                                                                                                        </fo:block>
3991                                                                                                                                </fo:table-cell>
3992                                                                                                                                <fo:table-cell>
3993                                                                                                                                        <fo:block>
3994                                                                                                                                                <xsl:if test="string(witsml:porePressure)">
3995                                                                                                                                                        <fo:inline>
3996                                                                                                                                                                <xsl:value-of select="witsml:porePressure"/>
3997                                                                                                                                                        </fo:inline>
3998                                                                                                                                                </xsl:if>
3999                                                                                                                                        </fo:block>
4000                                                                                                                                </fo:table-cell>
4001                                                                                                                                <fo:table-cell>
4002                                                                                                                                        <fo:block>
4003                                                                                                                                                <xsl:if test="string(witsml:mdCsgLast)">
4004                                                                                                                                                        <fo:inline>
4005                                                                                                                                                                <xsl:value-of select="witsml:mdCsgLast"/>
4006                                                                                                                                                        </fo:inline>
4007                                                                                                                                                </xsl:if>
4008                                                                                                                                        </fo:block>
4009                                                                                                                                </fo:table-cell>
4010                                                                                                                                <fo:table-cell>
4011                                                                                                                                        <fo:block>
4012                                                                                                                                                <xsl:if test="string(witsml:volMudGained)">
4013                                                                                                                                                        <fo:inline>
4014                                                                                                                                                                <xsl:value-of select="witsml:volMudGained"/>
4015                                                                                                                                                        </fo:inline>
4016                                                                                                                                                </xsl:if>
4017                                                                                                                                        </fo:block>
4018                                                                                                                                </fo:table-cell>
4019                                                                                                                                <fo:table-cell>
4020                                                                                                                                        <fo:block>
4021                                                                                                                                                <xsl:if test="string(witsml:presShutInCasing)">
4022                                                                                                                                                        <fo:inline>
4023                                                                                                                                                                <xsl:value-of select="witsml:presShutInCasing"/>
4024                                                                                                                                                        </fo:inline>
4025                                                                                                                                                </xsl:if>
4026                                                                                                                                        </fo:block>
4027                                                                                                                                </fo:table-cell>
4028                                                                                                                                <fo:table-cell>
4029                                                                                                                                        <fo:block>
4030                                                                                                                                                <xsl:if test="string(witsml:presShutInDrill)">
4031                                                                                                                                                        <fo:inline>
4032                                                                                                                                                                <xsl:value-of select="witsml:presShutInDrill"/>
4033                                                                                                                                                        </fo:inline>
4034                                                                                                                                                </xsl:if>
4035                                                                                                                                        </fo:block>
4036                                                                                                                                </fo:table-cell>
4037                                                                                                                                <fo:table-cell>
4038                                                                                                                                        <fo:block>
4039                                                                                                                                                <xsl:if test="string(witsml:incidentType)">
4040                                                                                                                                                        <fo:inline>
4041                                                                                                                                                                <xsl:value-of select="witsml:incidentType"/>
4042                                                                                                                                                        </fo:inline>
4043                                                                                                                                                </xsl:if>
4044                                                                                                                                        </fo:block>
4045                                                                                                                                </fo:table-cell>
4046                                                                                                                                <fo:table-cell>
4047                                                                                                                                        <fo:block>
4048                                                                                                                                                <xsl:if test="string(witsml:killingType)">
4049                                                                                                                                                        <fo:inline>
4050                                                                                                                                                                <xsl:value-of select="witsml:killingType"/>
4051                                                                                                                                                        </fo:inline>
4052                                                                                                                                                </xsl:if>
4053                                                                                                                                        </fo:block>
4054                                                                                                                                </fo:table-cell>
4055                                                                                                                                <fo:table-cell>
4056                                                                                                                                        <fo:block>
4057                                                                                                                                                <xsl:if test="string(witsml:formation)">
4058                                                                                                                                                        <fo:inline>
4059                                                                                                                                                                <xsl:value-of select="witsml:formation"/>
4060                                                                                                                                                        </fo:inline>
4061                                                                                                                                                </xsl:if>
4062                                                                                                                                        </fo:block>
4063                                                                                                                                </fo:table-cell>
4064                                                                                                                                <fo:table-cell>
4065                                                                                                                                        <fo:block>
4066                                                                                                                                                <xsl:if test="string(witsml:tempBottom)">
4067                                                                                                                                                        <fo:inline>
4068                                                                                                                                                                <xsl:value-of select="witsml:tempBottom"/>
4069                                                                                                                                                        </fo:inline>
4070                                                                                                                                                </xsl:if>
4071                                                                                                                                        </fo:block>
4072                                                                                                                                </fo:table-cell>
4073                                                                                                                        </fo:table-row>
4074                                                                                                                </fo:table-body>
4075                                                                                                        </fo:table>
4076                                                                                                        <fo:table>
4077                                                                                                                <fo:table-body>
4078                                                                                                                        <fo:table-row>
4079                                                                                                                                <fo:table-cell>
4080                                                                                                                                        <fo:block> </fo:block>
4081                                                                                                                                </fo:table-cell>
4082                                                                                                                        </fo:table-row>
4083                                                                                                                        <fo:table-row>
4084                                                                                                                                <fo:table-cell>
4085                                                                                                                                        <fo:block>
4086                                                                                                                                                <xsl:if test="string(witsml:description)">
4087                                                                                                                                                        <fo:inline>
4088                                                                                                                                                                <xsl:value-of select="witsml:description"/>
4089                                                                                                                                                        </fo:inline>
4090                                                                                                                                                </xsl:if>
4091                                                                                                                                        </fo:block>
4092                                                                                                                                </fo:table-cell>
4093                                                                                                                        </fo:table-row>
4094                                                                                                                </fo:table-body>
4095                                                                                                        </fo:table> </fo:block>
4096                                                                                        </fo:table-cell>
4097                                                                                </fo:table-row>
4098                                                                        </fo:table-body>
4099                                                                </fo:table>
4100                                                        </fo:block>
4101                                                </xsl:for-each>
4102                                        </fo:block>
4103                                        <xslt:comment> Perforation Information </xslt:comment>
4104                                        <fo:block break-before="page">
4105                                                <xsl:variable name="element_drillReportPerfInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPerfInfo']/xsd:sequence"/>
4106                                                <xsl:variable name="url_dTimOpen">
4107                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimOpen']/@sawsdl:modelReference"/>
4108                                                </xsl:variable>
4109                                                <xsl:variable name="url_dTimClose">
4110                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimClose']/@sawsdl:modelReference"/>
4111                                                </xsl:variable>
4112                                                <xsl:variable name="url_mdTop">
4113                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
4114                                                </xsl:variable>
4115                                                <xsl:variable name="url_mdBottom">
4116                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
4117                                                </xsl:variable>
4118                                                <xsl:variable name="url_tvdTop">
4119                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
4120                                                </xsl:variable>
4121                                                <xsl:variable name="url_tvdBottom">
4122                                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
4123                                                </xsl:variable>
4124                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
4125                                                <fo:leader/>
4126                                                <fo:table>
4127                                                        <fo:table-column column-width="100%"/>
4128                                                        <fo:table-body>
4129                                                                <fo:table-row font-weight="bold" font-size="14pt">
4130                                                                        <fo:table-cell>
4131                                                                                <fo:block>
4132                                                                        Perforation Information
4133                                                                                </fo:block>
4134                                                                        </fo:table-cell>
4135                                                                </fo:table-row>
4136                                                                <fo:table-row>
4137                                                                        <fo:table-cell>
4138                                                                                <fo:block> </fo:block>
4139                                                                        </fo:table-cell>
4140                                                                </fo:table-row>
4141                                                                <fo:table-row>
4142                                                                        <fo:table-cell>
4143                                                                                <fo:block>
4144                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
4145                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="1"/>
4146                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="2"/>
4147                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="3"/>
4148                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="4"/>
4149                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="5"/>
4150                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="6"/>
4151                                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="7"/>
4152                                                                                                <fo:table-body>
4153                                                                                                        <fo:table-row font-weight="bold">
4154                                                                                                                <fo:table-cell>
4155                                                                                                                        <fo:block>
4156                                                                                                                                <fo:basic-link external-destination="url({$url_dTimOpen})">Time of opening well perf</fo:basic-link>
4157                                                                                                                        </fo:block>
4158                                                                                                                </fo:table-cell>
4159                                                                                                                <fo:table-cell>
4160                                                                                                                        <fo:block>
4161                                                                                                                                <fo:basic-link external-destination="url({$url_dTimClose})">Time of closing well perf</fo:basic-link>
4162                                                                                                                        </fo:block>
4163                                                                                                                </fo:table-cell>
4164                                                                                                                <fo:table-cell>
4165                                                                                                                        <fo:block>
4166                                                                                                                                <fo:basic-link external-destination="url({$urlRDS})">Duration well perf</fo:basic-link>
4167                                                                                                                        </fo:block>
4168                                                                                                                </fo:table-cell>
4169                                                                                                                <fo:table-cell>
4170                                                                                                                        <fo:block>
4171                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Top of perf</fo:basic-link>
4172                                                                                                                        </fo:block>
4173                                                                                                                        <fo:block>mMD</fo:block>
4174                                                                                                                </fo:table-cell>
4175                                                                                                                <fo:table-cell>
4176                                                                                                                        <fo:block>
4177                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Bottom of Perf</fo:basic-link>
4178                                                                                                                        </fo:block>
4179                                                                                                                        <fo:block>mMD</fo:block>
4180                                                                                                                </fo:table-cell>
4181                                                                                                                <fo:table-cell>
4182                                                                                                                        <fo:block>
4183                                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Top of perf</fo:basic-link>
4184                                                                                                                        </fo:block>
4185                                                                                                                        <fo:block>mTVD</fo:block>
4186                                                                                                                </fo:table-cell>
4187                                                                                                                <fo:table-cell>
4188                                                                                                                        <fo:block>
4189                                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Bottom of Perf</fo:basic-link>
4190                                                                                                                        </fo:block>
4191                                                                                                                        <fo:block>mTVD</fo:block>
4192                                                                                                                </fo:table-cell>
4193                                                                                                        </fo:table-row>
4194                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:perfInfo">
4195                                                                                                                <fo:table-row>
4196                                                                                                                        <fo:table-cell>
4197                                                                                                                                <fo:block>
4198                                                                                                                                        <xsl:if test="string(substring(witsml:dTimOpen, 0 ,17))">
4199                                                                                                                                                <fo:inline>
4200                                                                                                                                                        <xsl:value-of select="substring(witsml:dTimOpen, 0 ,17)"/>
4201                                                                                                                                                </fo:inline>
4202                                                                                                                                        </xsl:if>
4203                                                                                                                                </fo:block>
4204                                                                                                                        </fo:table-cell>
4205                                                                                                                        <fo:table-cell>
4206                                                                                                                                <fo:block>
4207                                                                                                                                        <xsl:if test="string(substring(witsml:dTimClose, 0, 17))">
4208                                                                                                                                                <fo:inline>
4209                                                                                                                                                        <xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
4210                                                                                                                                                </fo:inline>
4211                                                                                                                                        </xsl:if>
4212                                                                                                                                </fo:block>
4213                                                                                                                        </fo:table-cell>
4214                                                                                                                        <fo:table-cell>
4215                                                                                                                                <fo:block>
4216                                                                                                                                        <xslt:comment>&lt;xfd:field xpath="substring-after(xsl:dateTime(witsml:dTimClose) - xsl:dateTime(witsml:dTimOpen), 'PT')"/&gt;</xslt:comment>
4217                                                                                                                duration
4218                                                                                                                                </fo:block>
4219                                                                                                                        </fo:table-cell>
4220                                                                                                                        <fo:table-cell>
4221                                                                                                                                <fo:block>
4222                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
4223                                                                                                                                                <fo:inline>
4224                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
4225                                                                                                                                                </fo:inline>
4226                                                                                                                                        </xsl:if>
4227                                                                                                                                </fo:block>
4228                                                                                                                        </fo:table-cell>
4229                                                                                                                        <fo:table-cell>
4230                                                                                                                                <fo:block>
4231                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
4232                                                                                                                                                <fo:inline>
4233                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
4234                                                                                                                                                </fo:inline>
4235                                                                                                                                        </xsl:if>
4236                                                                                                                                </fo:block>
4237                                                                                                                        </fo:table-cell>
4238                                                                                                                        <fo:table-cell>
4239                                                                                                                                <fo:block>
4240                                                                                                                                        <xsl:if test="string(witsml:tvdTop)">
4241                                                                                                                                                <fo:inline>
4242                                                                                                                                                        <xsl:value-of select="witsml:tvdTop"/>
4243                                                                                                                                                </fo:inline>
4244                                                                                                                                        </xsl:if>
4245                                                                                                                                </fo:block>
4246                                                                                                                        </fo:table-cell>
4247                                                                                                                        <fo:table-cell>
4248                                                                                                                                <fo:block>
4249                                                                                                                                        <xsl:if test="string(witsml:tvdBottom)">
4250                                                                                                                                                <fo:inline>
4251                                                                                                                                                        <xsl:value-of select="witsml:tvdBottom"/>
4252                                                                                                                                                </fo:inline>
4253                                                                                                                                        </xsl:if>
4254                                                                                                                                </fo:block>
4255                                                                                                                        </fo:table-cell>
4256                                                                                                                </fo:table-row>
4257                                                                                                        </xsl:for-each>
4258                                                                                                </fo:table-body>
4259                                                                                        </fo:table> </fo:block>
4260                                                                        </fo:table-cell>
4261                                                                </fo:table-row>
4262                                                        </fo:table-body>
4263                                                </fo:table>
4264                                        </fo:block>
4265                                        <xslt:comment> Gas Reading Information </xslt:comment>
4266                                        <fo:block>
4267                                                <xsl:variable name="element_drillReportGasReadingInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportGasReadingInfo']/xsd:sequence"/>
4268                                                <xsl:variable name="url_dTim">
4269                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
4270                                                </xsl:variable>
4271                                                <xsl:variable name="url_readingType">
4272                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='readingType']/@sawsdl:modelReference"/>
4273                                                </xsl:variable>
4274                                                <xsl:variable name="url_mdTop">
4275                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
4276                                                </xsl:variable>
4277                                                <xsl:variable name="url_mdBottom">
4278                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
4279                                                </xsl:variable>
4280                                                <xsl:variable name="url_tvdTop">
4281                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
4282                                                </xsl:variable>
4283                                                <xsl:variable name="url_tvdBottom">
4284                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
4285                                                </xsl:variable>
4286                                                <xsl:variable name="url_gasHigh">
4287                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasHigh']/@sawsdl:modelReference"/>
4288                                                </xsl:variable>
4289                                                <xsl:variable name="url_gasLow">
4290                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasLow']/@sawsdl:modelReference"/>
4291                                                </xsl:variable>
4292                                                <xsl:variable name="url_meth">
4293                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='meth']/@sawsdl:modelReference"/>
4294                                                </xsl:variable>
4295                                                <xsl:variable name="url_eth">
4296                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='eth']/@sawsdl:modelReference"/>
4297                                                </xsl:variable>
4298                                                <xsl:variable name="url_prop">
4299                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='prop']/@sawsdl:modelReference"/>
4300                                                </xsl:variable>
4301                                                <xsl:variable name="url_ibut">
4302                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ibut']/@sawsdl:modelReference"/>
4303                                                </xsl:variable>
4304                                                <xsl:variable name="url_ipent">
4305                                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ipent']/@sawsdl:modelReference"/>
4306                                                </xsl:variable>
4307                                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
4308                                                <fo:leader/>
4309                                                <fo:table>
4310                                                        <fo:table-column column-width="100%"/>
4311                                                        <fo:table-body>
4312                                                                <fo:table-row font-weight="bold" font-size="14pt">
4313                                                                        <fo:table-cell>
4314                                                                                <fo:block>
4315                                                                        Gas Reading Information
4316                                                                                </fo:block>
4317                                                                        </fo:table-cell>
4318                                                                </fo:table-row>
4319                                                                <fo:table-row>
4320                                                                        <fo:table-cell>
4321                                                                                <fo:block> </fo:block>
4322                                                                        </fo:table-cell>
4323                                                                </fo:table-row>
4324                                                                <fo:table-row>
4325                                                                        <fo:table-cell>
4326                                                                                <fo:block>
4327                                                                                        <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
4328                                                                                                <fo:table-column column-width="proportional-column-width(11)" column-number="1"/>
4329                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="2"/>
4330                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="3"/>
4331                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="4"/>
4332                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="5"/>
4333                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="6"/>
4334                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="7"/>
4335                                                                                                <fo:table-column column-width="proportional-column-width(6.038)" column-number="8"/>
4336                                                                                                <fo:table-column column-width="proportional-column-width(6.038)" column-number="9"/>
4337                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="10"/>
4338                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="11"/>
4339                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="12"/>
4340                                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="13"/>
4341                                                                                                <fo:table-body>
4342                                                                                                        <fo:table-row font-weight="bold">
4343                                                                                                                <fo:table-cell>
4344                                                                                                                        <fo:block>
4345                                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
4346                                                                                                                        </fo:block>
4347                                                                                                                </fo:table-cell>
4348                                                                                                                <fo:table-cell>
4349                                                                                                                        <fo:block>
4350                                                                                                                                <fo:basic-link external-destination="url({$url_readingType})">Class</fo:basic-link>
4351                                                                                                                        </fo:block>
4352                                                                                                                </fo:table-cell>
4353                                                                                                                <fo:table-cell>
4354                                                                                                                        <fo:block>
4355                                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top</fo:basic-link>
4356                                                                                                                        </fo:block>
4357                                                                                                                        <fo:block>mMD</fo:block>
4358                                                                                                                </fo:table-cell>
4359                                                                                                                <fo:table-cell>
4360                                                                                                                        <fo:block>
4361                                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth to bottom</fo:basic-link>
4362                                                                                                                        </fo:block>
4363                                                                                                                        <fo:block>mMD</fo:block>
4364                                                                                                                </fo:table-cell>
4365                                                                                                                <fo:table-cell>
4366                                                                                                                        <fo:block>
4367                                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top</fo:basic-link>
4368                                                                                                                        </fo:block>
4369                                                                                                                        <fo:block>mTVD</fo:block>
4370                                                                                                                </fo:table-cell>
4371                                                                                                                <fo:table-cell>
4372                                                                                                                        <fo:block>
4373                                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Depth to bottom</fo:basic-link>
4374                                                                                                                        </fo:block>
4375                                                                                                                        <fo:block>mTVD</fo:block>
4376                                                                                                                </fo:table-cell>
4377                                                                                                                <fo:table-cell>
4378                                                                                                                        <fo:block>
4379                                                                                                                                <fo:basic-link external-destination="url({$url_gasHigh})">Highest gas</fo:basic-link>
4380                                                                                                                        </fo:block>
4381                                                                                                                        <fo:block>
4382                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom)">
4383                                                                                                                                        <fo:inline>
4384                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom"/>
4385                                                                                                                                        </fo:inline>
4386                                                                                                                                </xsl:if>
4387                                                                                                                        </fo:block>
4388                                                                                                                </fo:table-cell>
4389                                                                                                                <fo:table-cell>
4390                                                                                                                        <fo:block>
4391                                                                                                                                <fo:basic-link external-destination="url({$url_gasLow})">Lowest gas</fo:basic-link>
4392                                                                                                                        </fo:block>
4393                                                                                                                        <fo:block>
4394                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom)">
4395                                                                                                                                        <fo:inline>
4396                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom"/>
4397                                                                                                                                        </fo:inline>
4398                                                                                                                                </xsl:if>
4399                                                                                                                        </fo:block>
4400                                                                                                                </fo:table-cell>
4401                                                                                                                <fo:table-cell>
4402                                                                                                                        <fo:block>
4403                                                                                                                                <fo:basic-link external-destination="url({$url_meth})">C1</fo:basic-link>
4404                                                                                                                        </fo:block>
4405                                                                                                                        <fo:block>
4406                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom)">
4407                                                                                                                                        <fo:inline>
4408                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom"/>
4409                                                                                                                                        </fo:inline>
4410                                                                                                                                </xsl:if>
4411                                                                                                                        </fo:block>
4412                                                                                                                </fo:table-cell>
4413                                                                                                                <fo:table-cell>
4414                                                                                                                        <fo:block>
4415                                                                                                                                <fo:basic-link external-destination="url({$url_eth})">C2</fo:basic-link>
4416                                                                                                                        </fo:block>
4417                                                                                                                        <fo:block>
4418                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom)">
4419                                                                                                                                        <fo:inline>
4420                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom"/>
4421                                                                                                                                        </fo:inline>
4422                                                                                                                                </xsl:if>
4423                                                                                                                        </fo:block>
4424                                                                                                                </fo:table-cell>
4425                                                                                                                <fo:table-cell>
4426                                                                                                                        <fo:block>
4427                                                                                                                                <fo:basic-link external-destination="url({$url_prop})">C3</fo:basic-link>
4428                                                                                                                        </fo:block>
4429                                                                                                                        <fo:block>
4430                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom)">
4431                                                                                                                                        <fo:inline>
4432                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom"/>
4433                                                                                                                                        </fo:inline>
4434                                                                                                                                </xsl:if>
4435                                                                                                                        </fo:block>
4436                                                                                                                </fo:table-cell>
4437                                                                                                                <fo:table-cell>
4438                                                                                                                        <fo:block>
4439                                                                                                                                <fo:basic-link external-destination="url({$url_ibut})">IC4</fo:basic-link>
4440                                                                                                                        </fo:block>
4441                                                                                                                        <fo:block>
4442                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom)">
4443                                                                                                                                        <fo:inline>
4444                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom"/>
4445                                                                                                                                        </fo:inline>
4446                                                                                                                                </xsl:if>
4447                                                                                                                        </fo:block>
4448                                                                                                                </fo:table-cell>
4449                                                                                                                <fo:table-cell>
4450                                                                                                                        <fo:block>
4451                                                                                                                                <fo:basic-link external-destination="url({$url_ipent})">IC5</fo:basic-link>
4452                                                                                                                        </fo:block>
4453                                                                                                                        <fo:block>
4454                                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom)">
4455                                                                                                                                        <fo:inline>
4456                                                                                                                                                <xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom"/>
4457                                                                                                                                        </fo:inline>
4458                                                                                                                                </xsl:if>
4459                                                                                                                        </fo:block>
4460                                                                                                                </fo:table-cell>
4461                                                                                                        </fo:table-row>
4462                                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo">
4463                                                                                                                <fo:table-row>
4464                                                                                                                        <fo:table-cell>
4465                                                                                                                                <fo:block>
4466                                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTim, 0, 17), 'T'))">
4467                                                                                                                                                <fo:inline>
4468                                                                                                                                                        <xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
4469                                                                                                                                                </fo:inline>
4470                                                                                                                                        </xsl:if>
4471                                                                                                                                </fo:block>
4472                                                                                                                        </fo:table-cell>
4473                                                                                                                        <fo:table-cell>
4474                                                                                                                                <fo:block>
4475                                                                                                                                        <xsl:if test="string(witsml:readingType)">
4476                                                                                                                                                <fo:inline>
4477                                                                                                                                                        <xsl:value-of select="witsml:readingType"/>
4478                                                                                                                                                </fo:inline>
4479                                                                                                                                        </xsl:if>
4480                                                                                                                                </fo:block>
4481                                                                                                                        </fo:table-cell>
4482                                                                                                                        <fo:table-cell>
4483                                                                                                                                <fo:block>
4484                                                                                                                                        <xsl:if test="string(witsml:mdTop)">
4485                                                                                                                                                <fo:inline>
4486                                                                                                                                                        <xsl:value-of select="witsml:mdTop"/>
4487                                                                                                                                                </fo:inline>
4488                                                                                                                                        </xsl:if>
4489                                                                                                                                </fo:block>
4490                                                                                                                        </fo:table-cell>
4491                                                                                                                        <fo:table-cell>
4492                                                                                                                                <fo:block>
4493                                                                                                                                        <xsl:if test="string(witsml:mdBottom)">
4494                                                                                                                                                <fo:inline>
4495                                                                                                                                                        <xsl:value-of select="witsml:mdBottom"/>
4496                                                                                                                                                </fo:inline>
4497                                                                                                                                        </xsl:if>
4498                                                                                                                                </fo:block>
4499                                                                                                                        </fo:table-cell>
4500                                                                                                                        <fo:table-cell>
4501                                                                                                                                <fo:block>
4502                                                                                                                                        <xsl:if test="string(witsml:tvdTop)">
4503                                                                                                                                                <fo:inline>
4504                                                                                                                                                        <xsl:value-of select="witsml:tvdTop"/>
4505                                                                                                                                                </fo:inline>
4506                                                                                                                                        </xsl:if>
4507                                                                                                                                </fo:block>
4508                                                                                                                        </fo:table-cell>
4509                                                                                                                        <fo:table-cell>
4510                                                                                                                                <fo:block>
4511                                                                                                                                        <xsl:if test="string(witsml:tvdBottom)">
4512                                                                                                                                                <fo:inline>
4513                                                                                                                                                        <xsl:value-of select="witsml:tvdBottom"/>
4514                                                                                                                                                </fo:inline>
4515                                                                                                                                        </xsl:if>
4516                                                                                                                                </fo:block>
4517                                                                                                                        </fo:table-cell>
4518                                                                                                                        <fo:table-cell>
4519                                                                                                                                <fo:block>
4520                                                                                                                                        <xsl:if test="string(witsml:gasHigh)">
4521                                                                                                                                                <fo:inline>
4522                                                                                                                                                        <xsl:value-of select="witsml:gasHigh"/>
4523                                                                                                                                                </fo:inline>
4524                                                                                                                                        </xsl:if>
4525                                                                                                                                </fo:block>
4526                                                                                                                        </fo:table-cell>
4527                                                                                                                        <fo:table-cell>
4528                                                                                                                                <fo:block>
4529                                                                                                                                        <xsl:if test="string(witsml:gasLow)">
4530                                                                                                                                                <fo:inline>
4531                                                                                                                                                        <xsl:value-of select="witsml:gasLow"/>
4532                                                                                                                                                </fo:inline>
4533                                                                                                                                        </xsl:if>
4534                                                                                                                                </fo:block>
4535                                                                                                                        </fo:table-cell>
4536                                                                                                                        <fo:table-cell>
4537                                                                                                                                <fo:block>
4538                                                                                                                                        <xsl:if test="string(witsml:meth)">
4539                                                                                                                                                <fo:inline>
4540                                                                                                                                                        <xsl:value-of select="witsml:meth"/>
4541                                                                                                                                                </fo:inline>
4542                                                                                                                                        </xsl:if>
4543                                                                                                                                </fo:block>
4544                                                                                                                        </fo:table-cell>
4545                                                                                                                        <fo:table-cell>
4546                                                                                                                                <fo:block>
4547                                                                                                                                        <xsl:if test="string(witsml:eth)">
4548                                                                                                                                                <fo:inline>
4549                                                                                                                                                        <xsl:value-of select="witsml:eth"/>
4550                                                                                                                                                </fo:inline>
4551                                                                                                                                        </xsl:if>
4552                                                                                                                                </fo:block>
4553                                                                                                                        </fo:table-cell>
4554                                                                                                                        <fo:table-cell>
4555                                                                                                                                <fo:block>
4556                                                                                                                                        <xsl:if test="string(witsml:prop)">
4557                                                                                                                                                <fo:inline>
4558                                                                                                                                                        <xsl:value-of select="witsml:prop"/>
4559                                                                                                                                                </fo:inline>
4560                                                                                                                                        </xsl:if>
4561                                                                                                                                </fo:block>
4562                                                                                                                        </fo:table-cell>
4563                                                                                                                        <fo:table-cell>
4564                                                                                                                                <fo:block>
4565                                                                                                                                        <xsl:if test="string(witsml:ibut)">
4566                                                                                                                                                <fo:inline>
4567                                                                                                                                                        <xsl:value-of select="witsml:ibut"/>
4568                                                                                                                                                </fo:inline>
4569                                                                                                                                        </xsl:if>
4570                                                                                                                                </fo:block>
4571                                                                                                                        </fo:table-cell>
4572                                                                                                                        <fo:table-cell>
4573                                                                                                                                <fo:block>
4574                                                                                                                                        <xsl:if test="string(witsml:ipent)">
4575                                                                                                                                                <fo:inline>
4576                                                                                                                                                        <xsl:value-of select="witsml:ipent"/>
4577                                                                                                                                                </fo:inline>
4578                                                                                                                                        </xsl:if>
4579                                                                                                                                </fo:block>
4580                                                                                                                        </fo:table-cell>
4581                                                                                                                </fo:table-row>
4582                                                                                                        </xsl:for-each>
4583                                                                                                </fo:table-body>
4584                                                                                        </fo:table> </fo:block>
4585                                                                        </fo:table-cell>
4586                                                                </fo:table-row>
4587                                                        </fo:table-body>
4588                                                </fo:table>
4589                                        </fo:block>
4590                                </fo:flow>
4591                        </fo:page-sequence>
4592                </fo:root>
4593        </xsl:template>
4594        <!-- ========================= NUMBER FORMATS ========================= -->
4595        <!-- ========================= CUSTOM FORMATS ========================= -->
4596        <xslt:template name="str:custom-format">
4597                <xslt:param name="str" select="''"/>
4598                <xslt:param name="pattern" select="''"/>
4599                <xslt:param name="crtPos" select="1"/>
4600                <xslt:if test="$crtPos &lt;= string-length($pattern)">
4601                        <xslt:variable name="chr" select="substring(normalize-space($pattern), $crtPos, 1)"/>
4602                        <xslt:choose>
4603                                <xslt:when test="$chr = '#'">
4604                                        <xslt:value-of select="substring($str, 1, 1)"/>
4605                                </xslt:when>
4606                                <xslt:otherwise>
4607                                        <xslt:value-of select="$chr"/>
4608                                </xslt:otherwise>
4609                        </xslt:choose>
4610                        <xslt:call-template name="str:custom-format">
4611                                <xslt:with-param name="str">
4612                                        <xslt:choose>
4613                                                <xslt:when test="$chr = '#'">
4614                                                        <xslt:value-of select="substring($str, 2)"/>
4615                                                </xslt:when>
4616                                                <xslt:otherwise>
4617                                                        <xslt:value-of select="$str"/>
4618                                                </xslt:otherwise>
4619                                        </xslt:choose>
4620                                </xslt:with-param>
4621                                <xslt:with-param name="pattern" select="$pattern"/>
4622                                <xslt:with-param name="crtPos" select="$crtPos + 1"/>
4623                        </xslt:call-template>
4624                </xslt:if>
4625        </xslt:template>
4626        <!-- ========================= EXSLT TEMPLATES [str.padding.template.xsl] ========================= -->
4627        <xslt:template name="str:padding">
4628                <xslt:param name="length" select="0"/>
4629                <xslt:param name="chars" select="' '"/>
4630                <xslt:choose>
4631                        <xslt:when test="not($length) or not($chars)"/>
4632                        <xslt:otherwise>
4633                                <xslt:variable name="string" select="concat($chars, $chars, $chars, $chars, $chars,                                        $chars, $chars, $chars, $chars, $chars)"/>
4634                                <xslt:choose>
4635                                        <xslt:when test="string-length($string) &gt;= $length">
4636                                                <xslt:value-of select="substring($string, 1, $length)"/>
4637                                        </xslt:when>
4638                                        <xslt:otherwise>
4639                                                <xslt:call-template name="str:padding">
4640                                                        <xslt:with-param name="length" select="$length"/>
4641                                                        <xslt:with-param name="chars" select="$string"/>
4642                                                </xslt:call-template>
4643                                        </xslt:otherwise>
4644                                </xslt:choose>
4645                        </xslt:otherwise>
4646                </xslt:choose>
4647        </xslt:template>
4648        <!-- ========================= EXSLT TEMPLATES [date.format-date.template.xsl] ========================= -->
4649        <xslt:template name="date:_get-days-elapsed">
4650                <xslt:param name="month"/>
4651                <xslt:choose>
4652                        <xslt:when test="$month = 1">0</xslt:when>
4653                        <xslt:when test="$month = 2">31</xslt:when>
4654                        <xslt:when test="$month = 3">59</xslt:when>
4655                        <xslt:when test="$month = 4">90</xslt:when>
4656                        <xslt:when test="$month = 5">120</xslt:when>
4657                        <xslt:when test="$month = 6">151</xslt:when>
4658                        <xslt:when test="$month = 7">181</xslt:when>
4659                        <xslt:when test="$month = 8">212</xslt:when>
4660                        <xslt:when test="$month = 9">243</xslt:when>
4661                        <xslt:when test="$month = 10">273</xslt:when>
4662                        <xslt:when test="$month = 11">304</xslt:when>
4663                        <xslt:when test="$month = 12">334</xslt:when>
4664                        <xslt:otherwise>365</xslt:otherwise>
4665                </xslt:choose>
4666        </xslt:template>
4667        <xslt:template name="date:_get-month">
4668                <xslt:param name="month"/>
4669                <xslt:param name="lang-id" select="'en_US'"/>
4670                <xslt:choose>
4671                        <xslt:when test="$lang-id = 'fr_FR'">
4672                                <xslt:choose>
4673                                        <xslt:when test="$month = 1">Janvier;Jan</xslt:when>
4674                                        <xslt:when test="$month = 2">Février;Fév</xslt:when>
4675                                        <xslt:when test="$month = 3">Mars;Mar</xslt:when>
4676                                        <xslt:when test="$month = 4">Avril;Avr</xslt:when>
4677                                        <xslt:when test="$month = 5">Mai;Mai</xslt:when>
4678                                        <xslt:when test="$month = 6">Juin;Jui</xslt:when>
4679                                        <xslt:when test="$month = 7">Juillet;Juil</xslt:when>
4680                                        <xslt:when test="$month = 8">Août;Aoû</xslt:when>
4681                                        <xslt:when test="$month = 9">Septembre;Sep</xslt:when>
4682                                        <xslt:when test="$month = 10">Octobre;Oct</xslt:when>
4683                                        <xslt:when test="$month = 11">Novembre;Nov</xslt:when>
4684                                        <xslt:when test="$month = 12">Décembre;Déc</xslt:when>
4685                                </xslt:choose>
4686                        </xslt:when>
4687                        <xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4688                                <xslt:choose>
4689                                        <xslt:when test="$month = 1">Januar;Jan</xslt:when>
4690                                        <xslt:when test="$month = 2">Februar;Feb</xslt:when>
4691                                        <xslt:when test="$month = 3">März;Mär</xslt:when>
4692                                        <xslt:when test="$month = 4">April;Apr</xslt:when>
4693                                        <xslt:when test="$month = 5">Dürfen;Dür</xslt:when>
4694                                        <xslt:when test="$month = 6">Juni;Jun</xslt:when>
4695                                        <xslt:when test="$month = 7">Juli;Jul</xslt:when>
4696                                        <xslt:when test="$month = 8">August;Aug</xslt:when>
4697                                        <xslt:when test="$month = 9">September;Sep</xslt:when>
4698                                        <xslt:when test="$month = 10">Oktober;Okt</xslt:when>
4699                                        <xslt:when test="$month = 11">November;Nov</xslt:when>
4700                                        <xslt:when test="$month = 12">Dezember;Dez</xslt:when>
4701                                </xslt:choose>
4702                        </xslt:when>
4703                        <xslt:when test="$lang-id = 'es_ES'">
4704                                <xslt:choose>
4705                                        <xslt:when test="$month = 1">Enero;Ene</xslt:when>
4706                                        <xslt:when test="$month = 2">Febrero;Feb</xslt:when>
4707                                        <xslt:when test="$month = 3">Marzo;Mar</xslt:when>
4708                                        <xslt:when test="$month = 4">Abril;Abr</xslt:when>
4709                                        <xslt:when test="$month = 5">Mayo;May</xslt:when>
4710                                        <xslt:when test="$month = 6">Junio;Jun</xslt:when>
4711                                        <xslt:when test="$month = 7">Julio;Jul</xslt:when>
4712                                        <xslt:when test="$month = 8">Agosto;Ago</xslt:when>
4713                                        <xslt:when test="$month = 9">Septiembre;Sep</xslt:when>
4714                                        <xslt:when test="$month = 10">Octubre;Oct</xslt:when>
4715                                        <xslt:when test="$month = 11">Noviembre;Nov</xslt:when>
4716                                        <xslt:when test="$month = 12">Diciembre;Dic</xslt:when>
4717                                </xslt:choose>
4718                        </xslt:when>
4719                        <xslt:when test="$lang-id = 'nl_NL'">
4720                                <xslt:choose>
4721                                        <xslt:when test="$month = 1">januari;jan</xslt:when>
4722                                        <xslt:when test="$month = 2">februari;feb</xslt:when>
4723                                        <xslt:when test="$month = 3">maart;maa</xslt:when>
4724                                        <xslt:when test="$month = 4">april;apr</xslt:when>
4725                                        <xslt:when test="$month = 5">mei;mei</xslt:when>
4726                                        <xslt:when test="$month = 6">juni;jun</xslt:when>
4727                                        <xslt:when test="$month = 7">juli;jul</xslt:when>
4728                                        <xslt:when test="$month = 8">augustus;aug</xslt:when>
4729                                        <xslt:when test="$month = 9">september;sep</xslt:when>
4730                                        <xslt:when test="$month = 10">oktober;okt</xslt:when>
4731                                        <xslt:when test="$month = 11">november;nov</xslt:when>
4732                                        <xslt:when test="$month = 12">december;dec</xslt:when>
4733                                </xslt:choose>
4734                        </xslt:when>
4735                        <xslt:otherwise>
4736                                <xslt:choose>
4737                                        <xslt:when test="$month = 1">January;Jan</xslt:when>
4738                                        <xslt:when test="$month = 2">February;Feb</xslt:when>
4739                                        <xslt:when test="$month = 3">March;Mar</xslt:when>
4740                                        <xslt:when test="$month = 4">April;Apr</xslt:when>
4741                                        <xslt:when test="$month = 5">May;May</xslt:when>
4742                                        <xslt:when test="$month = 6">June;Jun</xslt:when>
4743                                        <xslt:when test="$month = 7">July;Jul</xslt:when>
4744                                        <xslt:when test="$month = 8">August;Aug</xslt:when>
4745                                        <xslt:when test="$month = 9">September;Sep</xslt:when>
4746                                        <xslt:when test="$month = 10">October;Oct</xslt:when>
4747                                        <xslt:when test="$month = 11">November;Nov</xslt:when>
4748                                        <xslt:when test="$month = 12">December;Dec</xslt:when>
4749                                </xslt:choose>
4750                        </xslt:otherwise>
4751                </xslt:choose>
4752        </xslt:template>
4753        <xslt:template name="date:_get-day">
4754                <xslt:param name="day"/>
4755                <xslt:param name="lang-id" select="'en_US'"/>
4756                <xslt:choose>
4757                        <xslt:when test="$lang-id = 'fr_FR'">
4758                                <xslt:choose>
4759                                        <xslt:when test="$day = 1">Dimanche;Dim</xslt:when>
4760                                        <xslt:when test="$day = 2">Lundi;Lun</xslt:when>
4761                                        <xslt:when test="$day = 3">Mardi;Mar</xslt:when>
4762                                        <xslt:when test="$day = 4">Mercredi;Mer</xslt:when>
4763                                        <xslt:when test="$day = 5">Jeudi;Jeu</xslt:when>
4764                                        <xslt:when test="$day = 6">Vendredi;Ven</xslt:when>
4765                                        <xslt:when test="$day = 7">Samedi;Sam</xslt:when>
4766                                </xslt:choose>
4767                        </xslt:when>
4768                        <xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4769                                <xslt:choose>
4770                                        <xslt:when test="$day = 1">Sonntag;Son</xslt:when>
4771                                        <xslt:when test="$day = 2">Montag;Mon</xslt:when>
4772                                        <xslt:when test="$day = 3">Dienstag;Die</xslt:when>
4773                                        <xslt:when test="$day = 4">Mittwoch;Mit</xslt:when>
4774                                        <xslt:when test="$day = 5">Donnerstag;Don</xslt:when>
4775                                        <xslt:when test="$day = 6">Freitag;Fre</xslt:when>
4776                                        <xslt:when test="$day = 7">Samstag;Sam</xslt:when>
4777                                </xslt:choose>
4778                        </xslt:when>
4779                        <xslt:when test="$lang-id = 'es_ES'">
4780                                <xslt:choose>
4781                                        <xslt:when test="$day = 1">Domingo;Dom</xslt:when>
4782                                        <xslt:when test="$day = 2">Lunes;Lun</xslt:when>
4783                                        <xslt:when test="$day = 3">Martes;Mar</xslt:when>
4784                                        <xslt:when test="$day = 4">Miércoles;Mié</xslt:when>
4785                                        <xslt:when test="$day = 5">Jueves;Jue</xslt:when>
4786                                        <xslt:when test="$day = 6">Viernes;Vie</xslt:when>
4787                                        <xslt:when test="$day = 7">Sábado;Sáb</xslt:when>
4788                                </xslt:choose>
4789                        </xslt:when>
4790                        <xslt:when test="$lang-id = 'nl_NL'">
4791                                <xslt:choose>
4792                                        <xslt:when test="$day = 1">zondag;zon</xslt:when>
4793                                        <xslt:when test="$day = 2">maandag;maa</xslt:when>
4794                                        <xslt:when test="$day = 3">dinsdag;din</xslt:when>
4795                                        <xslt:when test="$day = 4">woensdag;woe</xslt:when>
4796                                        <xslt:when test="$day = 5">donderdag;don</xslt:when>
4797                                        <xslt:when test="$day = 6">vrijdag;vri</xslt:when>
4798                                        <xslt:when test="$day = 7">zaterdag;zat</xslt:when>
4799                                </xslt:choose>
4800                        </xslt:when>
4801                        <xslt:otherwise>
4802                                <xslt:choose>
4803                                        <xslt:when test="$day = 1">Sunday;Sun</xslt:when>
4804                                        <xslt:when test="$day = 2">Monday;Mon</xslt:when>
4805                                        <xslt:when test="$day = 3">Tuesday;Tue</xslt:when>
4806                                        <xslt:when test="$day = 4">Wednesday;Wed</xslt:when>
4807                                        <xslt:when test="$day = 5">Thursday;Thu</xslt:when>
4808                                        <xslt:when test="$day = 6">Friday;Fri</xslt:when>
4809                                        <xslt:when test="$day = 7">Saturday;Sat</xslt:when>
4810                                </xslt:choose>
4811                        </xslt:otherwise>
4812                </xslt:choose>
4813        </xslt:template>
4814        <xslt:template name="date:format-date">
4815                <xslt:param name="date-time"/>
4816                <xslt:param name="pattern"/>
4817                <xslt:param name="lang-id"/>
4818                <xslt:variable name="formatted">
4819                        <xslt:choose>
4820                                <xslt:when test="starts-with($date-time, '---')">
4821                                        <xslt:call-template name="date:_format-date">
4822                                                <xslt:with-param name="year" select="'NaN'"/>
4823                                                <xslt:with-param name="month" select="'NaN'"/>
4824                                                <xslt:with-param name="day" select="number(substring($date-time, 4, 2))"/>
4825                                                <xslt:with-param name="pattern" select="$pattern"/>
4826                                                <xslt:with-param name="lang-id" select="$lang-id"/>
4827                                        </xslt:call-template>
4828                                </xslt:when>
4829                                <xslt:when test="starts-with($date-time, '--')">
4830                                        <xslt:call-template name="date:_format-date">
4831                                                <xslt:with-param name="year" select="'NaN'"/>
4832                                                <xslt:with-param name="month" select="number(substring($date-time, 3, 2))"/>
4833                                                <xslt:with-param name="day" select="number(substring($date-time, 6, 2))"/>
4834                                                <xslt:with-param name="pattern" select="$pattern"/>
4835                                                <xslt:with-param name="lang-id" select="$lang-id"/>
4836                                        </xslt:call-template>
4837                                </xslt:when>
4838                                <xslt:otherwise>
4839                                        <xslt:variable name="neg" select="starts-with($date-time, '-')"/>
4840                                        <xslt:variable name="no-neg">
4841                                                <xslt:choose>
4842                                                        <xslt:when test="$neg or starts-with($date-time, '+')">
4843                                                                <xslt:value-of select="substring($date-time, 2)"/>
4844                                                        </xslt:when>
4845                                                        <xslt:otherwise>
4846                                                                <xslt:value-of select="$date-time"/>
4847                                                        </xslt:otherwise>
4848                                                </xslt:choose>
4849                                        </xslt:variable>
4850                                        <xslt:variable name="no-neg-length" select="string-length($no-neg)"/>
4851                                        <xslt:variable name="timezone">
4852                                                <xslt:choose>
4853                                                        <xslt:when test="substring($no-neg, $no-neg-length) = 'Z'">Z</xslt:when>
4854                                                        <xslt:otherwise>
4855                                                                <xslt:variable name="tz" select="substring($no-neg, $no-neg-length - 5)"/>
4856                                                                <xslt:if test="(substring($tz, 1, 1) = '-' or                                      substring($tz, 1, 1) = '+') and                                    substring($tz, 4, 1) = ':'">
4857                                                                        <xslt:value-of select="$tz"/>
4858                                                                </xslt:if>
4859                                                        </xslt:otherwise>
4860                                                </xslt:choose>
4861                                        </xslt:variable>
4862                                        <xslt:if test="not(string($timezone)) or                           $timezone = 'Z' or                            (substring($timezone, 2, 2) &lt;= 23 and                            substring($timezone, 5, 2) &lt;= 59)">
4863                                                <xslt:variable name="dt" select="substring($no-neg, 1, $no-neg-length - string-length($timezone))"/>
4864                                                <xslt:variable name="dt-length" select="string-length($dt)"/>
4865                                                <xslt:choose>
4866                                                        <xslt:when test="substring($dt, 3, 1) = ':' and                                   substring($dt, 6, 1) = ':'">
4867                                                                <xslt:variable name="hour" select="substring($dt, 1, 2)"/>
4868                                                                <xslt:variable name="min" select="substring($dt, 4, 2)"/>
4869                                                                <xslt:variable name="sec" select="substring($dt, 7)"/>
4870                                                                <xslt:if test="$hour &lt;= 23 and                                    $min &lt;= 59 and                                    $sec &lt;= 60">
4871                                                                        <xslt:call-template name="date:_format-date">
4872                                                                                <xslt:with-param name="year" select="'NaN'"/>
4873                                                                                <xslt:with-param name="month" select="'NaN'"/>
4874                                                                                <xslt:with-param name="day" select="'NaN'"/>
4875                                                                                <xslt:with-param name="hour" select="$hour"/>
4876                                                                                <xslt:with-param name="minute" select="$min"/>
4877                                                                                <xslt:with-param name="second" select="$sec"/>
4878                                                                                <xslt:with-param name="timezone" select="$timezone"/>
4879                                                                                <xslt:with-param name="pattern" select="$pattern"/>
4880                                                                                <xslt:with-param name="lang-id" select="$lang-id"/>
4881                                                                        </xslt:call-template>
4882                                                                </xslt:if>
4883                                                        </xslt:when>
4884                                                        <xslt:otherwise>
4885                                                                <xslt:variable name="year" select="substring($dt, 1, 4) * (($neg * -2) + 1)"/>
4886                                                                <xslt:choose>
4887                                                                        <xslt:when test="not(number($year))"/>
4888                                                                        <xslt:when test="$dt-length = 4">
4889                                                                                <xslt:call-template name="date:_format-date">
4890                                                                                        <xslt:with-param name="year" select="$year"/>
4891                                                                                        <xslt:with-param name="timezone" select="$timezone"/>
4892                                                                                        <xslt:with-param name="pattern" select="$pattern"/>
4893                                                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
4894                                                                                </xslt:call-template>
4895                                                                        </xslt:when>
4896                                                                        <xslt:when test="substring($dt, 5, 1) = '-'">
4897                                                                                <xslt:variable name="month" select="substring($dt, 6, 2)"/>
4898                                                                                <xslt:choose>
4899                                                                                        <xslt:when test="not($month &lt;= 12)"/>
4900                                                                                        <xslt:when test="$dt-length = 7">
4901                                                                                                <xslt:call-template name="date:_format-date">
4902                                                                                                        <xslt:with-param name="year" select="$year"/>
4903                                                                                                        <xslt:with-param name="month" select="$month"/>
4904                                                                                                        <xslt:with-param name="timezone" select="$timezone"/>
4905                                                                                                        <xslt:with-param name="pattern" select="$pattern"/>
4906                                                                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
4907                                                                                                </xslt:call-template>
4908                                                                                        </xslt:when>
4909                                                                                        <xslt:when test="substring($dt, 8, 1) = '-'">
4910                                                                                                <xslt:variable name="day" select="substring($dt, 9, 2)"/>
4911                                                                                                <xslt:if test="$day &lt;= 31">
4912                                                                                                        <xslt:choose>
4913                                                                                                                <xslt:when test="$dt-length = 10">
4914                                                                                                                        <xslt:call-template name="date:_format-date">
4915                                                                                                                                <xslt:with-param name="year" select="$year"/>
4916                                                                                                                                <xslt:with-param name="month" select="$month"/>
4917                                                                                                                                <xslt:with-param name="day" select="$day"/>
4918                                                                                                                                <xslt:with-param name="timezone" select="$timezone"/>
4919                                                                                                                                <xslt:with-param name="pattern" select="$pattern"/>
4920                                                                                                                                <xslt:with-param name="lang-id" select="$lang-id"/>
4921                                                                                                                        </xslt:call-template>
4922                                                                                                                </xslt:when>
4923                                                                                                                <xslt:when test="substring($dt, 11, 1) = 'T' and                                                        substring($dt, 14, 1) = ':' and                                                        substring($dt, 17, 1) = ':'">
4924                                                                                                                        <xslt:variable name="hour" select="substring($dt, 12, 2)"/>
4925                                                                                                                        <xslt:variable name="min" select="substring($dt, 15, 2)"/>
4926                                                                                                                        <xslt:variable name="sec" select="substring($dt, 18)"/>
4927                                                                                                                        <xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4928                                                                                                                                <xslt:call-template name="date:_format-date">
4929                                                                                                                                        <xslt:with-param name="year" select="$year"/>
4930                                                                                                                                        <xslt:with-param name="month" select="$month"/>
4931                                                                                                                                        <xslt:with-param name="day" select="$day"/>
4932                                                                                                                                        <xslt:with-param name="hour" select="$hour"/>
4933                                                                                                                                        <xslt:with-param name="minute" select="$min"/>
4934                                                                                                                                        <xslt:with-param name="second" select="$sec"/>
4935                                                                                                                                        <xslt:with-param name="timezone" select="$timezone"/>
4936                                                                                                                                        <xslt:with-param name="pattern" select="$pattern"/>
4937                                                                                                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
4938                                                                                                                                </xslt:call-template>
4939                                                                                                                        </xslt:if>
4940                                                                                                                </xslt:when>
4941                                                                                                        </xslt:choose>
4942                                                                                                </xslt:if>
4943                                                                                        </xslt:when>
4944                                                                                </xslt:choose>
4945                                                                        </xslt:when>
4946                                                                        <xslt:when test="string(number(substring($dt,5,1)))!='NaN'">
4947                                                                                <xslt:variable name="month" select="substring($dt, 5, 2)"/>
4948                                                                                <xslt:choose>
4949                                                                                        <xslt:when test="not($month &lt;= 12)"/>
4950                                                                                        <xslt:when test="$dt-length = 6">
4951                                                                                                <xslt:call-template name="date:_format-date">
4952                                                                                                        <xslt:with-param name="year" select="$year"/>
4953                                                                                                        <xslt:with-param name="month" select="$month"/>
4954                                                                                                        <xslt:with-param name="timezone" select="$timezone"/>
4955                                                                                                        <xslt:with-param name="pattern" select="$pattern"/>
4956                                                                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
4957                                                                                                </xslt:call-template>
4958                                                                                        </xslt:when>
4959                                                                                        <xslt:otherwise>
4960                                                                                                <xslt:variable name="day" select="substring($dt, 7, 2)"/>
4961                                                                                                <xslt:if test="$day &lt;= 31">
4962                                                                                                        <xslt:choose>
4963                                                                                                                <xslt:when test="$dt-length = 8">
4964                                                                                                                        <xslt:call-template name="date:_format-date">
4965                                                                                                                                <xslt:with-param name="year" select="$year"/>
4966                                                                                                                                <xslt:with-param name="month" select="$month"/>
4967                                                                                                                                <xslt:with-param name="day" select="$day"/>
4968                                                                                                                                <xslt:with-param name="timezone" select="$timezone"/>
4969                                                                                                                                <xslt:with-param name="pattern" select="$pattern"/>
4970                                                                                                                                <xslt:with-param name="lang-id" select="$lang-id"/>
4971                                                                                                                        </xslt:call-template>
4972                                                                                                                </xslt:when>
4973                                                                                                                <xslt:when test="substring($dt, 9, 1) = 'T' and  substring($dt, 12, 1) = ':' and  substring($dt, 15, 1) = ':'">
4974                                                                                                                        <xslt:variable name="hour" select="substring($dt, 10, 2)"/>
4975                                                                                                                        <xslt:variable name="min" select="substring($dt, 13, 2)"/>
4976                                                                                                                        <xslt:variable name="sec" select="substring($dt, 16)"/>
4977                                                                                                                        <xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4978                                                                                                                                <xslt:call-template name="date:_format-date">
4979                                                                                                                                        <xslt:with-param name="year" select="$year"/>
4980                                                                                                                                        <xslt:with-param name="month" select="$month"/>
4981                                                                                                                                        <xslt:with-param name="day" select="$day"/>
4982                                                                                                                                        <xslt:with-param name="hour" select="$hour"/>
4983                                                                                                                                        <xslt:with-param name="minute" select="$min"/>
4984                                                                                                                                        <xslt:with-param name="second" select="$sec"/>
4985                                                                                                                                        <xslt:with-param name="timezone" select="$timezone"/>
4986                                                                                                                                        <xslt:with-param name="pattern" select="$pattern"/>
4987                                                                                                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
4988                                                                                                                                </xslt:call-template>
4989                                                                                                                        </xslt:if>
4990                                                                                                                </xslt:when>
4991                                                                                                        </xslt:choose>
4992                                                                                                </xslt:if>
4993                                                                                        </xslt:otherwise>
4994                                                                                </xslt:choose>
4995                                                                        </xslt:when>
4996                                                                </xslt:choose>
4997                                                        </xslt:otherwise>
4998                                                </xslt:choose>
4999                                        </xslt:if>
5000                                </xslt:otherwise>
5001                        </xslt:choose>
5002                </xslt:variable>
5003                <xslt:value-of select="$formatted"/>
5004        </xslt:template>
5005        <xslt:template name="date:_format-date">
5006                <xslt:param name="year"/>
5007                <xslt:param name="month" select="1"/>
5008                <xslt:param name="day" select="1"/>
5009                <xslt:param name="hour" select="0"/>
5010                <xslt:param name="minute" select="0"/>
5011                <xslt:param name="second" select="0"/>
5012                <xslt:param name="timezone" select="'Z'"/>
5013                <xslt:param name="pattern" select="''"/>
5014                <xslt:param name="lang-id" select="'en_US'"/>
5015                <xslt:variable name="char" select="substring($pattern, 1, 1)"/>
5016                <xslt:choose>
5017                        <xslt:when test="not($pattern)"/>
5018                        <xslt:when test="$char = &quot;'&quot;">
5019                                <xslt:choose>
5020                                        <xslt:when test="substring($pattern, 2, 1) = &quot;'&quot;">
5021                                                <xslt:text>'</xslt:text>
5022                                                <xslt:call-template name="date:_format-date">
5023                                                        <xslt:with-param name="year" select="$year"/>
5024                                                        <xslt:with-param name="month" select="$month"/>
5025                                                        <xslt:with-param name="day" select="$day"/>
5026                                                        <xslt:with-param name="hour" select="$hour"/>
5027                                                        <xslt:with-param name="minute" select="$minute"/>
5028                                                        <xslt:with-param name="second" select="$second"/>
5029                                                        <xslt:with-param name="timezone" select="$timezone"/>
5030                                                        <xslt:with-param name="pattern" select="substring($pattern, 3)"/>
5031                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
5032                                                </xslt:call-template>
5033                                        </xslt:when>
5034                                        <xslt:otherwise>
5035                                                <xslt:variable name="literal-value" select="substring-before(substring($pattern, 2), &quot;'&quot;)"/>
5036                                                <xslt:value-of select="$literal-value"/>
5037                                                <xslt:call-template name="date:_format-date">
5038                                                        <xslt:with-param name="year" select="$year"/>
5039                                                        <xslt:with-param name="month" select="$month"/>
5040                                                        <xslt:with-param name="day" select="$day"/>
5041                                                        <xslt:with-param name="hour" select="$hour"/>
5042                                                        <xslt:with-param name="minute" select="$minute"/>
5043                                                        <xslt:with-param name="second" select="$second"/>
5044                                                        <xslt:with-param name="timezone" select="$timezone"/>
5045                                                        <xslt:with-param name="pattern" select="substring($pattern, string-length($literal-value) + 2)"/>
5046                                                        <xslt:with-param name="lang-id" select="$lang-id"/>
5047                                                </xslt:call-template>
5048                                        </xslt:otherwise>
5049                                </xslt:choose>
5050                        </xslt:when>
5051                        <xslt:when test="not(contains('abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $char))">
5052                                <xslt:value-of select="$char"/>
5053                                <xslt:call-template name="date:_format-date">
5054                                        <xslt:with-param name="year" select="$year"/>
5055                                        <xslt:with-param name="month" select="$month"/>
5056                                        <xslt:with-param name="day" select="$day"/>
5057                                        <xslt:with-param name="hour" select="$hour"/>
5058                                        <xslt:with-param name="minute" select="$minute"/>
5059                                        <xslt:with-param name="second" select="$second"/>
5060                                        <xslt:with-param name="timezone" select="$timezone"/>
5061                                        <xslt:with-param name="pattern" select="substring($pattern, 2)"/>
5062                                        <xslt:with-param name="lang-id" select="$lang-id"/>
5063                                </xslt:call-template>
5064                        </xslt:when>
5065                        <xslt:when test="not(contains('GyMdhHmsSEDFwWakKz', $char))">
5066                                <xslt:message>
5067              Invalid token in format string: <xslt:value-of select="$char"/>
5068                                </xslt:message>
5069                                <xslt:call-template name="date:_format-date">
5070                                        <xslt:with-param name="year" select="$year"/>
5071                                        <xslt:with-param name="month" select="$month"/>
5072                                        <xslt:with-param name="day" select="$day"/>
5073                                        <xslt:with-param name="hour" select="$hour"/>
5074                                        <xslt:with-param name="minute" select="$minute"/>
5075                                        <xslt:with-param name="second" select="$second"/>
5076                                        <xslt:with-param name="timezone" select="$timezone"/>
5077                                        <xslt:with-param name="pattern" select="substring($pattern, 2)"/>
5078                                        <xslt:with-param name="lang-id" select="$lang-id"/>
5079                                </xslt:call-template>
5080                        </xslt:when>
5081                        <xslt:otherwise>
5082                                <xslt:variable name="next-different-char" select="substring(translate($pattern, $char, ''), 1, 1)"/>
5083                                <xslt:variable name="pattern-length">
5084                                        <xslt:choose>
5085                                                <xslt:when test="$next-different-char">
5086                                                        <xslt:value-of select="string-length(substring-before($pattern, $next-different-char))"/>
5087                                                </xslt:when>
5088                                                <xslt:otherwise>
5089                                                        <xslt:value-of select="string-length($pattern)"/>
5090                                                </xslt:otherwise>
5091                                        </xslt:choose>
5092                                </xslt:variable>
5093                                <xslt:choose>
5094                                        <xslt:when test="$char = 'G'">
5095                                                <xslt:choose>
5096                                                        <xslt:when test="string($year) = 'NaN'"/>
5097                                                        <xslt:when test="$year &gt; 0">AD</xslt:when>
5098                                                        <xslt:otherwise>BC</xslt:otherwise>
5099                                                </xslt:choose>
5100                                        </xslt:when>
5101                                        <xslt:when test="$char = 'M'">
5102                                                <xslt:choose>
5103                                                        <xslt:when test="string($month) = 'NaN'"/>
5104                                                        <xslt:when test="$pattern-length &gt;= 3">
5105                                                                <xslt:variable name="month-node">
5106                                                                        <xslt:call-template name="date:_get-month">
5107                                                                                <xslt:with-param name="month" select="number($month)"/>
5108                                                                                <xslt:with-param name="lang-id" select="$lang-id"/>
5109                                                                        </xslt:call-template>
5110                                                                </xslt:variable>
5111                                                                <xslt:choose>
5112                                                                        <xslt:when test="$pattern-length &gt;= 4">
5113                                                                                <xslt:value-of select="substring-before(normalize-space($month-node), ';')"/>
5114                                                                        </xslt:when>
5115                                                                        <xslt:otherwise>
5116                                                                                <xslt:value-of select="substring-after(normalize-space($month-node), ';')"/>
5117                                                                        </xslt:otherwise>
5118                                                                </xslt:choose>
5119                                                        </xslt:when>
5120                                                        <xslt:when test="$pattern-length = 2">
5121                                                                <xslt:value-of select="format-number($month, '00')"/>
5122                                                        </xslt:when>
5123                                                        <xslt:when test="$pattern-length = 1">
5124                                                                <xslt:value-of select="format-number($month, '0')"/>
5125                                                        </xslt:when>
5126                                                        <xslt:otherwise>
5127                                                                <xslt:value-of select="$month"/>
5128                                                        </xslt:otherwise>
5129                                                </xslt:choose>
5130                                        </xslt:when>
5131                                        <xslt:when test="$char = 'E'">
5132                                                <xslt:choose>
5133                                                        <xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
5134                                                        <xslt:otherwise>
5135                                                                <xslt:variable name="month-days">
5136                                                                        <xslt:call-template name="date:_get-days-elapsed">
5137                                                                                <xslt:with-param name="month" select="number($month)"/>
5138                                                                        </xslt:call-template>
5139                                                                </xslt:variable>
5140                                                                <xslt:variable name="days" select="number($month-days) + $day + boolean(((not($year mod 4) and $year mod 100) or not($year mod 400)) and $month &gt; 2)"/>
5141                                                                <xslt:variable name="y-1" select="$year - 1"/>
5142                                                                <xslt:variable name="dow" select="(($y-1 + floor($y-1 div 4) -                                              floor($y-1 div 100) + floor($y-1 div 400) +                                              $days)                                              mod 7) + 1"/>
5143                                                                <xslt:variable name="day-node">
5144                                                                        <xslt:call-template name="date:_get-day">
5145                                                                                <xslt:with-param name="day" select="number($dow)"/>
5146                                                                                <xslt:with-param name="lang-id" select="$lang-id"/>
5147                                                                        </xslt:call-template>
5148                                                                </xslt:variable>
5149                                                                <xslt:choose>
5150                                                                        <xslt:when test="$pattern-length &gt;= 4">
5151                                                                                <xslt:value-of select="substring-before(normalize-space($day-node),';')"/>
5152                                                                        </xslt:when>
5153                                                                        <xslt:otherwise>
5154                                                                                <xslt:value-of select="substring-after(normalize-space($day-node),';')"/>
5155                                                                        </xslt:otherwise>
5156                                                                </xslt:choose>
5157                                                        </xslt:otherwise>
5158                                                </xslt:choose>
5159                                        </xslt:when>
5160                                        <xslt:when test="$char = 'a'">
5161                                                <xslt:choose>
5162                                                        <xslt:when test="string($hour) = 'NaN'"/>
5163                                                        <xslt:when test="$hour &gt;= 12">PM</xslt:when>
5164                                                        <xslt:otherwise>AM</xslt:otherwise>
5165                                                </xslt:choose>
5166                                        </xslt:when>
5167                                        <xslt:when test="$char = 'z'">
5168                                                <xslt:choose>
5169                                                        <xslt:when test="$timezone = 'Z'">UTC</xslt:when>
5170                                                        <xslt:otherwise>
5171                    UTC<xslt:value-of select="$timezone"/>
5172                                                        </xslt:otherwise>
5173                                                </xslt:choose>
5174                                        </xslt:when>
5175                                        <xslt:otherwise>
5176                                                <xslt:variable name="padding">
5177                                                        <xslt:choose>
5178                                                                <xslt:when test="$pattern-length &gt; 10">
5179                                                                        <xslt:call-template name="str:padding">
5180                                                                                <xslt:with-param name="length" select="$pattern-length"/>
5181                                                                                <xslt:with-param name="chars" select="'0'"/>
5182                                                                        </xslt:call-template>
5183                                                                </xslt:when>
5184                                                                <xslt:otherwise>
5185                                                                        <xslt:value-of select="substring('0000000000', 1, $pattern-length)"/>
5186                                                                </xslt:otherwise>
5187                                                        </xslt:choose>
5188                                                </xslt:variable>
5189                                                <xslt:choose>
5190                                                        <xslt:when test="$char = 'y'">
5191                                                                <xslt:choose>
5192                                                                        <xslt:when test="string($year) = 'NaN'"/>
5193                                                                        <xslt:when test="$pattern-length &gt; 2">
5194                                                                                <xslt:value-of select="format-number($year, $padding)"/>
5195                                                                        </xslt:when>
5196                                                                        <xslt:otherwise>
5197                                                                                <xslt:value-of select="format-number(substring($year, string-length($year) - 1), $padding)"/>
5198                                                                        </xslt:otherwise>
5199                                                                </xslt:choose>
5200                                                        </xslt:when>
5201                                                        <xslt:when test="$char = 'd'">
5202                                                                <xslt:choose>
5203                                                                        <xslt:when test="string($day) = 'NaN'"/>
5204                                                                        <xslt:otherwise>
5205                                                                                <xslt:value-of select="format-number($day, $padding)"/>
5206                                                                        </xslt:otherwise>
5207                                                                </xslt:choose>
5208                                                        </xslt:when>
5209                                                        <xslt:when test="$char = 'h'">
5210                                                                <xslt:variable name="h" select="$hour mod 12"/>
5211                                                                <xslt:choose>
5212                                                                        <xslt:when test="string($hour) = 'NaN'"/>
5213                                                                        <xslt:when test="$h">
5214                                                                                <xslt:value-of select="format-number($h, $padding)"/>
5215                                                                        </xslt:when>
5216                                                                        <xslt:otherwise>
5217                                                                                <xslt:value-of select="format-number(12, $padding)"/>
5218                                                                        </xslt:otherwise>
5219                                                                </xslt:choose>
5220                                                        </xslt:when>
5221                                                        <xslt:when test="$char = 'H'">
5222                                                                <xslt:choose>
5223                                                                        <xslt:when test="string($hour) = 'NaN'"/>
5224                                                                        <xslt:otherwise>
5225                                                                                <xslt:value-of select="format-number($hour, $padding)"/>
5226                                                                        </xslt:otherwise>
5227                                                                </xslt:choose>
5228                                                        </xslt:when>
5229                                                        <xslt:when test="$char = 'k'">
5230                                                                <xslt:choose>
5231                                                                        <xslt:when test="string($hour) = 'NaN'"/>
5232                                                                        <xslt:when test="$hour">
5233                                                                                <xslt:value-of select="format-number($hour, $padding)"/>
5234                                                                        </xslt:when>
5235                                                                        <xslt:otherwise>
5236                                                                                <xslt:value-of select="format-number(24, $padding)"/>
5237                                                                        </xslt:otherwise>
5238                                                                </xslt:choose>
5239                                                        </xslt:when>
5240                                                        <xslt:when test="$char = 'K'">
5241                                                                <xslt:choose>
5242                                                                        <xslt:when test="string($hour) = 'NaN'"/>
5243                                                                        <xslt:otherwise>
5244                                                                                <xslt:value-of select="format-number($hour mod 12, $padding)"/>
5245                                                                        </xslt:otherwise>
5246                                                                </xslt:choose>
5247                                                        </xslt:when>
5248                                                        <xslt:when test="$char = 'm'">
5249                                                                <xslt:choose>
5250                                                                        <xslt:when test="string($minute) = 'NaN'"/>
5251                                                                        <xslt:otherwise>
5252                                                                                <xslt:value-of select="format-number($minute, $padding)"/>
5253                                                                        </xslt:otherwise>
5254                                                                </xslt:choose>
5255                                                        </xslt:when>
5256                                                        <xslt:when test="$char = 's'">
5257                                                                <xslt:choose>
5258                                                                        <xslt:when test="string($second) = 'NaN'"/>
5259                                                                        <xslt:otherwise>
5260                                                                                <xslt:value-of select="format-number($second, $padding)"/>
5261                                                                        </xslt:otherwise>
5262                                                                </xslt:choose>
5263                                                        </xslt:when>
5264                                                        <xslt:when test="$char = 'S'">
5265                                                                <xslt:choose>
5266                                                                        <xslt:when test="string($second) = 'NaN'"/>
5267                                                                        <xslt:otherwise>
5268                                                                                <xslt:value-of select="format-number(substring-after($second, '.'), $padding)"/>
5269                                                                        </xslt:otherwise>
5270                                                                </xslt:choose>
5271                                                        </xslt:when>
5272                                                        <xslt:when test="$char = 'F'">
5273                                                                <xslt:choose>
5274                                                                        <xslt:when test="string($day) = 'NaN'"/>
5275                                                                        <xslt:otherwise>
5276                                                                                <xslt:value-of select="floor($day div 7) + 1"/>
5277                                                                        </xslt:otherwise>
5278                                                                </xslt:choose>
5279                                                        </xslt:when>
5280                                                        <xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
5281                                                        <xslt:otherwise>
5282                                                                <xslt:variable name="month-days">
5283                                                                        <xslt:call-template name="date:_get-days-elapsed">
5284                                                                                <xslt:with-param name="month" select="number($month)"/>
5285                                                                        </xslt:call-template>
5286                                                                </xslt:variable>
5287                                                                <xslt:variable name="days" select="number($month-days) + $day + boolean(((not($year mod 4) and $year mod 100) or not($year mod 400)) and $month &gt; 2)"/>
5288                                                                <xslt:choose>
5289                                                                        <xslt:when test="$char = 'D'">
5290                                                                                <xslt:value-of select="format-number($days, $padding)"/>
5291                                                                        </xslt:when>
5292                                                                        <xslt:when test="$char = 'w'">
5293                                                                                <xslt:call-template name="date:_week-in-year">
5294                                                                                        <xslt:with-param name="days" select="$days"/>
5295                                                                                        <xslt:with-param name="year" select="$year"/>
5296                                                                                </xslt:call-template>
5297                                                                        </xslt:when>
5298                                                                        <xslt:when test="$char = 'W'">
5299                                                                                <xslt:variable name="y-1" select="$year - 1"/>
5300                                                                                <xslt:variable name="day-of-week" select="(($y-1 + floor($y-1 div 4) -                                                   floor($y-1 div 100) + floor($y-1 div 400) +                                                   $days)                                                    mod 7) + 1"/>
5301                                                                                <xslt:choose>
5302                                                                                        <xslt:when test="($day - $day-of-week) mod 7">
5303                                                                                                <xslt:value-of select="floor(($day - $day-of-week) div 7) + 2"/>
5304                                                                                        </xslt:when>
5305                                                                                        <xslt:otherwise>
5306                                                                                                <xslt:value-of select="floor(($day - $day-of-week) div 7) + 1"/>
5307                                                                                        </xslt:otherwise>
5308                                                                                </xslt:choose>
5309                                                                        </xslt:when>
5310                                                                </xslt:choose>
5311                                                        </xslt:otherwise>
5312                                                </xslt:choose>
5313                                        </xslt:otherwise>
5314                                </xslt:choose>
5315                                <xslt:call-template name="date:_format-date">
5316                                        <xslt:with-param name="year" select="$year"/>
5317                                        <xslt:with-param name="month" select="$month"/>
5318                                        <xslt:with-param name="day" select="$day"/>
5319                                        <xslt:with-param name="hour" select="$hour"/>
5320                                        <xslt:with-param name="minute" select="$minute"/>
5321                                        <xslt:with-param name="second" select="$second"/>
5322                                        <xslt:with-param name="timezone" select="$timezone"/>
5323                                        <xslt:with-param name="pattern" select="substring($pattern, $pattern-length + 1)"/>
5324                                        <xslt:with-param name="lang-id" select="$lang-id"/>
5325                                </xslt:call-template>
5326                        </xslt:otherwise>
5327                </xslt:choose>
5328        </xslt:template>
5329        <xslt:template name="date:_week-in-year">
5330                <xslt:param name="days"/>
5331                <xslt:param name="year"/>
5332                <xslt:variable name="y-1" select="$year - 1"/>
5333                <xslt:variable name="day-of-week" select="($y-1 + floor($y-1 div 4) -                           floor($y-1 div 100) + floor($y-1 div 400) +                           $days)                           mod 7"/>
5334                <xslt:variable name="dow">
5335                        <xslt:choose>
5336                                <xslt:when test="$day-of-week">
5337                                        <xslt:value-of select="$day-of-week"/>
5338                                </xslt:when>
5339                                <xslt:otherwise>7</xslt:otherwise>
5340                        </xslt:choose>
5341                </xslt:variable>
5342                <xslt:variable name="start-day" select="($days - $dow + 7) mod 7"/>
5343                <xslt:variable name="week-number" select="floor(($days - $dow + 7) div 7)"/>
5344                <xslt:choose>
5345                        <xslt:when test="$start-day &gt;= 4">
5346                                <xslt:value-of select="$week-number + 1"/>
5347                        </xslt:when>
5348                        <xslt:otherwise>
5349                                <xslt:choose>
5350                                        <xslt:when test="not($week-number)">
5351                                                <xslt:call-template name="date:_week-in-year">
5352                                                        <xslt:with-param name="days" select="365 + ((not($y-1 mod 4) and $y-1 mod 100) or not($y-1 mod 400))"/>
5353                                                        <xslt:with-param name="year" select="$y-1"/>
5354                                                </xslt:call-template>
5355                                        </xslt:when>
5356                                        <xslt:otherwise>
5357                                                <xslt:value-of select="$week-number"/>
5358                                        </xslt:otherwise>
5359                                </xslt:choose>
5360                        </xslt:otherwise>
5361                </xslt:choose>
5362        </xslt:template>
5363        <!-- ========================= END OF STYLESHEET ========================= -->
5364</xslt:stylesheet>
Note: See TracBrowser for help on using the browser.