root / projects / DailyDrillingReport_1.2 / XML / PDFreport / ddr_HTMLReport_transformation_2011_03_09.xsl @ 156

Revision 152, 205.1 kB (checked in by yaolu, 13 years ago)

fixed some of the changes regarding xsl and the report view

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