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

Revision 173, 209.2 kB (checked in by yaolu, 13 years ago)

Fixed some spacing errors. added a bit more space before the cement fluid info section

Line 
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<xslt:stylesheet xmlns:date="http://exslt.org/dates-and-times" xmlns:str="http://exslt.org/strings" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0" xmlns:xc="http://www.ecrion.com/2008/xc" xmlns:xfd="http://www.ecrion.com/xfd/1.0" xmlns:svg="http://www.w3.org/2000/svg" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:witsml="http://www.witsml.org/schemas/1series" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" extension-element-prefixes="date str">
3<xslt:output indent="yes" encoding="utf-8"/>
4<xslt:param name="XFCrtLocalDate">2011-04-06</xslt:param>
5<xslt:param name="XFCrtLocalTime">14:08:03</xslt:param>
6<xslt:param name="XFCrtLocalDateTime">2011-04-06T14:08:03</xslt:param>
7<xslt:param name="XFCrtUTCDate">2011-04-06</xslt:param>
8<xslt:param name="XFCrtUTCTime">12:08:03</xslt:param>
9<xslt:param name="XFCrtUTCDateTime">2011-04-06T12:08:03</xslt:param>
10<xslt:param name="XFOutputFormat"/>
11<!--
12                This stylesheet was generated for a 'en_US' Translation ID.
13                The Translation ID applies to both the whole text in a document and the locale-long and locale-short date formats.
14          -->
15<!-- ============================ GROUPING KEYS =============================== -->
16<!-- ============================ RAW XSL =============================== -->
17<!-- =========================== SCRIPTS ================================ -->
18<!-- ========================= ROOT TEMPLATE =========================== -->
19<xsl:template match="/">
20<fo:root>
21<fo:layout-master-set>
22                <fo:simple-page-master master-name="Letter Page" page-width="30cm" page-height="20cm">
23                        <fo:region-body region-name="xsl-region-body" margin="67.200px"/>
24                        <fo:region-before region-name="xsl-region-before" display-align="after" extent="67.200px"/>
25                        <fo:region-after region-name="xsl-region-after" display-align="before" extent="67.200px"/>
26                        <fo:region-start region-name="xsl-region-start" extent="67.200px"/>
27                        <fo:region-end region-name="xsl-region-end" extent="67.200px"/>
28                </fo:simple-page-master>
29        </fo:layout-master-set>
30<fo:page-sequence master-reference="Letter Page">
31                <fo:flow flow-name="xsl-region-body" font-family="Times" font-size="11pt">
32                        <xsl:variable name="ddrSchema">
33                                <xsl:value-of select="'..\HTMLreport\WITSML_drillReport_profiled_schema_2011_01_29.xsd'"/>
34                        </xsl:variable>
35                        <xsl:variable name="element_objDrillReport_sequence" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='obj_drillReport']/xsd:sequence/xsd:sequence"/>
36                        <xsl:variable name="element_drillReportWellboreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellboreInfo']/xsd:sequence"/>
37                        <xsl:variable name="element_drillReportStatusInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStatusInfo']/xsd:sequence"/>
38                        <xsl:variable name="urlRDS">
39                                <xsl:value-of select="'http://www.posccaesar.org'"/>
40                        </xsl:variable>
41<xslt:comment> Report header </xslt:comment>
42                        <fo:block>
43                                <fo:table margin-top="-5.200px" table-layout="fixed" width="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' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='1'">yes</xsl:if>
315                                                                        <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='false' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:tightWell='0'">no</xsl:if>
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' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='1'">yes</xsl:if>
324                                                                        <xsl:if test="/witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='false' or /witsml:drillReports/witsml:drillReport/witsml:statusInfo/witsml:hpht='0'">no</xsl:if>
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(6)" column-number="1"/>
652                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="2"/>
653                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="3"/>
654                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="4"/>
655                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="5"/>
656                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
657                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
658                                                                                <fo:table-column column-width="proportional-column-width(50)" 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(12)" column-number="1"/>
815                                                                                <fo:table-column column-width="proportional-column-width(6)" column-number="2"/>
816                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="3"/>
817                                                                                <fo:table-column column-width="proportional-column-width(7)" column-number="4"/>
818                                                                                <fo:table-column column-width="proportional-column-width(14)" column-number="5"/>
819                                                                                <fo:table-column column-width="proportional-column-width(46)" 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(6.384)" 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(6.692)" column-number="5"/>
952                                                                                                <fo:table-column column-width="proportional-column-width(6.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(11)" 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>Hole made (run)</fo:block>
1008                                                                                                        <fo:block>
1009                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom)"><fo:inline>
1010<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
1011</fo:inline></xsl:if>
1012                                                                                                        </fo:block>
1013                                                                                                </fo:table-cell>
1014                                                                                                <fo:table-cell>
1015                                                                                                        <fo:block>Hours drilled (run)</fo:block>
1016                                                                                                        <fo:block>
1017                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom)"><fo:inline>
1018<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop/@uom"/>
1019</fo:inline></xsl:if>
1020                                                                                                        </fo:block>
1021                                                                                                </fo:table-cell>
1022                                                                                                <fo:table-cell>
1023                                                                                                        <fo:block>ROP</fo:block>
1024                                                                                                        <fo:block>
1025                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom)"><fo:inline>
1026<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropAv/@uom"/>
1027</fo:inline></xsl:if>
1028                                                                                                        </fo:block>
1029                                                                                                </fo:table-cell>
1030                                                                                                <fo:table-cell>
1031                                                                                                        <fo:block>Total hole made</fo:block>
1032                                                                                                        <fo:block>
1033                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom)"><fo:inline>
1034<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdTotHoleMade/@uom"/>
1035</fo:inline></xsl:if>
1036                                                                                                        </fo:block>
1037                                                                                                </fo:table-cell>
1038                                                                                                <fo:table-cell>
1039                                                                                                        <fo:block>Total hours drilled</fo:block>
1040                                                                                                        <fo:block>
1041                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom)"><fo:inline>
1042<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:totHrsDrilled/@uom"/>
1043</fo:inline></xsl:if>
1044                                                                                                        </fo:block>
1045                                                                                                </fo:table-cell>
1046                                                                                                <fo:table-cell>
1047                                                                                                        <fo:block>Total ROP</fo:block>
1048                                                                                                        <fo:block>
1049                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom)"><fo:inline>
1050<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:ropMx/@uom"/>
1051</fo:inline></xsl:if>
1052                                                                                                        </fo:block>
1053                                                                                                </fo:table-cell>
1054                                                                                                <fo:table-cell>
1055                                                                                                        <fo:block>Dull grade</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:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart)"><fo:inline>
1105<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStop - /witsml:drillReports/witsml:drillReport/witsml:bitRecord/witsml:bitRun/witsml:mdHoleStart"/>
1106</fo:inline></xsl:if>
1107                                                                                                        </fo:block>
1108                                                                                                </fo:table-cell>
1109                                                                                                <fo:table-cell>
1110                                                                                                        <fo:block>
1111                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:eTimOpBit)"><fo:inline>
1112<xsl:value-of select="witsml:bitRun/witsml:eTimOpBit"/>
1113</fo:inline></xsl:if>
1114                                                                                                        </fo:block>
1115                                                                                                </fo:table-cell>
1116                                                                                                <fo:table-cell>
1117                                                                                                        <fo:block>
1118                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:ropAv)"><fo:inline>
1119<xsl:value-of select="witsml:bitRun/witsml:ropAv"/>
1120</fo:inline></xsl:if>
1121                                                                                                        </fo:block>
1122                                                                                                </fo:table-cell>
1123                                                                                                <fo:table-cell>
1124                                                                                                        <fo:block>
1125                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:mdTotHoleMade)"><fo:inline>
1126<xsl:value-of select="witsml:bitRun/witsml:mdTotHoleMade"/>
1127</fo:inline></xsl:if>
1128                                                                                                        </fo:block>
1129                                                                                                </fo:table-cell>
1130                                                                                                <fo:table-cell>
1131                                                                                                        <fo:block>
1132                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:totHrsDrilled)"><fo:inline>
1133<xsl:value-of select="witsml:bitRun/witsml:totHrsDrilled"/>
1134</fo:inline></xsl:if>
1135                                                                                                        </fo:block>
1136                                                                                                </fo:table-cell>
1137                                                                                                <fo:table-cell>
1138                                                                                                        <fo:block>
1139                                                                                                                <xsl:if test="string(witsml:bitRun/witsml:ropMx)"><fo:inline>
1140<xsl:value-of select="witsml:bitRun/witsml:ropMx"/>
1141</fo:inline></xsl:if>
1142                                                                                                        </fo:block>
1143                                                                                                </fo:table-cell>
1144                                                                                                <fo:table-cell>
1145                                                                                                        <fo:block>
1146                                                                                                                <xsl:if test="string(witsml:dullGrade)"><fo:inline>
1147<xsl:value-of select="witsml:dullGrade"/>
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>Nominal outside diameter</fo:block>
1208                                                                                                        <fo:block>
1209                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:od/@uom)"><fo:inline>
1210<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:od/@uom"/>
1211</fo:inline></xsl:if>
1212                                                                                                        </fo:block>
1213                                                                                                </fo:table-cell>
1214                                                                                                <fo:table-cell>
1215                                                                                                        <fo:block>Nominal inside diameter</fo:block>
1216                                                                                                        <fo:block>
1217                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:id/@uom)"><fo:inline>
1218<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:id/@uom"/>
1219</fo:inline></xsl:if>
1220                                                                                                        </fo:block>
1221                                                                                                </fo:table-cell>
1222                                                                                                <fo:table-cell>
1223                                                                                                        <fo:block>Nominal Weight</fo:block>
1224                                                                                                        <fo:block>
1225                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:weight/@uom)"><fo:inline>
1226<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:weight/@uom"/>
1227</fo:inline></xsl:if>
1228                                                                                                        </fo:block>
1229                                                                                                </fo:table-cell>
1230                                                                                                <fo:table-cell>
1231                                                                                                        <fo:block>Nominal Grade</fo:block>
1232                                                                                                </fo:table-cell>
1233                                                                                                <fo:table-cell>
1234                                                                                                        <fo:block>Nominal Connection</fo:block>
1235                                                                                                </fo:table-cell>
1236                                                                                                <fo:table-cell>
1237                                                                                                        <fo:block>Length</fo:block>
1238                                                                                                        <fo:block>
1239                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom)"><fo:inline>
1240<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom"/>
1241</fo:inline></xsl:if>
1242                                                                                                        </fo:block>
1243                                                                                                </fo:table-cell>
1244                                                                                                <fo:table-cell>
1245                                                                                                        <fo:block>MD Top/Hangar</fo:block>
1246                                                                                                        <fo:block>
1247                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom)"><fo:inline>
1248<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdTop/@uom"/>
1249</fo:inline></xsl:if>
1250                                                                                                        </fo:block>
1251                                                                                                </fo:table-cell>
1252                                                                                                <fo:table-cell>
1253                                                                                                        <fo:block>MD Bottom/Shoe</fo:block>
1254                                                                                                        <fo:block>
1255                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdBottom/@uom)"><fo:inline>
1256<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:casing_liner_tubing/witsml:mdBottom/@uom"/>
1257</fo:inline></xsl:if>
1258                                                                                                        </fo:block>
1259                                                                                                </fo:table-cell>
1260                                                                                                <fo:table-cell>
1261                                                                                                        <fo:block>Description</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:if test="string(witsml:casing_liner_tubing_run/witsml:tubularJobType)"><fo:inline>
1278<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:tubularJobType"/>
1279</fo:inline></xsl:if>
1280                                                                                                        </fo:block>
1281                                                                                                </fo:table-cell>
1282                                                                                                <fo:table-cell>
1283                                                                                                        <fo:block>
1284                                                                                                                <xsl:if test="string(substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T'))"><fo:inline>
1285<xsl:value-of select="substring-after(substring(witsml:casing_liner_tubing_run/witsml:dTimEnd, 0, 17), 'T')"/>
1286</fo:inline></xsl:if>
1287                                                                                                        </fo:block>
1288                                                                                                </fo:table-cell>
1289                                                                                                <fo:table-cell>
1290                                                                                                        <fo:block>
1291                                                                                                                <xsl:if test="string(witsml:od)"><fo:inline>
1292<xsl:value-of select="witsml:od"/>
1293</fo:inline></xsl:if>
1294                                                                                                        </fo:block>
1295                                                                                                </fo:table-cell>
1296                                                                                                <fo:table-cell>
1297                                                                                                        <fo:block>
1298                                                                                                                <xsl:if test="string(witsml:id)"><fo:inline>
1299<xsl:value-of select="witsml:id"/>
1300</fo:inline></xsl:if>
1301                                                                                                        </fo:block>
1302                                                                                                </fo:table-cell>
1303                                                                                                <fo:table-cell>
1304                                                                                                        <fo:block>
1305                                                                                                                <xsl:if test="string(witsml:weight)"><fo:inline>
1306<xsl:value-of select="witsml:weight"/>
1307</fo:inline></xsl:if>
1308                                                                                                        </fo:block>
1309                                                                                                </fo:table-cell>
1310                                                                                                <fo:table-cell>
1311                                                                                                        <fo:block>
1312                                                                                                                <xsl:if test="string(witsml:grade)"><fo:inline>
1313<xsl:value-of select="witsml:grade"/>
1314</fo:inline></xsl:if>
1315                                                                                                        </fo:block>
1316                                                                                                </fo:table-cell>
1317                                                                                                <fo:table-cell>
1318                                                                                                        <fo:block>
1319                                                                                                                <xsl:if test="string(witsml:connection)"><fo:inline>
1320<xsl:value-of select="witsml:connection"/>
1321</fo:inline></xsl:if>
1322                                                                                                        </fo:block>
1323                                                                                                </fo:table-cell>
1324                                                                                                <fo:table-cell>
1325                                                                                                        <fo:block>
1326                                                                                                                <xsl:if test="string(witsml:mdBottom - witsml:mdTop)"><fo:inline>
1327<xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
1328</fo:inline></xsl:if>
1329                                                                                                        </fo:block>
1330                                                                                                </fo:table-cell>
1331                                                                                                <fo:table-cell>
1332                                                                                                        <fo:block>
1333                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
1334<xsl:value-of select="witsml:mdTop"/>
1335</fo:inline></xsl:if>
1336                                                                                                        </fo:block>
1337                                                                                                </fo:table-cell>
1338                                                                                                <fo:table-cell>
1339                                                                                                        <fo:block>
1340                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
1341<xsl:value-of select="witsml:mdBottom"/>
1342</fo:inline></xsl:if>
1343                                                                                                        </fo:block>
1344                                                                                                </fo:table-cell>
1345                                                                                                <fo:table-cell>
1346                                                                                                        <fo:block>
1347                                                                                                                <xsl:if test="string(witsml:casing_liner_tubing_run/witsml:description)"><fo:inline>
1348<xsl:value-of select="witsml:casing_liner_tubing_run/witsml:description"/>
1349</fo:inline></xsl:if>
1350                                                                                                        </fo:block>
1351                                                                                                </fo:table-cell>
1352                                                                                        </fo:table-row>
1353</xsl:for-each>
1354                                                                                </fo:table-body>
1355                                                                        </fo:table> </fo:block>
1356                                                        </fo:table-cell>
1357                                                </fo:table-row>
1358                                        </fo:table-body>
1359                                </fo:table>
1360                        </fo:block>
1361<xslt:comment> Cement info </xslt:comment>
1362                        <fo:block break-before="page">
1363                                <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:cementStage">
1364<fo:block>
1365                                        <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1366                                        <fo:leader/>
1367                                        <fo:table>
1368                                                <fo:table-column column-width="100%"/>
1369                                                <fo:table-body>
1370                                                        <fo:table-row font-weight="bold" font-size="14pt">
1371                                                                <fo:table-cell>
1372                                                                        <fo:block>
1373                                                                        Cement information
1374                                                                </fo:block>
1375                                                                </fo:table-cell>
1376                                                        </fo:table-row>
1377                                                        <fo:table-row>
1378                                                                <fo:table-cell>
1379                                                                        <fo:block> </fo:block>
1380                                                                </fo:table-cell>
1381                                                        </fo:table-row>
1382                                                        <fo:table-row>
1383                                                                <fo:table-cell>
1384                                                                        <fo:block>
1385                                                                                <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1386                                                                                        <fo:table-column column-width="proportional-column-width(5)" column-number="1"/>
1387                                                                                        <fo:table-column column-width="proportional-column-width(5)" column-number="2"/>
1388                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="3"/>
1389                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="4"/>
1390                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="5"/>
1391                                                                                        <fo:table-column column-width="proportional-column-width(6)" column-number="6"/>
1392                                                                                        <fo:table-column column-width="proportional-column-width(6)" column-number="7"/>
1393                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="8"/>
1394                                                                                        <fo:table-column column-width="proportional-column-width(5.5)" column-number="9"/>
1395                                                                                        <fo:table-column column-width="proportional-column-width(10)" column-number="10"/>
1396                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="11"/>
1397                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="12"/>
1398                                                                                        <fo:table-column column-width="proportional-column-width(8.5)" column-number="13"/>
1399                                                                                        <fo:table-column column-width="proportional-column-width(6.5)" column-number="14"/>
1400                                                                                        <fo:table-column column-width="proportional-column-width(8.5)" column-number="15"/>
1401                                                                                        <fo:table-body>
1402                                                                                                <fo:table-row font-weight="bold">
1403                                                                                                        <fo:table-cell>
1404                                                                                                                <fo:block>Start time</fo:block>
1405                                                                                                        </fo:table-cell>
1406                                                                                                        <fo:table-cell>
1407                                                                                                                <fo:block>End time</fo:block>
1408                                                                                                        </fo:table-cell>
1409                                                                                                        <fo:table-cell>
1410                                                                                                                <fo:block>Job type</fo:block>
1411                                                                                                        </fo:table-cell>
1412                                                                                                        <fo:table-cell>
1413                                                                                                                <fo:block>Casing string diameter</fo:block>
1414                                                                                                                <fo:block>
1415                                                                                                                        <xsl:if test="string(witsml:casingStrDia/@uom)"><fo:inline>
1416<xsl:value-of select="witsml:casingStrDia/@uom"/>
1417</fo:inline></xsl:if>
1418                                                                                                                </fo:block>
1419                                                                                                        </fo:table-cell>
1420                                                                                                        <fo:table-cell>
1421                                                                                                                <fo:block>Top plug used</fo:block>
1422                                                                                                        </fo:table-cell>
1423                                                                                                        <fo:table-cell>
1424                                                                                                                <fo:block>Bottom plug used</fo:block>
1425                                                                                                        </fo:table-cell>
1426                                                                                                        <fo:table-cell>
1427                                                                                                                <fo:block>Plug bumped</fo:block>
1428                                                                                                        </fo:table-cell>
1429                                                                                                        <fo:table-cell>
1430                                                                                                                <fo:block>Plug bump pressure</fo:block>
1431                                                                                                                <fo:block>
1432                                                                                                                        <xsl:if test="string(witsml:presBump/@uom)"><fo:inline>
1433<xsl:value-of select="witsml:presBump/@uom"/>
1434</fo:inline></xsl:if>
1435                                                                                                                </fo:block>
1436                                                                                                        </fo:table-cell>
1437                                                                                                        <fo:table-cell>
1438                                                                                                                <fo:block>Float held</fo:block>
1439                                                                                                        </fo:table-cell>
1440                                                                                                        <fo:table-cell>
1441                                                                                                                <fo:block>Pressure release time</fo:block>
1442                                                                                                        </fo:table-cell>
1443                                                                                                        <fo:table-cell>
1444                                                                                                                <fo:block>Full returns</fo:block>
1445                                                                                                        </fo:table-cell>
1446                                                                                                        <fo:table-cell>
1447                                                                                                                <fo:block>Cement volume returns</fo:block>
1448                                                                                                                <fo:block>
1449                                                                                                                        <xsl:if test="string(witsml:volReturns/@uom)"><fo:inline>
1450<xsl:value-of select="witsml:volReturns/@uom"/>
1451</fo:inline></xsl:if>
1452                                                                                                                </fo:block>
1453                                                                                                        </fo:table-cell>
1454                                                                                                        <fo:table-cell>
1455                                                                                                                <fo:block>Reciprocated</fo:block>
1456                                                                                                        </fo:table-cell>
1457                                                                                                        <fo:table-cell>
1458                                                                                                                <fo:block>Rotated</fo:block>
1459                                                                                                        </fo:table-cell>
1460                                                                                                        <fo:table-cell>
1461                                                                                                                <fo:block>Comments</fo:block>
1462                                                                                                        </fo:table-cell>
1463                                                                                                </fo:table-row>
1464                                                                                                <fo:table-row>
1465                                                                                                        <fo:table-cell>
1466                                                                                                                <fo:block>
1467                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimPumpStart, 0, 17), 'T'))"><fo:inline>
1468<xsl:value-of select="substring-after(substring(witsml:dTimPumpStart, 0, 17), 'T')"/>
1469</fo:inline></xsl:if>
1470                                                                                                                </fo:block>
1471                                                                                                        </fo:table-cell>
1472                                                                                                        <fo:table-cell>
1473                                                                                                                <fo:block>
1474                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimPumpEnd, 0, 17), 'T'))"><fo:inline>
1475<xsl:value-of select="substring-after(substring(witsml:dTimPumpEnd, 0, 17), 'T')"/>
1476</fo:inline></xsl:if>
1477                                                                                                                </fo:block>
1478                                                                                                        </fo:table-cell>
1479                                                                                                        <fo:table-cell>
1480                                                                                                                <fo:block>
1481                                                                                                                        <xsl:if test="string(witsml:jobType)"><fo:inline>
1482<xsl:value-of select="witsml:jobType"/>
1483</fo:inline></xsl:if>
1484                                                                                                                </fo:block>
1485                                                                                                        </fo:table-cell>
1486                                                                                                        <fo:table-cell>
1487                                                                                                                <fo:block>
1488                                                                                                                        <xsl:if test="string(witsml:casingStrDia)"><fo:inline>
1489<xsl:value-of select="witsml:casingStrDia"/>
1490</fo:inline></xsl:if>
1491                                                                                                                </fo:block>
1492                                                                                                        </fo:table-cell>
1493                                                                                                        <fo:table-cell>
1494                                                                                                                <fo:block>
1495                                                                                                                        <xsl:if test="witsml:topPlug='true' or witsml:topPlug='1'">yes</xsl:if>
1496                                                                                                                        <xsl:if test="witsml:topPlug='false' or witsml:topPlug='0'">no</xsl:if>
1497                                                                                                                </fo:block>
1498                                                                                                        </fo:table-cell>
1499                                                                                                        <fo:table-cell>
1500                                                                                                                <fo:block>
1501                                                                                                                        <xsl:if test="witsml:botPlug='true' or witsml:botPlug='1'">yes</xsl:if>
1502                                                                                                                        <xsl:if test="witsml:botPlug='false' or witsml:botPlug='0'">no</xsl:if>
1503                                                                                                                </fo:block>
1504                                                                                                        </fo:table-cell>
1505                                                                                                        <fo:table-cell>
1506                                                                                                                <fo:block>
1507                                                                                                                        <xsl:if test="witsml:plugBumped='true' or witsml:plugBumped='1'">yes</xsl:if>
1508                                                                                                                        <xsl:if test="witsml:plugBumped='false' or witsml:plugBumped='0'">no</xsl:if>
1509                                                                                                                </fo:block>
1510                                                                                                        </fo:table-cell>
1511                                                                                                        <fo:table-cell>
1512                                                                                                                <fo:block>
1513                                                                                                                        <xsl:if test="string(witsml:presBump)"><fo:inline>
1514<xsl:value-of select="witsml:presBump"/>
1515</fo:inline></xsl:if>
1516                                                                                                                </fo:block>
1517                                                                                                        </fo:table-cell>
1518                                                                                                        <fo:table-cell>
1519                                                                                                                <fo:block>
1520                                                                                                                        <xsl:if test="witsml:floatHeld='true' or witsml:floatHeld='1'">yes</xsl:if>
1521                                                                                                                        <xsl:if test="witsml:floatHeld='false' or witsml:floatHeld='0'">no</xsl:if>
1522                                                                                                                </fo:block>
1523                                                                                                        </fo:table-cell>
1524                                                                                                        <fo:table-cell>
1525                                                                                                                <fo:block>
1526                                                                                                                        <xsl:if test="string(substring(witsml:eTimPresHeld, 0, 17))"><fo:inline>
1527<xsl:value-of select="substring(witsml:eTimPresHeld, 0, 17)"/>
1528</fo:inline></xsl:if>
1529                                                                                                                </fo:block>
1530                                                                                                        </fo:table-cell>
1531                                                                                                        <fo:table-cell>
1532                                                                                                                <fo:block>
1533                                                                                                                        <xsl:if test="witsml:annFlowAfter='true' or witsml:annFlowAfter='1'">yes</xsl:if>
1534                                                                                                                        <xsl:if test="witsml:annFlowAfter='false' or witsml:annFlowAfter='0'">no</xsl:if>
1535                                                                                                                </fo:block>
1536                                                                                                        </fo:table-cell>
1537                                                                                                        <fo:table-cell>
1538                                                                                                                <fo:block>
1539                                                                                                                        <xsl:if test="string(witsml:volReturns)"><fo:inline>
1540<xsl:value-of select="witsml:volReturns"/>
1541</fo:inline></xsl:if>
1542                                                                                                                </fo:block>
1543                                                                                                        </fo:table-cell>
1544                                                                                                        <fo:table-cell>
1545                                                                                                                <fo:block>
1546                                                                                                                        <xsl:if test="witsml:reciprocated='true' or witsml:reciprocated='1'">yes</xsl:if>
1547                                                                                                                        <xsl:if test="witsml:reciprocated='false' or witsml:reciprocated='0'">no</xsl:if>
1548                                                                                                                </fo:block>
1549                                                                                                        </fo:table-cell>
1550                                                                                                        <fo:table-cell>
1551                                                                                                                <fo:block>
1552                                                                                                                        <xsl:if test="witsml:rotated='true' or witsml:rotated='1'">yes</xsl:if>
1553                                                                                                                        <xsl:if test="witsml:rotated='false' or witsml:rotated='0'">no</xsl:if>
1554                                                                                                                </fo:block>
1555                                                                                                        </fo:table-cell>
1556                                                                                                        <fo:table-cell>
1557                                                                                                                <fo:block>
1558                                                                                                                        <xsl:if test="string(witsml:comments)"><fo:inline>
1559<xsl:value-of select="witsml:comments"/>
1560</fo:inline></xsl:if>
1561                                                                                                                </fo:block>
1562                                                                                                        </fo:table-cell>
1563                                                                                                </fo:table-row>
1564                                                                                        </fo:table-body>
1565                                                                                </fo:table>
1566                                                                        </fo:block>
1567                                                                </fo:table-cell>
1568                                                        </fo:table-row>
1569                                                        <fo:table-row>
1570                                                                <fo:table-cell>
1571                                                                        <fo:block/>
1572                                                                </fo:table-cell>
1573                                                        </fo:table-row>
1574                                                        <fo:table-row>
1575                                                                <fo:table-cell>
1576                                                                        <fo:block>
1577<fo:leader/>
1578</fo:block>
1579                                                                </fo:table-cell>
1580                                                        </fo:table-row>
1581                                                        <fo:table-row font-weight="bold" font-size="13pt">
1582                                                                <fo:table-cell>
1583                                                                        <fo:block>Cement Fluid Information</fo:block>
1584                                                                </fo:table-cell>
1585                                                        </fo:table-row>
1586                                                        <fo:table-row>
1587                                                                <fo:table-cell>
1588                                                                        <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1589                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="1"/>
1590                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="2"/>
1591                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="3"/>
1592                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="4"/>
1593                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="5"/>
1594                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="6"/>
1595                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="7"/>
1596                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="8"/>
1597                                                                                        <fo:table-column column-width="proportional-column-width(8.333)" column-number="9"/>
1598                                                                                        <fo:table-body>
1599                                                                                                <fo:table-row font-weight="bold">
1600                                                                                                        <fo:table-cell>
1601                                                                                                                <fo:block>Fluid type</fo:block>
1602                                                                                                        </fo:table-cell>
1603                                                                                                        <fo:table-cell>
1604                                                                                                                <fo:block>Fluid Description</fo:block>
1605                                                                                                        </fo:table-cell>
1606                                                                                                        <fo:table-cell>
1607                                                                                                                <fo:block>Volume pumped</fo:block>
1608                                                                                                                <fo:block>
1609                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:volPumped/@uom)"><fo:inline>
1610<xsl:value-of select="witsml:cementingFluid/witsml:volPumped/@uom"/>
1611</fo:inline></xsl:if>
1612                                                                                                                </fo:block>
1613                                                                                                        </fo:table-cell>
1614                                                                                                        <fo:table-cell>
1615                                                                                                                <fo:block>Fluid densitiy</fo:block>
1616                                                                                                                <fo:block>
1617                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:density/@uom)"><fo:inline>
1618<xsl:value-of select="witsml:cementingFluid/witsml:density/@uom"/>
1619</fo:inline></xsl:if>
1620                                                                                                                </fo:block>
1621                                                                                                        </fo:table-cell>
1622                                                                                                        <fo:table-cell>
1623                                                                                                                <fo:block>Yield point</fo:block>
1624                                                                                                                <fo:block>
1625                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:yp/@uom)"><fo:inline>
1626<xsl:value-of select="witsml:cementingFluid/witsml:yp/@uom"/>
1627</fo:inline></xsl:if>
1628                                                                                                                </fo:block>
1629                                                                                                        </fo:table-cell>
1630                                                                                                        <fo:table-cell>
1631                                                                                                                <fo:block>Mix water ratio</fo:block>
1632                                                                                                                <fo:block>
1633                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:ratioMixWater/@uom)"><fo:inline>
1634<xsl:value-of select="witsml:cementingFluid/witsml:ratioMixWater/@uom"/>
1635</fo:inline></xsl:if>
1636                                                                                                                </fo:block>
1637                                                                                                        </fo:table-cell>
1638                                                                                                        <fo:table-cell>
1639                                                                                                                <fo:block>Free water</fo:block>
1640                                                                                                                <fo:block>
1641                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:pcFreeWater/@uom)"><fo:inline>
1642<xsl:value-of select="witsml:cementingFluid/witsml:pcFreeWater/@uom"/>
1643</fo:inline></xsl:if>
1644                                                                                                                </fo:block>
1645                                                                                                        </fo:table-cell>
1646                                                                                                        <fo:table-cell>
1647                                                                                                                <fo:block>Thick time</fo:block>
1648                                                                                                                <fo:block>
1649                                                                                                                        <xsl:if test="string(witsml:cementingFluid/witsml:eTimThickening/@uom)"><fo:inline>
1650<xsl:value-of select="witsml:cementingFluid/witsml:eTimThickening/@uom"/>
1651</fo:inline></xsl:if>
1652                                                                                                                </fo:block>
1653                                                                                                        </fo:table-cell>
1654                                                                                                        <fo:table-cell>
1655                                                                                                                <fo:block>Comments</fo:block>
1656                                                                                                        </fo:table-cell>
1657                                                                                                </fo:table-row>
1658                                                                                                <xsl:for-each select="witsml:cementingFluid">
1659<fo:table-row>
1660                                                                                                        <fo:table-cell>
1661                                                                                                                <fo:block>
1662                                                                                                                        <xsl:if test="string(witsml:typeFluid)"><fo:inline>
1663<xsl:value-of select="witsml:typeFluid"/>
1664</fo:inline></xsl:if>
1665                                                                                                                </fo:block>
1666                                                                                                        </fo:table-cell>
1667                                                                                                        <fo:table-cell>
1668                                                                                                                <fo:block>
1669                                                                                                                        <xsl:if test="string(witsml:descFluid)"><fo:inline>
1670<xsl:value-of select="witsml:descFluid"/>
1671</fo:inline></xsl:if>
1672                                                                                                                </fo:block>
1673                                                                                                        </fo:table-cell>
1674                                                                                                        <fo:table-cell>
1675                                                                                                                <fo:block>
1676                                                                                                                        <xsl:if test="string(witsml:volPumped)"><fo:inline>
1677<xsl:value-of select="witsml:volPumped"/>
1678</fo:inline></xsl:if>
1679                                                                                                                </fo:block>
1680                                                                                                        </fo:table-cell>
1681                                                                                                        <fo:table-cell>
1682                                                                                                                <fo:block>
1683                                                                                                                        <xsl:if test="string(witsml:density)"><fo:inline>
1684<xsl:value-of select="witsml:density"/>
1685</fo:inline></xsl:if>
1686                                                                                                                </fo:block>
1687                                                                                                        </fo:table-cell>
1688                                                                                                        <fo:table-cell>
1689                                                                                                                <fo:block>
1690                                                                                                                        <xsl:if test="string(witsml:yp)"><fo:inline>
1691<xsl:value-of select="witsml:yp"/>
1692</fo:inline></xsl:if>
1693                                                                                                                </fo:block>
1694                                                                                                        </fo:table-cell>
1695                                                                                                        <fo:table-cell>
1696                                                                                                                <fo:block>
1697                                                                                                                        <xsl:if test="string(witsml:ratioMixWater)"><fo:inline>
1698<xsl:value-of select="witsml:ratioMixWater"/>
1699</fo:inline></xsl:if>
1700                                                                                                                </fo:block>
1701                                                                                                        </fo:table-cell>
1702                                                                                                        <fo:table-cell>
1703                                                                                                                <fo:block>
1704                                                                                                                        <xsl:if test="string(witsml:pcFreeWater)"><fo:inline>
1705<xsl:value-of select="witsml:pcFreeWater"/>
1706</fo:inline></xsl:if>
1707                                                                                                                </fo:block>
1708                                                                                                        </fo:table-cell>
1709                                                                                                        <fo:table-cell>
1710                                                                                                                <fo:block>
1711                                                                                                                        <xsl:if test="string(witsml:eTimThickening)"><fo:inline>
1712<xsl:value-of select="witsml:eTimThickening"/>
1713</fo:inline></xsl:if>
1714                                                                                                                </fo:block>
1715                                                                                                        </fo:table-cell>
1716                                                                                                        <fo:table-cell>
1717                                                                                                                <fo:block>
1718                                                                                                                        <xsl:if test="string(witsml:comments)"><fo:inline>
1719<xsl:value-of select="witsml:comments"/>
1720</fo:inline></xsl:if>
1721                                                                                                                </fo:block>
1722                                                                                                        </fo:table-cell>
1723                                                                                                </fo:table-row>
1724</xsl:for-each>
1725                                                                                                <fo:table-row>
1726                                                                                                        <fo:table-cell>
1727                                                                                                                <fo:block/>
1728                                                                                                        </fo:table-cell>
1729                                                                                                </fo:table-row>
1730                                                                                        </fo:table-body>
1731                                                                                </fo:table> </fo:block>
1732                                                                </fo:table-cell>
1733                                                        </fo:table-row>
1734                                                </fo:table-body>
1735                                        </fo:table>
1736                                </fo:block>
1737</xsl:for-each>
1738                        </fo:block>
1739<xslt:comment> Pore pressure </xslt:comment>
1740                        <fo:block break-before="page">
1741                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1742                                <fo:leader/>
1743                                <xsl:variable name="element_drillReportPorePressure" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPorePressure']/xsd:sequence"/>
1744                                <xsl:variable name="url_readingKind">
1745                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='readingKind']/@sawsdl:modelReference"/>
1746                                </xsl:variable>
1747                                <xsl:variable name="url_equivalentMudWeight">
1748                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='equivalentMudWeight']/@sawsdl:modelReference"/>
1749                                </xsl:variable>
1750                                <xsl:variable name="url_dTim">
1751                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
1752                                </xsl:variable>
1753                                <xsl:variable name="url_md">
1754                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='md']/@sawsdl:modelReference"/>
1755                                </xsl:variable>
1756                                <xsl:variable name="url_tvd">
1757                                        <xsl:value-of select="$element_drillReportPorePressure//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
1758                                </xsl:variable>
1759                                <fo:table>
1760                                        <fo:table-column column-width="100%"/>
1761                                        <fo:table-body>
1762                                                <fo:table-row font-weight="bold" font-size="14pt">
1763                                                        <fo:table-cell>
1764                                                                <fo:block>
1765                                                                        Pore Pressure
1766                                                                </fo:block>
1767                                                        </fo:table-cell>
1768                                                </fo:table-row>
1769                                                <fo:table-row>
1770                                                        <fo:table-cell>
1771                                                                <fo:block> </fo:block>
1772                                                        </fo:table-cell>
1773                                                </fo:table-row>
1774                                                <fo:table-row>
1775                                                        <fo:table-cell>
1776                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1777                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="1"/>
1778                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="2"/>
1779                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="3"/>
1780                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="4"/>
1781                                                                                <fo:table-column column-width="proportional-column-width(15)" column-number="5"/>
1782                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
1783                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
1784                                                                                <fo:table-column column-width="proportional-column-width(5)" column-number="8"/>
1785                                                                                <fo:table-body>
1786                                                                                        <fo:table-row font-weight="bold">
1787                                                                                                <fo:table-cell>
1788                                                                                                        <fo:block>
1789                                                                                                                <fo:basic-link external-destination="url({$url_readingKind})">Reading</fo:basic-link>
1790                                                                                                        </fo:block>
1791                                                                                                </fo:table-cell>
1792                                                                                                <fo:table-cell>
1793                                                                                                        <fo:block>
1794                                                                                                                <fo:basic-link external-destination="url({$url_equivalentMudWeight})">Equ Mud Weight</fo:basic-link>
1795                                                                                                        </fo:block>
1796                                                                                                        <fo:block>
1797                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:porePressure/witsml:equivalentMudWeight/@uom)"><fo:inline>
1798<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:porePressure/witsml:equivalentMudWeight/@uom"/>
1799</fo:inline></xsl:if>
1800                                                                                                        </fo:block>
1801                                                                                                        <fo:block> </fo:block>
1802                                                                                                </fo:table-cell>
1803                                                                                                <fo:table-cell>
1804                                                                                                        <fo:block>
1805                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
1806                                                                                                        </fo:block>
1807                                                                                                </fo:table-cell>
1808                                                                                                <fo:table-cell>
1809                                                                                                        <fo:block>
1810                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
1811                                                                                                        </fo:block>
1812                                                                                                        <fo:block>mMD</fo:block>
1813                                                                                                </fo:table-cell>
1814                                                                                                <fo:table-cell>
1815                                                                                                        <fo:block>
1816                                                                                                                <fo:basic-link external-destination="url({$url_tvd})">Depth</fo:basic-link>
1817                                                                                                        </fo:block>
1818                                                                                                        <fo:block>mTVD</fo:block>
1819                                                                                                </fo:table-cell>
1820                                                                                                <fo:table-cell>
1821                                                                                                        <fo:block> </fo:block>
1822                                                                                                </fo:table-cell>
1823                                                                                                <fo:table-cell>
1824                                                                                                        <fo:block> </fo:block>
1825                                                                                                </fo:table-cell>
1826                                                                                                <fo:table-cell>
1827                                                                                                        <fo:block> </fo:block>
1828                                                                                                </fo:table-cell>
1829                                                                                        </fo:table-row>
1830                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:porePressure">
1831<fo:table-row>
1832                                                                                                <fo:table-cell>
1833                                                                                                        <fo:block>
1834                                                                                                                <xsl:if test="string(witsml:readingKind)"><fo:inline>
1835<xsl:value-of select="witsml:readingKind"/>
1836</fo:inline></xsl:if>
1837                                                                                                        </fo:block>
1838                                                                                                </fo:table-cell>
1839                                                                                                <fo:table-cell>
1840                                                                                                        <fo:block>
1841                                                                                                                <xsl:if test="string(witsml:equivalentMudWeight)"><fo:inline>
1842<xsl:value-of select="witsml:equivalentMudWeight"/>
1843</fo:inline></xsl:if>
1844                                                                                                        </fo:block>
1845                                                                                                </fo:table-cell>
1846                                                                                                <fo:table-cell>
1847                                                                                                        <fo:block>
1848                                                                                                                <xsl:if test="string(substring(witsml:dTim, 0, 17))"><fo:inline>
1849<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
1850</fo:inline></xsl:if>
1851                                                                                                        </fo:block>
1852                                                                                                </fo:table-cell>
1853                                                                                                <fo:table-cell>
1854                                                                                                        <fo:block>
1855                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
1856<xsl:value-of select="witsml:md"/>
1857</fo:inline></xsl:if>
1858                                                                                                        </fo:block>
1859                                                                                                </fo:table-cell>
1860                                                                                                <fo:table-cell>
1861                                                                                                        <fo:block>
1862                                                                                                                <xsl:if test="string(witsml:tvd)"><fo:inline>
1863<xsl:value-of select="witsml:tvd"/>
1864</fo:inline></xsl:if>
1865                                                                                                        </fo:block>
1866                                                                                                </fo:table-cell>
1867                                                                                                <fo:table-cell>
1868                                                                                                        <fo:block> </fo:block>
1869                                                                                                </fo:table-cell>
1870                                                                                                <fo:table-cell>
1871                                                                                                        <fo:block> </fo:block>
1872                                                                                                </fo:table-cell>
1873                                                                                                <fo:table-cell>
1874                                                                                                        <fo:block> </fo:block>
1875                                                                                                </fo:table-cell>
1876                                                                                        </fo:table-row>
1877</xsl:for-each>
1878                                                                                </fo:table-body>
1879                                                                        </fo:table> </fo:block>
1880                                                        </fo:table-cell>
1881                                                </fo:table-row>
1882                                        </fo:table-body>
1883                                </fo:table>
1884                        </fo:block>
1885<xslt:comment> Survey Station </xslt:comment>
1886                        <fo:block>
1887                                <xsl:variable name="element_drillReportSurveyStation" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportSurveyStation']/xsd:sequence"/>
1888                                <xsl:variable name="url_md">
1889                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='md']/@sawsdl:modelReference"/>
1890                                </xsl:variable>
1891                                <xsl:variable name="url_tvd">
1892                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
1893                                </xsl:variable>
1894                                <xsl:variable name="url_incl">
1895                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='incl']/@sawsdl:modelReference"/>
1896                                </xsl:variable>
1897                                <xsl:variable name="url_azi">
1898                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='azi']/@sawsdl:modelReference"/>
1899                                </xsl:variable>
1900                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1901                                <fo:leader/>
1902                                <fo:table>
1903                                        <fo:table-column column-width="100%"/>
1904                                        <fo:table-body>
1905                                                <fo:table-row font-weight="bold" font-size="14pt">
1906                                                        <fo:table-cell>
1907                                                                <fo:block>
1908                                                                        Survey Station
1909                                                                </fo:block>
1910                                                        </fo:table-cell>
1911                                                </fo:table-row>
1912                                                <fo:table-row>
1913                                                        <fo:table-cell>
1914                                                                <fo:block> </fo:block>
1915                                                        </fo:table-cell>
1916                                                </fo:table-row>
1917                                                <fo:table-row>
1918                                                        <fo:table-cell>
1919                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1920                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
1921                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
1922                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
1923                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
1924                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
1925                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
1926                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
1927                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
1928                                                                                <fo:table-body>
1929                                                                                        <fo:table-row font-weight="bold">
1930                                                                                                <fo:table-cell>
1931                                                                                                        <fo:block>
1932                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
1933                                                                                                        </fo:block>
1934                                                                                                        <fo:block>mMD</fo:block>
1935                                                                                                </fo:table-cell>
1936                                                                                                <fo:table-cell>
1937                                                                                                        <fo:block>
1938                                                                                                                <fo:basic-link external-destination="url({$url_tvd})">Depth</fo:basic-link>
1939                                                                                                        </fo:block>
1940                                                                                                        <fo:block>mTVD</fo:block>
1941                                                                                                </fo:table-cell>
1942                                                                                                <fo:table-cell>
1943                                                                                                        <fo:block>
1944                                                                                                                <fo:basic-link external-destination="url({$url_incl})">Inclination</fo:basic-link>
1945                                                                                                        </fo:block>
1946                                                                                                </fo:table-cell>
1947                                                                                                <fo:table-cell>
1948                                                                                                        <fo:block>
1949                                                                                                                <fo:basic-link external-destination="url({$url_azi})">Azimuth</fo:basic-link>
1950                                                                                                        </fo:block>
1951                                                                                                </fo:table-cell>
1952                                                                                                <fo:table-cell>
1953                                                                                                        <fo:block> </fo:block>
1954                                                                                                </fo:table-cell>
1955                                                                                                <fo:table-cell>
1956                                                                                                        <fo:block> </fo:block>
1957                                                                                                </fo:table-cell>
1958                                                                                                <fo:table-cell>
1959                                                                                                        <fo:block> </fo:block>
1960                                                                                                </fo:table-cell>
1961                                                                                                <fo:table-cell>
1962                                                                                                        <fo:block> </fo:block>
1963                                                                                                </fo:table-cell>
1964                                                                                        </fo:table-row>
1965                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:surveyStation">
1966<fo:table-row>
1967                                                                                                <fo:table-cell>
1968                                                                                                        <fo:block>
1969                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
1970<xsl:value-of select="witsml:md"/>
1971</fo:inline></xsl:if>
1972                                                                                                        </fo:block>
1973                                                                                                </fo:table-cell>
1974                                                                                                <fo:table-cell>
1975                                                                                                        <fo:block>
1976                                                                                                                <xsl:if test="string(witsml:tvd)"><fo:inline>
1977<xsl:value-of select="witsml:tvd"/>
1978</fo:inline></xsl:if>
1979                                                                                                        </fo:block>
1980                                                                                                </fo:table-cell>
1981                                                                                                <fo:table-cell>
1982                                                                                                        <fo:block>
1983                                                                                                                <xsl:if test="string(witsml:incl)"><fo:inline>
1984<xsl:value-of select="witsml:incl"/>
1985</fo:inline></xsl:if>
1986                                                                                                        </fo:block>
1987                                                                                                </fo:table-cell>
1988                                                                                                <fo:table-cell>
1989                                                                                                        <fo:block>
1990                                                                                                                <xsl:if test="string(witsml:azi)"><fo:inline>
1991<xsl:value-of select="witsml:azi"/>
1992</fo:inline></xsl:if>
1993                                                                                                        </fo:block>
1994                                                                                                </fo:table-cell>
1995                                                                                                <fo:table-cell>
1996                                                                                                        <fo:block> </fo:block>
1997                                                                                                </fo:table-cell>
1998                                                                                                <fo:table-cell>
1999                                                                                                        <fo:block> </fo:block>
2000                                                                                                </fo:table-cell>
2001                                                                                                <fo:table-cell>
2002                                                                                                        <fo:block> </fo:block>
2003                                                                                                </fo:table-cell>
2004                                                                                                <fo:table-cell>
2005                                                                                                        <fo:block> </fo:block>
2006                                                                                                </fo:table-cell>
2007                                                                                        </fo:table-row>
2008</xsl:for-each>
2009                                                                                </fo:table-body>
2010                                                                        </fo:table> </fo:block>
2011                                                        </fo:table-cell>
2012                                                </fo:table-row>
2013                                        </fo:table-body>
2014                                </fo:table>
2015                        </fo:block>
2016<xslt:comment> Log Information </xslt:comment>
2017                        <fo:block>
2018                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2019                                <fo:leader/>
2020                                <xsl:variable name="element_drillReportLogInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLogInfo']/xsd:sequence"/>
2021                                <xsl:variable name="url_serviceCompany">
2022                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='serviceCompany']/@sawsdl:modelReference"/>
2023                                </xsl:variable>
2024                                <xsl:variable name="url_runNumber">
2025                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='runNumber']/@sawsdl:modelReference"/>
2026                                </xsl:variable>
2027                                <xsl:variable name="url_mdTop">
2028                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2029                                </xsl:variable>
2030                                <xsl:variable name="url_mdBottom">
2031                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2032                                </xsl:variable>
2033                                <xsl:variable name="url_tool">
2034                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tool']/@sawsdl:modelReference"/>
2035                                </xsl:variable>
2036                                <xsl:variable name="url_tempBHCT">
2037                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHCT']/@sawsdl:modelReference"/>
2038                                </xsl:variable>
2039                                <xsl:variable name="url_tempBHST">
2040                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHST']/@sawsdl:modelReference"/>
2041                                </xsl:variable>
2042                                <fo:table>
2043                                        <fo:table-column column-width="100%"/>
2044                                        <fo:table-body>
2045                                                <fo:table-row font-weight="bold" font-size="14pt">
2046                                                        <fo:table-cell>
2047                                                                <fo:block>
2048                                                                        Log Information
2049                                                                </fo:block>
2050                                                        </fo:table-cell>
2051                                                </fo:table-row>
2052                                                <fo:table-row font-weight="bold" font-size="14pt">
2053                                                        <fo:table-cell>
2054                                                                <fo:block> </fo:block>
2055                                                        </fo:table-cell>
2056                                                </fo:table-row>
2057                                                <fo:table-row>
2058                                                        <fo:table-cell>
2059                                                                <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>
2060<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:serviceCompany"/>
2061</fo:inline></xsl:if></fo:block>
2062                                                        </fo:table-cell>
2063                                                </fo:table-row>
2064                                                <fo:table-row>
2065                                                        <fo:table-cell>
2066                                                                <fo:block> </fo:block>
2067                                                        </fo:table-cell>
2068                                                </fo:table-row>
2069                                                <fo:table-row>
2070                                                        <fo:table-cell>
2071                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2072                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2073                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2074                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2075                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2076                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2077                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2078                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2079                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2080                                                                                <fo:table-body>
2081                                                                                        <fo:table-row font-weight="bold">
2082                                                                                                <fo:table-cell>
2083                                                                                                        <fo:block>
2084                                                                                                                <fo:basic-link external-destination="url({$url_runNumber})">Run no</fo:basic-link>
2085                                                                                                        </fo:block>
2086                                                                                                </fo:table-cell>
2087                                                                                                <fo:table-cell>
2088                                                                                                        <fo:block>
2089                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2090                                                                                                        </fo:block>
2091                                                                                                        <fo:block>mMD</fo:block>
2092                                                                                                </fo:table-cell>
2093                                                                                                <fo:table-cell>
2094                                                                                                        <fo:block>
2095                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2096                                                                                                        </fo:block>
2097                                                                                                        <fo:block>mMD</fo:block>
2098                                                                                                </fo:table-cell>
2099                                                                                                <fo:table-cell>
2100                                                                                                        <fo:block>
2101                                                                                                                <fo:basic-link external-destination="url({$url_tool})">Tool</fo:basic-link>
2102                                                                                                        </fo:block>
2103                                                                                                </fo:table-cell>
2104                                                                                                <fo:table-cell>
2105                                                                                                        <fo:block>
2106                                                                                                                <fo:basic-link external-destination="url({$url_tempBHCT})">BHCT</fo:basic-link>
2107                                                                                                        </fo:block>
2108                                                                                                        <fo:block>
2109                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom)"><fo:inline>
2110<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom"/>
2111</fo:inline></xsl:if>
2112                                                                                                        </fo:block>
2113                                                                                                </fo:table-cell>
2114                                                                                                <fo:table-cell>
2115                                                                                                        <fo:block>
2116                                                                                                                <fo:basic-link external-destination="url({$url_tempBHST})">BHST</fo:basic-link>
2117                                                                                                        </fo:block>
2118                                                                                                        <fo:block>
2119                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom)"><fo:inline>
2120<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom"/>
2121</fo:inline></xsl:if>
2122                                                                                                        </fo:block>
2123                                                                                                </fo:table-cell>
2124                                                                                                <fo:table-cell>
2125                                                                                                        <fo:block> </fo:block>
2126                                                                                                </fo:table-cell>
2127                                                                                                <fo:table-cell>
2128                                                                                                        <fo:block> </fo:block>
2129                                                                                                </fo:table-cell>
2130                                                                                        </fo:table-row>
2131                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:logInfo">
2132<fo:table-row>
2133                                                                                                <fo:table-cell>
2134                                                                                                        <fo:block>
2135                                                                                                                <xsl:if test="string(witsml:runNumber)"><fo:inline>
2136<xsl:value-of select="witsml:runNumber"/>
2137</fo:inline></xsl:if>
2138                                                                                                        </fo:block>
2139                                                                                                </fo:table-cell>
2140                                                                                                <fo:table-cell>
2141                                                                                                        <fo:block>
2142                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2143<xsl:value-of select="witsml:mdTop"/>
2144</fo:inline></xsl:if>
2145                                                                                                        </fo:block>
2146                                                                                                </fo:table-cell>
2147                                                                                                <fo:table-cell>
2148                                                                                                        <fo:block>
2149                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2150<xsl:value-of select="witsml:mdBottom"/>
2151</fo:inline></xsl:if>
2152                                                                                                        </fo:block>
2153                                                                                                </fo:table-cell>
2154                                                                                                <fo:table-cell>
2155                                                                                                        <fo:block>
2156                                                                                                                <xsl:if test="string(witsml:tool)"><fo:inline>
2157<xsl:value-of select="witsml:tool"/>
2158</fo:inline></xsl:if>
2159                                                                                                        </fo:block>
2160                                                                                                </fo:table-cell>
2161                                                                                                <fo:table-cell>
2162                                                                                                        <fo:block>
2163                                                                                                                <xsl:if test="string(witsml:tempBHCT)"><fo:inline>
2164<xsl:value-of select="witsml:tempBHCT"/>
2165</fo:inline></xsl:if>
2166                                                                                                        </fo:block>
2167                                                                                                </fo:table-cell>
2168                                                                                                <fo:table-cell>
2169                                                                                                        <fo:block>
2170                                                                                                                <xsl:if test="string(witsml:tempBHST)"><fo:inline>
2171<xsl:value-of select="witsml:tempBHST"/>
2172</fo:inline></xsl:if>
2173                                                                                                        </fo:block>
2174                                                                                                </fo:table-cell>
2175                                                                                                <fo:table-cell>
2176                                                                                                        <fo:block> </fo:block>
2177                                                                                                </fo:table-cell>
2178                                                                                                <fo:table-cell>
2179                                                                                                        <fo:block> </fo:block>
2180                                                                                                </fo:table-cell>
2181                                                                                        </fo:table-row>
2182</xsl:for-each>
2183                                                                                </fo:table-body>
2184                                                                        </fo:table> </fo:block>
2185                                                        </fo:table-cell>
2186                                                </fo:table-row>
2187                                        </fo:table-body>
2188                                </fo:table>
2189                        </fo:block>
2190<xslt:comment> Core Information </xslt:comment>
2191                        <fo:block>
2192                                <xsl:variable name="element_drillReportCoreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportCoreInfo']/xsd:sequence"/>
2193                                <xsl:variable name="url_coreNumber">
2194                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreNumber']/@sawsdl:modelReference"/>
2195                                </xsl:variable>
2196                                <xsl:variable name="url_mdTop">
2197                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2198                                </xsl:variable>
2199                                <xsl:variable name="url_mdBottom">
2200                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2201                                </xsl:variable>
2202                                <xsl:variable name="url_lenRecovered">
2203                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenRecovered']/@sawsdl:modelReference"/>
2204                                </xsl:variable>
2205                                <xsl:variable name="url_recoverPc">
2206                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='recoverPc']/@sawsdl:modelReference"/>
2207                                </xsl:variable>
2208                                <xsl:variable name="url_lenBarrel">
2209                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenBarrel']/@sawsdl:modelReference"/>
2210                                </xsl:variable>
2211                                <xsl:variable name="url_innerBarrelType">
2212                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='innerBarrelType']/@sawsdl:modelReference"/>
2213                                </xsl:variable>
2214                                <xsl:variable name="url_coreDescription">
2215                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreDescription']/@sawsdl:modelReference"/>
2216                                </xsl:variable>
2217                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2218                                <fo:leader/>
2219                                <fo:table>
2220                                        <fo:table-column column-width="100%"/>
2221                                        <fo:table-body>
2222                                                <fo:table-row font-weight="bold" font-size="14pt">
2223                                                        <fo:table-cell>
2224                                                                <fo:block>
2225                                                                        Core Information
2226                                                                </fo:block>
2227                                                        </fo:table-cell>
2228                                                </fo:table-row>
2229                                                <fo:table-row>
2230                                                        <fo:table-cell>
2231                                                                <fo:block> </fo:block>
2232                                                        </fo:table-cell>
2233                                                </fo:table-row>
2234                                                <fo:table-row>
2235                                                        <fo:table-cell>
2236                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2237                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2238                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2239                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2240                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2241                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2242                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2243                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2244                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2245                                                                                <fo:table-body>
2246                                                                                        <fo:table-row font-weight="bold">
2247                                                                                                <fo:table-cell>
2248                                                                                                        <fo:block>
2249                                                                                                                <fo:basic-link external-destination="url({$url_coreNumber})">Core no</fo:basic-link>
2250                                                                                                        </fo:block>
2251                                                                                                </fo:table-cell>
2252                                                                                                <fo:table-cell>
2253                                                                                                        <fo:block>
2254                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2255                                                                                                        </fo:block>
2256                                                                                                        <fo:block>mMD</fo:block>
2257                                                                                                </fo:table-cell>
2258                                                                                                <fo:table-cell>
2259                                                                                                        <fo:block>
2260                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2261                                                                                                        </fo:block>
2262                                                                                                        <fo:block>mMD</fo:block>
2263                                                                                                </fo:table-cell>
2264                                                                                                <fo:table-cell>
2265                                                                                                        <fo:block>
2266                                                                                                                <fo:basic-link external-destination="url({$url_lenRecovered})">Core length</fo:basic-link>
2267                                                                                                        </fo:block>
2268                                                                                                        <fo:block>
2269                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom)"><fo:inline>
2270<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom"/>
2271</fo:inline></xsl:if>
2272                                                                                                        </fo:block>
2273                                                                                                </fo:table-cell>
2274                                                                                                <fo:table-cell>
2275                                                                                                        <fo:block>
2276                                                                                                                <fo:basic-link external-destination="url({$url_recoverPc})">Recover core</fo:basic-link>
2277                                                                                                        </fo:block>
2278                                                                                                        <fo:block>
2279                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom)"><fo:inline>
2280<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom"/>
2281</fo:inline></xsl:if>
2282                                                                                                        </fo:block>
2283                                                                                                </fo:table-cell>
2284                                                                                                <fo:table-cell>
2285                                                                                                        <fo:block>
2286                                                                                                                <fo:basic-link external-destination="url({$url_lenBarrel})">Core barrel length</fo:basic-link>
2287                                                                                                        </fo:block>
2288                                                                                                        <fo:block>
2289                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom)"><fo:inline>
2290<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom"/>
2291</fo:inline></xsl:if>
2292                                                                                                        </fo:block>
2293                                                                                                </fo:table-cell>
2294                                                                                                <fo:table-cell>
2295                                                                                                        <fo:block>
2296                                                                                                                <fo:basic-link external-destination="url({$url_innerBarrelType})">Inner barrel type</fo:basic-link>
2297                                                                                                        </fo:block>
2298                                                                                                </fo:table-cell>
2299                                                                                                <fo:table-cell>
2300                                                                                                        <fo:block>
2301                                                                                                                <fo:basic-link external-destination="url({$url_coreDescription})">Description</fo:basic-link>
2302                                                                                                        </fo:block>
2303                                                                                                </fo:table-cell>
2304                                                                                        </fo:table-row>
2305                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo">
2306<fo:table-row>
2307                                                                                                <fo:table-cell>
2308                                                                                                        <fo:block>
2309                                                                                                                <xsl:if test="string(witsml:coreNumber)"><fo:inline>
2310<xsl:value-of select="witsml:coreNumber"/>
2311</fo:inline></xsl:if>
2312                                                                                                        </fo:block>
2313                                                                                                </fo:table-cell>
2314                                                                                                <fo:table-cell>
2315                                                                                                        <fo:block>
2316                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2317<xsl:value-of select="witsml:mdTop"/>
2318</fo:inline></xsl:if>
2319                                                                                                        </fo:block>
2320                                                                                                </fo:table-cell>
2321                                                                                                <fo:table-cell>
2322                                                                                                        <fo:block>
2323                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2324<xsl:value-of select="witsml:mdBottom"/>
2325</fo:inline></xsl:if>
2326                                                                                                        </fo:block>
2327                                                                                                </fo:table-cell>
2328                                                                                                <fo:table-cell>
2329                                                                                                        <fo:block>
2330                                                                                                                <xsl:if test="string(witsml:lenRecovered)"><fo:inline>
2331<xsl:value-of select="witsml:lenRecovered"/>
2332</fo:inline></xsl:if>
2333                                                                                                        </fo:block>
2334                                                                                                </fo:table-cell>
2335                                                                                                <fo:table-cell>
2336                                                                                                        <fo:block>
2337                                                                                                                <xsl:if test="string(witsml:recoverPc)"><fo:inline>
2338<xsl:value-of select="witsml:recoverPc"/>
2339</fo:inline></xsl:if>
2340                                                                                                        </fo:block>
2341                                                                                                </fo:table-cell>
2342                                                                                                <fo:table-cell>
2343                                                                                                        <fo:block>
2344                                                                                                                <xsl:if test="string(witsml:lenBarrel)"><fo:inline>
2345<xsl:value-of select="witsml:lenBarrel"/>
2346</fo:inline></xsl:if>
2347                                                                                                        </fo:block>
2348                                                                                                </fo:table-cell>
2349                                                                                                <fo:table-cell>
2350                                                                                                        <fo:block>
2351                                                                                                                <xsl:if test="string(witsml:innerBarrelType)"><fo:inline>
2352<xsl:value-of select="witsml:innerBarrelType"/>
2353</fo:inline></xsl:if>
2354                                                                                                        </fo:block>
2355                                                                                                </fo:table-cell>
2356                                                                                                <fo:table-cell>
2357                                                                                                        <fo:block>
2358                                                                                                                <xsl:if test="string(witsml:coreDescription)"><fo:inline>
2359<xsl:value-of select="witsml:coreDescription"/>
2360</fo:inline></xsl:if>
2361                                                                                                        </fo:block>
2362                                                                                                </fo:table-cell>
2363                                                                                        </fo:table-row>
2364</xsl:for-each>
2365                                                                                </fo:table-body>
2366                                                                        </fo:table> </fo:block>
2367                                                        </fo:table-cell>
2368                                                </fo:table-row>
2369                                        </fo:table-body>
2370                                </fo:table>
2371                        </fo:block>
2372<xslt:comment> Well Test Information </xslt:comment>
2373                        <fo:block break-before="page">
2374                                <xsl:variable name="element_drillReportWellTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellTestInfo']/xsd:sequence"/>
2375                                <xsl:variable name="url_dTim">
2376                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
2377                                </xsl:variable>
2378                                <xsl:variable name="url_testNumber">
2379                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testNumber']/@sawsdl:modelReference"/>
2380                                </xsl:variable>
2381                                <xsl:variable name="url_testType">
2382                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testType']/@sawsdl:modelReference"/>
2383                                </xsl:variable>
2384                                <xsl:variable name="url_mdTop">
2385                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2386                                </xsl:variable>
2387                                <xsl:variable name="url_mdBottom">
2388                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2389                                </xsl:variable>
2390                                <xsl:variable name="url_chokeOrificeSize">
2391                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chokeOrificeSize']/@sawsdl:modelReference"/>
2392                                </xsl:variable>
2393                                <xsl:variable name="url_densityOil">
2394                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='densityOil']/@sawsdl:modelReference"/>
2395                                </xsl:variable>
2396                                <xsl:variable name="url_flowRateOil">
2397                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateOil']/@sawsdl:modelReference"/>
2398                                </xsl:variable>
2399                                <xsl:variable name="url_flowRateGas">
2400                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateGas']/@sawsdl:modelReference"/>
2401                                </xsl:variable>
2402                                <xsl:variable name="url_flowRateWater">
2403                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateWater']/@sawsdl:modelReference"/>
2404                                </xsl:variable>
2405                                <xsl:variable name="url_presShutIn">
2406                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presShutIn']/@sawsdl:modelReference"/>
2407                                </xsl:variable>
2408                                <xsl:variable name="url_presFlowing">
2409                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presFlowing']/@sawsdl:modelReference"/>
2410                                </xsl:variable>
2411                                <xsl:variable name="url_presBottom">
2412                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presBottom']/@sawsdl:modelReference"/>
2413                                </xsl:variable>
2414                                <xsl:variable name="url_gasOilRatio">
2415                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='gasOilRatio']/@sawsdl:modelReference"/>
2416                                </xsl:variable>
2417                                <xsl:variable name="url_waterOilRatio">
2418                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='waterOilRatio']/@sawsdl:modelReference"/>
2419                                </xsl:variable>
2420                                <xsl:variable name="url_chloride">
2421                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chloride']/@sawsdl:modelReference"/>
2422                                </xsl:variable>
2423                                <xsl:variable name="url_carbonDioxide">
2424                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='carbonDioxide']/@sawsdl:modelReference"/>
2425                                </xsl:variable>
2426                                <xsl:variable name="url_hydrogenSulfide">
2427                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='hydrogenSulfide']/@sawsdl:modelReference"/>
2428                                </xsl:variable>
2429                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2430                                <fo:leader/>
2431                                <fo:table>
2432                                        <fo:table-column column-width="100%"/>
2433                                        <fo:table-body>
2434                                                <fo:table-row font-weight="bold" font-size="14pt">
2435                                                        <fo:table-cell>
2436                                                                <fo:block>
2437                                                                        Well Test Information
2438                                                                </fo:block>
2439                                                        </fo:table-cell>
2440                                                </fo:table-row>
2441                                                <fo:table-row>
2442                                                        <fo:table-cell>
2443                                                                <fo:block> </fo:block>
2444                                                        </fo:table-cell>
2445                                                </fo:table-row>
2446                                                <fo:table-row>
2447                                                        <fo:table-cell>
2448                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2449                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="1"/>
2450                                                                                <fo:table-column column-width="proportional-column-width(3.755)" column-number="2"/>
2451                                                                                <fo:table-column column-width="proportional-column-width(7.356)" column-number="3"/>
2452                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="4"/>
2453                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="5"/>
2454                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="6"/>
2455                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="7"/>
2456                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="8"/>
2457                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="9"/>
2458                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="10"/>
2459                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="11"/>
2460                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="12"/>
2461                                                                                <fo:table-column column-width="proportional-column-width(6.256)" column-number="13"/>
2462                                                                                <fo:table-column column-width="proportional-column-width(4.855)" column-number="14"/>
2463                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="15"/>
2464                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="16"/>
2465                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="17"/>
2466                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="18"/>
2467                                                                                <fo:table-body>
2468                                                                                        <fo:table-row font-weight="bold">
2469                                                                                                <fo:table-cell>
2470                                                                                                        <fo:block>
2471                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
2472                                                                                                        </fo:block>
2473                                                                                                </fo:table-cell>
2474                                                                                                <fo:table-cell>
2475                                                                                                        <fo:block>
2476                                                                                                                <fo:basic-link external-destination="url({$url_testNumber})">Test no</fo:basic-link>
2477                                                                                                        </fo:block>
2478                                                                                                </fo:table-cell>
2479                                                                                                <fo:table-cell>
2480                                                                                                        <fo:block>
2481                                                                                                                <fo:basic-link external-destination="url({$url_testType})">Type</fo:basic-link>
2482                                                                                                        </fo:block>
2483                                                                                                </fo:table-cell>
2484                                                                                                <fo:table-cell>
2485                                                                                                        <fo:block>
2486                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2487                                                                                                        </fo:block>
2488                                                                                                        <fo:block>mMD</fo:block>
2489                                                                                                </fo:table-cell>
2490                                                                                                <fo:table-cell>
2491                                                                                                        <fo:block>
2492                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2493                                                                                                        </fo:block>
2494                                                                                                        <fo:block>mMD</fo:block>
2495                                                                                                </fo:table-cell>
2496                                                                                                <fo:table-cell>
2497                                                                                                        <fo:block>
2498                                                                                                                <fo:basic-link external-destination="url({$url_chokeOrificeSize})">Choke orifice Size</fo:basic-link>
2499                                                                                                        </fo:block>
2500                                                                                                        <fo:block>
2501                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom)"><fo:inline>
2502<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/>
2503</fo:inline></xsl:if>
2504                                                                                                        </fo:block>
2505                                                                                                </fo:table-cell>
2506                                                                                                <fo:table-cell>
2507                                                                                                        <fo:block>
2508                                                                                                                <fo:basic-link external-destination="url({$url_densityOil})">Density crude oil</fo:basic-link>
2509                                                                                                        </fo:block>
2510                                                                                                        <fo:block>
2511                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom)"><fo:inline>
2512<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom"/>
2513</fo:inline></xsl:if>
2514                                                                                                        </fo:block>
2515                                                                                                </fo:table-cell>
2516                                                                                                <fo:table-cell>
2517                                                                                                        <fo:block>
2518                                                                                                                <fo:basic-link external-destination="url({$url_flowRateOil})">Oil flow rate</fo:basic-link>
2519                                                                                                        </fo:block>
2520                                                                                                        <fo:block>
2521                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom)"><fo:inline>
2522<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom"/>
2523</fo:inline></xsl:if>
2524                                                                                                        </fo:block>
2525                                                                                                </fo:table-cell>
2526                                                                                                <fo:table-cell>
2527                                                                                                        <fo:block>
2528                                                                                                                <fo:basic-link external-destination="url({$url_flowRateGas})">Gas flow rate M</fo:basic-link>
2529                                                                                                        </fo:block>
2530                                                                                                        <fo:block>
2531                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom)"><fo:inline>
2532<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom"/>
2533</fo:inline></xsl:if>
2534                                                                                                        </fo:block>
2535                                                                                                </fo:table-cell>
2536                                                                                                <fo:table-cell>
2537                                                                                                        <fo:block>
2538                                                                                                                <fo:basic-link external-destination="url({$url_flowRateWater})">Water flow rate</fo:basic-link>
2539                                                                                                        </fo:block>
2540                                                                                                        <fo:block>
2541                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom)"><fo:inline>
2542<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom"/>
2543</fo:inline></xsl:if>
2544                                                                                                        </fo:block>
2545                                                                                                </fo:table-cell>
2546                                                                                                <fo:table-cell>
2547                                                                                                        <fo:block>
2548                                                                                                                <fo:basic-link external-destination="url({$url_presShutIn})">Shut in pressure</fo:basic-link>
2549                                                                                                        </fo:block>
2550                                                                                                        <fo:block>
2551                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom)"><fo:inline>
2552<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom"/>
2553</fo:inline></xsl:if>
2554                                                                                                        </fo:block>
2555                                                                                                </fo:table-cell>
2556                                                                                                <fo:table-cell>
2557                                                                                                        <fo:block>
2558                                                                                                                <fo:basic-link external-destination="url({$url_presFlowing})">Flow pressure</fo:basic-link>
2559                                                                                                        </fo:block>
2560                                                                                                        <fo:block>
2561                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom)"><fo:inline>
2562<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom"/>
2563</fo:inline></xsl:if>
2564                                                                                                        </fo:block>
2565                                                                                                </fo:table-cell>
2566                                                                                                <fo:table-cell>
2567                                                                                                        <fo:block>
2568                                                                                                                <fo:basic-link external-destination="url({$url_presBottom})">Bottom hole pressure</fo:basic-link>
2569                                                                                                        </fo:block>
2570                                                                                                        <fo:block>
2571                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom)"><fo:inline>
2572<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom"/>
2573</fo:inline></xsl:if>
2574                                                                                                        </fo:block>
2575                                                                                                </fo:table-cell>
2576                                                                                                <fo:table-cell>
2577                                                                                                        <fo:block>
2578                                                                                                                <fo:basic-link external-destination="url({$url_gasOilRatio})">Gas oil ratio</fo:basic-link>
2579                                                                                                        </fo:block>
2580                                                                                                        <fo:block>
2581                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom)"><fo:inline>
2582<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom"/>
2583</fo:inline></xsl:if>
2584                                                                                                        </fo:block>
2585                                                                                                </fo:table-cell>
2586                                                                                                <fo:table-cell>
2587                                                                                                        <fo:block>
2588                                                                                                                <fo:basic-link external-destination="url({$url_waterOilRatio})">Water oil ratio</fo:basic-link>
2589                                                                                                        </fo:block>
2590                                                                                                        <fo:block>
2591                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom)"><fo:inline>
2592<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom"/>
2593</fo:inline></xsl:if>
2594                                                                                                        </fo:block>
2595                                                                                                </fo:table-cell>
2596                                                                                                <fo:table-cell>
2597                                                                                                        <fo:block>
2598                                                                                                                <fo:basic-link external-destination="url({$url_chloride})">Chloride content</fo:basic-link>
2599                                                                                                        </fo:block>
2600                                                                                                        <fo:block>
2601                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom)"><fo:inline>
2602<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom"/>
2603</fo:inline></xsl:if>
2604                                                                                                        </fo:block>
2605                                                                                                </fo:table-cell>
2606                                                                                                <fo:table-cell>
2607                                                                                                        <fo:block>
2608                                                                                                                <fo:basic-link external-destination="url({$url_carbonDioxide})">CO2 content</fo:basic-link>
2609                                                                                                        </fo:block>
2610                                                                                                        <fo:block>
2611                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom)"><fo:inline>
2612<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom"/>
2613</fo:inline></xsl:if>
2614                                                                                                        </fo:block>
2615                                                                                                </fo:table-cell>
2616                                                                                                <fo:table-cell>
2617                                                                                                        <fo:block>
2618                                                                                                                <fo:basic-link external-destination="url({$url_hydrogenSulfide})">H2S content</fo:basic-link>
2619                                                                                                        </fo:block>
2620                                                                                                        <fo:block>
2621                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom)"><fo:inline>
2622<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom"/>
2623</fo:inline></xsl:if>
2624                                                                                                        </fo:block>
2625                                                                                                </fo:table-cell>
2626                                                                                        </fo:table-row>
2627                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo">
2628<fo:table-row>
2629                                                                                                <fo:table-cell>
2630                                                                                                        <fo:block>
2631                                                                                                                <xsl:if test="string(substring-after(substring(witsml:dTim, 0, 17), 'T'))"><fo:inline>
2632<xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
2633</fo:inline></xsl:if>
2634                                                                                                        </fo:block>
2635                                                                                                </fo:table-cell>
2636                                                                                                <fo:table-cell>
2637                                                                                                        <fo:block>
2638                                                                                                                <xsl:if test="string(witsml:testNumber)"><fo:inline>
2639<xsl:value-of select="witsml:testNumber"/>
2640</fo:inline></xsl:if>
2641                                                                                                        </fo:block>
2642                                                                                                </fo:table-cell>
2643                                                                                                <fo:table-cell>
2644                                                                                                        <fo:block>
2645                                                                                                                <xsl:if test="string(witsml:testType)"><fo:inline>
2646<xsl:value-of select="witsml:testType"/>
2647</fo:inline></xsl:if>
2648                                                                                                        </fo:block>
2649                                                                                                </fo:table-cell>
2650                                                                                                <fo:table-cell>
2651                                                                                                        <fo:block>
2652                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2653<xsl:value-of select="witsml:mdTop"/>
2654</fo:inline></xsl:if>
2655                                                                                                        </fo:block>
2656                                                                                                </fo:table-cell>
2657                                                                                                <fo:table-cell>
2658                                                                                                        <fo:block>
2659                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2660<xsl:value-of select="witsml:mdBottom"/>
2661</fo:inline></xsl:if>
2662                                                                                                        </fo:block>
2663                                                                                                </fo:table-cell>
2664                                                                                                <fo:table-cell>
2665                                                                                                        <fo:block>
2666                                                                                                                <xsl:if test="string(witsml:chokeOrificeSize)"><fo:inline>
2667<xsl:value-of select="witsml:chokeOrificeSize"/>
2668</fo:inline></xsl:if>
2669                                                                                                        </fo:block>
2670                                                                                                </fo:table-cell>
2671                                                                                                <fo:table-cell>
2672                                                                                                        <fo:block>
2673                                                                                                                <xsl:if test="string(witsml:densityOil)"><fo:inline>
2674<xsl:value-of select="witsml:densityOil"/>
2675</fo:inline></xsl:if>
2676                                                                                                        </fo:block>
2677                                                                                                </fo:table-cell>
2678                                                                                                <fo:table-cell>
2679                                                                                                        <fo:block>
2680                                                                                                                <xsl:if test="string(witsml:flowRateOil)"><fo:inline>
2681<xsl:value-of select="witsml:flowRateOil"/>
2682</fo:inline></xsl:if>
2683                                                                                                        </fo:block>
2684                                                                                                </fo:table-cell>
2685                                                                                                <fo:table-cell>
2686                                                                                                        <fo:block>
2687                                                                                                                <xsl:if test="string(witsml:flowRateGas)"><fo:inline>
2688<xsl:value-of select="witsml:flowRateGas"/>
2689</fo:inline></xsl:if>
2690                                                                                                        </fo:block>
2691                                                                                                </fo:table-cell>
2692                                                                                                <fo:table-cell>
2693                                                                                                        <fo:block>
2694                                                                                                                <xsl:if test="string(witsml:flowRateWater)"><fo:inline>
2695<xsl:value-of select="witsml:flowRateWater"/>
2696</fo:inline></xsl:if>
2697                                                                                                        </fo:block>
2698                                                                                                </fo:table-cell>
2699                                                                                                <fo:table-cell>
2700                                                                                                        <fo:block>
2701                                                                                                                <xsl:if test="string(witsml:presShutIn)"><fo:inline>
2702<xsl:value-of select="witsml:presShutIn"/>
2703</fo:inline></xsl:if>
2704                                                                                                        </fo:block>
2705                                                                                                </fo:table-cell>
2706                                                                                                <fo:table-cell>
2707                                                                                                        <fo:block>
2708                                                                                                                <xsl:if test="string(witsml:presFlowing)"><fo:inline>
2709<xsl:value-of select="witsml:presFlowing"/>
2710</fo:inline></xsl:if>
2711                                                                                                        </fo:block>
2712                                                                                                </fo:table-cell>
2713                                                                                                <fo:table-cell>
2714                                                                                                        <fo:block>
2715                                                                                                                <xsl:if test="string(witsml:presBottom)"><fo:inline>
2716<xsl:value-of select="witsml:presBottom"/>
2717</fo:inline></xsl:if>
2718                                                                                                        </fo:block>
2719                                                                                                </fo:table-cell>
2720                                                                                                <fo:table-cell>
2721                                                                                                        <fo:block>
2722                                                                                                                <xsl:if test="string(witsml:gasOilRatio)"><fo:inline>
2723<xsl:value-of select="witsml:gasOilRatio"/>
2724</fo:inline></xsl:if>
2725                                                                                                        </fo:block>
2726                                                                                                </fo:table-cell>
2727                                                                                                <fo:table-cell>
2728                                                                                                        <fo:block>
2729                                                                                                                <xsl:if test="string(witsml:waterOilRatio)"><fo:inline>
2730<xsl:value-of select="witsml:waterOilRatio"/>
2731</fo:inline></xsl:if>
2732                                                                                                        </fo:block>
2733                                                                                                </fo:table-cell>
2734                                                                                                <fo:table-cell>
2735                                                                                                        <fo:block>
2736                                                                                                                <xsl:if test="string(witsml:chloride)"><fo:inline>
2737<xsl:value-of select="witsml:chloride"/>
2738</fo:inline></xsl:if>
2739                                                                                                        </fo:block>
2740                                                                                                </fo:table-cell>
2741                                                                                                <fo:table-cell>
2742                                                                                                        <fo:block>
2743                                                                                                                <xsl:if test="string(witsml:carbonDioxide)"><fo:inline>
2744<xsl:value-of select="witsml:carbonDioxide"/>
2745</fo:inline></xsl:if>
2746                                                                                                        </fo:block>
2747                                                                                                </fo:table-cell>
2748                                                                                                <fo:table-cell>
2749                                                                                                        <fo:block>
2750                                                                                                                <xsl:if test="string(witsml:hydrogenSulfide)"><fo:inline>
2751<xsl:value-of select="witsml:hydrogenSulfide"/>
2752</fo:inline></xsl:if>
2753                                                                                                        </fo:block>
2754                                                                                                </fo:table-cell>
2755                                                                                        </fo:table-row>
2756</xsl:for-each>
2757                                                                                </fo:table-body>
2758                                                                        </fo:table> </fo:block>
2759                                                        </fo:table-cell>
2760                                                </fo:table-row>
2761                                        </fo:table-body>
2762                                </fo:table>
2763                        </fo:block>
2764<xslt:comment> Formation Test </xslt:comment>
2765                        <fo:block>
2766                                <xsl:variable name="element_drillReportFormTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportFormTestInfo']/xsd:sequence"/>
2767                                <xsl:variable name="url_md">
2768                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
2769                                </xsl:variable>
2770                                <xsl:variable name="url_presPore">
2771                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='presPore']/@sawsdl:modelReference"/>
2772                                </xsl:variable>
2773                                <xsl:variable name="url_goodSealm">
2774                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='goodSeal']/@sawsdl:modelReference"/>
2775                                </xsl:variable>
2776                                <xsl:variable name="url_mdSample">
2777                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='mdSample']/@sawsdl:modelReference"/>
2778                                </xsl:variable>
2779                                <xsl:variable name="url_dominateComponent">
2780                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='dominateComponent']/@sawsdl:modelReference"/>
2781                                </xsl:variable>
2782                                <xsl:variable name="url_densityHC">
2783                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='densityHC']/@sawsdl:modelReference"/>
2784                                </xsl:variable>
2785                                <xsl:variable name="url_volumeSample">
2786                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='volumeSample']/@sawsdl:modelReference"/>
2787                                </xsl:variable>
2788                                <xsl:variable name="url_description">
2789                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
2790                                </xsl:variable>
2791                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2792                                <fo:leader/>
2793                                <fo:table>
2794                                        <fo:table-column column-width="100%"/>
2795                                        <fo:table-body>
2796                                                <fo:table-row font-weight="bold" font-size="14pt">
2797                                                        <fo:table-cell>
2798                                                                <fo:block>
2799                                                                        Formation Test
2800                                                                </fo:block>
2801                                                        </fo:table-cell>
2802                                                </fo:table-row>
2803                                                <fo:table-row>
2804                                                        <fo:table-cell>
2805                                                                <fo:block> </fo:block>
2806                                                        </fo:table-cell>
2807                                                </fo:table-row>
2808                                                <fo:table-row>
2809                                                        <fo:table-cell>
2810                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2811                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2812                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2813                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2814                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2815                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2816                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2817                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2818                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2819                                                                                <fo:table-body>
2820                                                                                        <fo:table-row font-weight="bold">
2821                                                                                                <fo:table-cell>
2822                                                                                                        <fo:block>
2823                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
2824                                                                                                        </fo:block>
2825                                                                                                        <fo:block>mMD</fo:block>
2826                                                                                                </fo:table-cell>
2827                                                                                                <fo:table-cell>
2828                                                                                                        <fo:block>
2829                                                                                                                <fo:basic-link external-destination="url({$url_presPore})">Formation pore pressure</fo:basic-link>
2830                                                                                                        </fo:block>
2831                                                                                                        <fo:block>
2832                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom)"><fo:inline>
2833<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom"/>
2834</fo:inline></xsl:if>
2835                                                                                                        </fo:block>
2836                                                                                                </fo:table-cell>
2837                                                                                                <fo:table-cell>
2838                                                                                                        <fo:block>
2839                                                                                                                <fo:basic-link external-destination="url({$url_goodSealm})">Good seal ind</fo:basic-link>
2840                                                                                                        </fo:block>
2841                                                                                                </fo:table-cell>
2842                                                                                                <fo:table-cell>
2843                                                                                                        <fo:block>
2844                                                                                                                <fo:basic-link external-destination="url({$url_mdSample})">Depth to sample point</fo:basic-link>
2845                                                                                                        </fo:block>
2846                                                                                                        <fo:block>
2847                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom)"><fo:inline>
2848<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom"/>
2849</fo:inline></xsl:if>
2850                                                                                                        </fo:block>
2851                                                                                                </fo:table-cell>
2852                                                                                                <fo:table-cell>
2853                                                                                                        <fo:block>
2854                                                                                                                <fo:basic-link external-destination="url({$url_dominateComponent})">Dominate fluid component</fo:basic-link>
2855                                                                                                        </fo:block>
2856                                                                                                </fo:table-cell>
2857                                                                                                <fo:table-cell>
2858                                                                                                        <fo:block>
2859                                                                                                                <fo:basic-link external-destination="url({$url_densityHC})">HC Component density</fo:basic-link>
2860                                                                                                        </fo:block>
2861                                                                                                        <fo:block>
2862                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom)"><fo:inline>
2863<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom"/>
2864</fo:inline></xsl:if>
2865                                                                                                        </fo:block>
2866                                                                                                </fo:table-cell>
2867                                                                                                <fo:table-cell>
2868                                                                                                        <fo:block>
2869                                                                                                                <fo:basic-link external-destination="url({$url_volumeSample})">Sample volume</fo:basic-link>
2870                                                                                                        </fo:block>
2871                                                                                                        <fo:block>
2872                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom)"><fo:inline>
2873<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom"/>
2874</fo:inline></xsl:if>
2875                                                                                                        </fo:block>
2876                                                                                                </fo:table-cell>
2877                                                                                                <fo:table-cell>
2878                                                                                                        <fo:block>
2879                                                                                                                <fo:basic-link external-destination="url({$url_description})">Description</fo:basic-link>
2880                                                                                                        </fo:block>
2881                                                                                                </fo:table-cell>
2882                                                                                        </fo:table-row>
2883                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo">
2884<fo:table-row>
2885                                                                                                <fo:table-cell>
2886                                                                                                        <fo:block>
2887                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
2888<xsl:value-of select="witsml:md"/>
2889</fo:inline></xsl:if>
2890                                                                                                        </fo:block>
2891                                                                                                </fo:table-cell>
2892                                                                                                <fo:table-cell>
2893                                                                                                        <fo:block>
2894                                                                                                                <xsl:if test="string(witsml:presPore)"><fo:inline>
2895<xsl:value-of select="witsml:presPore"/>
2896</fo:inline></xsl:if>
2897                                                                                                        </fo:block>
2898                                                                                                </fo:table-cell>
2899                                                                                                <fo:table-cell>
2900                                                                                                        <fo:block>
2901                                                                                                                <xsl:if test="witsml:goodSeal='true' or witsml:goodSeal='1'">yes</xsl:if>
2902                                                                                                                <xsl:if test="witsml:goodSeal='false' or witsml:goodSeal='0'">no</xsl:if>
2903                                                                                                        </fo:block>
2904                                                                                                </fo:table-cell>
2905                                                                                                <fo:table-cell>
2906                                                                                                        <fo:block>
2907                                                                                                                <xsl:if test="string(witsml:mdSample)"><fo:inline>
2908<xsl:value-of select="witsml:mdSample"/>
2909</fo:inline></xsl:if>
2910                                                                                                        </fo:block>
2911                                                                                                </fo:table-cell>
2912                                                                                                <fo:table-cell>
2913                                                                                                        <fo:block>
2914                                                                                                                <xsl:if test="string(witsml:dominateComponent)"><fo:inline>
2915<xsl:value-of select="witsml:dominateComponent"/>
2916</fo:inline></xsl:if>
2917                                                                                                        </fo:block>
2918                                                                                                </fo:table-cell>
2919                                                                                                <fo:table-cell>
2920                                                                                                        <fo:block>
2921                                                                                                                <xsl:if test="string(witsml:densityHC)"><fo:inline>
2922<xsl:value-of select="witsml:densityHC"/>
2923</fo:inline></xsl:if>
2924                                                                                                        </fo:block>
2925                                                                                                </fo:table-cell>
2926                                                                                                <fo:table-cell>
2927                                                                                                        <fo:block>
2928                                                                                                                <xsl:if test="string(witsml:volumeSample)"><fo:inline>
2929<xsl:value-of select="witsml:volumeSample"/>
2930</fo:inline></xsl:if>
2931                                                                                                        </fo:block>
2932                                                                                                </fo:table-cell>
2933                                                                                                <fo:table-cell>
2934                                                                                                        <fo:block>
2935                                                                                                                <xsl:if test="string(witsml:description)"><fo:inline>
2936<xsl:value-of select="witsml:description"/>
2937</fo:inline></xsl:if>
2938                                                                                                        </fo:block>
2939                                                                                                </fo:table-cell>
2940                                                                                        </fo:table-row>
2941</xsl:for-each>
2942                                                                                </fo:table-body>
2943                                                                        </fo:table> </fo:block>
2944                                                        </fo:table-cell>
2945                                                </fo:table-row>
2946                                        </fo:table-body>
2947                                </fo:table>
2948                        </fo:block>
2949<xslt:comment> Stratigraphic Information </xslt:comment>
2950                        <fo:block break-before="page">
2951                                <xsl:variable name="element_drillReportStratInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStratInfo']/xsd:sequence"/>
2952                                <xsl:variable name="url_mdTop">
2953                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2954                                </xsl:variable>
2955                                <xsl:variable name="url_tvdTop">
2956                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
2957                                </xsl:variable>
2958                                <xsl:variable name="url_description">
2959                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
2960                                </xsl:variable>
2961                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2962                                <fo:leader/>
2963                                <fo:table>
2964                                        <fo:table-column column-width="100%"/>
2965                                        <fo:table-body>
2966                                                <fo:table-row font-weight="bold" font-size="14pt">
2967                                                        <fo:table-cell>
2968                                                                <fo:block>
2969                                                                        Stratigraphic Information
2970                                                                </fo:block>
2971                                                        </fo:table-cell>
2972                                                </fo:table-row>
2973                                                <fo:table-row>
2974                                                        <fo:table-cell>
2975                                                                <fo:block> </fo:block>
2976                                                        </fo:table-cell>
2977                                                </fo:table-row>
2978                                                <fo:table-row>
2979                                                        <fo:table-cell>
2980                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2981                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2982                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2983                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2984                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2985                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2986                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2987                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2988                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2989                                                                                <fo:table-body>
2990                                                                                        <fo:table-row font-weight="bold" height="29.680px" overflow="hidden">
2991                                                                                                <fo:table-cell>
2992                                                                                                        <fo:block>
2993                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top of formation</fo:basic-link>
2994                                                                                                        </fo:block>
2995                                                                                                        <fo:block>mMD</fo:block>
2996                                                                                                </fo:table-cell>
2997                                                                                                <fo:table-cell>
2998                                                                                                        <fo:block>
2999                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top of formation</fo:basic-link>
3000                                                                                                        </fo:block>
3001                                                                                                        <fo:block>mTVD</fo:block>
3002                                                                                                </fo:table-cell>
3003                                                                                                <fo:table-cell>
3004                                                                                                        <fo:block>
3005                                                                                                                <fo:basic-link external-destination="url({$url_description})">Formation name</fo:basic-link>
3006                                                                                                        </fo:block>
3007                                                                                                </fo:table-cell>
3008                                                                                                <fo:table-cell>
3009                                                                                                        <fo:block> </fo:block>
3010                                                                                                </fo:table-cell>
3011                                                                                                <fo:table-cell>
3012                                                                                                        <fo:block> </fo:block>
3013                                                                                                </fo:table-cell>
3014                                                                                                <fo:table-cell>
3015                                                                                                        <fo:block> </fo:block>
3016                                                                                                </fo:table-cell>
3017                                                                                                <fo:table-cell>
3018                                                                                                        <fo:block> </fo:block>
3019                                                                                                </fo:table-cell>
3020                                                                                                <fo:table-cell>
3021                                                                                                        <fo:block> </fo:block>
3022                                                                                                </fo:table-cell>
3023                                                                                        </fo:table-row>
3024                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:stratInfo">
3025<fo:table-row>
3026                                                                                                <fo:table-cell>
3027                                                                                                        <fo:block>
3028                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3029<xsl:value-of select="witsml:mdTop"/>
3030</fo:inline></xsl:if>
3031                                                                                                        </fo:block>
3032                                                                                                </fo:table-cell>
3033                                                                                                <fo:table-cell>
3034                                                                                                        <fo:block>
3035                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3036<xsl:value-of select="witsml:tvdTop"/>
3037</fo:inline></xsl:if>
3038                                                                                                        </fo:block>
3039                                                                                                </fo:table-cell>
3040                                                                                                <fo:table-cell>
3041                                                                                                        <fo:block>
3042                                                                                                                <xsl:if test="string(witsml:description)"><fo:inline>
3043<xsl:value-of select="witsml:description"/>
3044</fo:inline></xsl:if>
3045                                                                                                        </fo:block>
3046                                                                                                </fo:table-cell>
3047                                                                                                <fo:table-cell>
3048                                                                                                        <fo:block> </fo:block>
3049                                                                                                </fo:table-cell>
3050                                                                                                <fo:table-cell>
3051                                                                                                        <fo:block> </fo:block>
3052                                                                                                </fo:table-cell>
3053                                                                                                <fo:table-cell>
3054                                                                                                        <fo:block> </fo:block>
3055                                                                                                </fo:table-cell>
3056                                                                                                <fo:table-cell>
3057                                                                                                        <fo:block> </fo:block>
3058                                                                                                </fo:table-cell>
3059                                                                                                <fo:table-cell>
3060                                                                                                        <fo:block> </fo:block>
3061                                                                                                </fo:table-cell>
3062                                                                                        </fo:table-row>
3063</xsl:for-each>
3064                                                                                </fo:table-body>
3065                                                                        </fo:table> </fo:block>
3066                                                        </fo:table-cell>
3067                                                </fo:table-row>
3068                                        </fo:table-body>
3069                                </fo:table>
3070                        </fo:block>
3071<xslt:comment> Lithology Information </xslt:comment>
3072                        <fo:block>
3073                                <xsl:variable name="element_drillReportLithShowInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLithShowInfo']/xsd:sequence"/>
3074                                <xsl:variable name="url_mdTop">
3075                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3076                                </xsl:variable>
3077                                <xsl:variable name="url_mdBottom">
3078                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3079                                </xsl:variable>
3080                                <xsl:variable name="url_tvdTop">
3081                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3082                                </xsl:variable>
3083                                <xsl:variable name="url_tvdBottom">
3084                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3085                                </xsl:variable>
3086                                <xsl:variable name="url_show">
3087                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='show']/@sawsdl:modelReference"/>
3088                                </xsl:variable>
3089                                <xsl:variable name="url_lithology">
3090                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='lithology']/@sawsdl:modelReference"/>
3091                                </xsl:variable>
3092                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3093                                <fo:leader/>
3094                                <fo:table>
3095                                        <fo:table-column column-width="100%"/>
3096                                        <fo:table-body>
3097                                                <fo:table-row font-weight="bold" font-size="14pt">
3098                                                        <fo:table-cell>
3099                                                                <fo:block>
3100                                                                        Lithology Information
3101                                                                </fo:block>
3102                                                        </fo:table-cell>
3103                                                </fo:table-row>
3104                                                <fo:table-row>
3105                                                        <fo:table-cell>
3106                                                                <fo:block> </fo:block>
3107                                                        </fo:table-cell>
3108                                                </fo:table-row>
3109                                                <fo:table-row>
3110                                                        <fo:table-cell>
3111                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3112                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="1"/>
3113                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="2"/>
3114                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="3"/>
3115                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="4"/>
3116                                                                                <fo:table-column column-width="proportional-column-width(9)" column-number="5"/>
3117                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="6"/>
3118                                                                                <fo:table-column column-width="proportional-column-width(10)" column-number="7"/>
3119                                                                                <fo:table-column column-width="proportional-column-width(35)" column-number="8"/>
3120                                                                                <fo:table-body>
3121                                                                                        <fo:table-row font-weight="bold">
3122                                                                                                <fo:table-cell>
3123                                                                                                        <fo:block>
3124                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Start Depth</fo:basic-link>
3125                                                                                                        </fo:block>
3126                                                                                                        <fo:block>mMD</fo:block>
3127                                                                                                </fo:table-cell>
3128                                                                                                <fo:table-cell>
3129                                                                                                        <fo:block>
3130                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">End Depth</fo:basic-link>
3131                                                                                                        </fo:block>
3132                                                                                                        <fo:block>mMD</fo:block>
3133                                                                                                </fo:table-cell>
3134                                                                                                <fo:table-cell>
3135                                                                                                        <fo:block>
3136                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Difference in Depth</fo:basic-link>
3137                                                                                                        </fo:block>
3138                                                                                                        <fo:block>mMD</fo:block>
3139                                                                                                </fo:table-cell>
3140                                                                                                <fo:table-cell>
3141                                                                                                        <fo:block>
3142                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Start Depth</fo:basic-link>
3143                                                                                                        </fo:block>
3144                                                                                                        <fo:block>mTVD</fo:block>
3145                                                                                                </fo:table-cell>
3146                                                                                                <fo:table-cell>
3147                                                                                                        <fo:block>
3148                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">End Depth</fo:basic-link>
3149                                                                                                        </fo:block>
3150                                                                                                        <fo:block>mTVD</fo:block>
3151                                                                                                </fo:table-cell>
3152                                                                                                <fo:table-cell>
3153                                                                                                        <fo:block>
3154                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Difference in Depth</fo:basic-link>
3155                                                                                                        </fo:block>
3156                                                                                                        <fo:block>mTVD</fo:block>
3157                                                                                                </fo:table-cell>
3158                                                                                                <fo:table-cell>
3159                                                                                                        <fo:block>
3160                                                                                                                <fo:basic-link external-destination="url({$url_show})">Shows Description</fo:basic-link>
3161                                                                                                        </fo:block>
3162                                                                                                </fo:table-cell>
3163                                                                                                <fo:table-cell>
3164                                                                                                        <fo:block>
3165                                                                                                                <fo:basic-link external-destination="url({$url_lithology})">Lithology Description</fo:basic-link>
3166                                                                                                        </fo:block>
3167                                                                                                </fo:table-cell>
3168                                                                                        </fo:table-row>
3169                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:lithShowInfo">
3170<fo:table-row>
3171                                                                                                <fo:table-cell>
3172                                                                                                        <fo:block>
3173                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3174<xsl:value-of select="witsml:mdTop"/>
3175</fo:inline></xsl:if>
3176                                                                                                        </fo:block>
3177                                                                                                </fo:table-cell>
3178                                                                                                <fo:table-cell>
3179                                                                                                        <fo:block>
3180                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3181<xsl:value-of select="witsml:mdBottom"/>
3182</fo:inline></xsl:if>
3183                                                                                                        </fo:block>
3184                                                                                                </fo:table-cell>
3185                                                                                                <fo:table-cell>
3186                                                                                                        <fo:block>
3187                                                                                                                <xsl:if test="string(witsml:mdBottom - witsml:mdTop)"><fo:inline>
3188<xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
3189</fo:inline></xsl:if>
3190                                                                                                        </fo:block>
3191                                                                                                </fo:table-cell>
3192                                                                                                <fo:table-cell>
3193                                                                                                        <fo:block>
3194                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3195<xsl:value-of select="witsml:tvdTop"/>
3196</fo:inline></xsl:if>
3197                                                                                                        </fo:block>
3198                                                                                                </fo:table-cell>
3199                                                                                                <fo:table-cell>
3200                                                                                                        <fo:block>
3201                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3202<xsl:value-of select="witsml:tvdBottom"/>
3203</fo:inline></xsl:if>
3204                                                                                                        </fo:block>
3205                                                                                                </fo:table-cell>
3206                                                                                                <fo:table-cell>
3207                                                                                                        <fo:block>
3208                                                                                                                <xsl:if test="string(witsml:tvdBottom - witsml:tvdTop)"><fo:inline>
3209<xsl:value-of select="witsml:tvdBottom - witsml:tvdTop"/>
3210</fo:inline></xsl:if>
3211                                                                                                        </fo:block>
3212                                                                                                </fo:table-cell>
3213                                                                                                <fo:table-cell>
3214                                                                                                        <fo:block>
3215                                                                                                                <xsl:if test="string(witsml:show)"><fo:inline>
3216<xsl:value-of select="witsml:show"/>
3217</fo:inline></xsl:if>
3218                                                                                                        </fo:block>
3219                                                                                                </fo:table-cell>
3220                                                                                                <fo:table-cell>
3221                                                                                                        <fo:block>
3222                                                                                                                <xsl:if test="string(witsml:lithology)"><fo:inline>
3223<xsl:value-of select="witsml:lithology"/>
3224</fo:inline></xsl:if>
3225                                                                                                        </fo:block>
3226                                                                                                </fo:table-cell>
3227                                                                                        </fo:table-row>
3228</xsl:for-each>
3229                                                                                </fo:table-body>
3230                                                                        </fo:table> </fo:block>
3231                                                        </fo:table-cell>
3232                                                </fo:table-row>
3233                                        </fo:table-body>
3234                                </fo:table>
3235                        </fo:block>
3236<xslt:comment> Well Control Incident </xslt:comment>
3237                <fo:block break-before="page">
3238                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:controlIncidentInfo">
3239<fo:block>
3240                                        <xsl:variable name="element_drillReportControlIncidentInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportControlIncidentInfo']/xsd:sequence"/>
3241                                        <xsl:variable name="url_dTim">
3242                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
3243                                        </xsl:variable>
3244                                        <xsl:variable name="url_mdInflow">
3245                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdInflow']/@sawsdl:modelReference"/>
3246                                        </xsl:variable>
3247                                        <xsl:variable name="url_tvdInflow">
3248                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tvdInflow']/@sawsdl:modelReference"/>
3249                                        </xsl:variable>
3250                                        <xsl:variable name="url_eTimLost">
3251                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='eTimLost']/@sawsdl:modelReference"/>
3252                                        </xsl:variable>
3253                                        <xsl:variable name="url_dTimRegained">
3254                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTimRegained']/@sawsdl:modelReference"/>
3255                                        </xsl:variable>
3256                                        <xsl:variable name="url_mdBit">
3257                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdBit']/@sawsdl:modelReference"/>
3258                                        </xsl:variable>
3259                                        <xsl:variable name="url_wtMud">
3260                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='wtMud']/@sawsdl:modelReference"/>
3261                                        </xsl:variable>
3262                                        <xsl:variable name="url_porePressure">
3263                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='porePressure']/@sawsdl:modelReference"/>
3264                                        </xsl:variable>
3265                                        <xsl:variable name="url_mdCsgLast">
3266                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
3267                                        </xsl:variable>
3268                                        <xsl:variable name="url_volMudGained">
3269                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='volMudGained']/@sawsdl:modelReference"/>
3270                                        </xsl:variable>
3271                                        <xsl:variable name="url_presShutInCasing">
3272                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInCasing']/@sawsdl:modelReference"/>
3273                                        </xsl:variable>
3274                                        <xsl:variable name="url_presShutInDrill">
3275                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInDrill']/@sawsdl:modelReference"/>
3276                                        </xsl:variable>
3277                                        <xsl:variable name="url_incidentType">
3278                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='incidentType']/@sawsdl:modelReference"/>
3279                                        </xsl:variable>
3280                                        <xsl:variable name="url_killingType">
3281                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='killingType']/@sawsdl:modelReference"/>
3282                                        </xsl:variable>
3283                                        <xsl:variable name="url_formation">
3284                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='formation']/@sawsdl:modelReference"/>
3285                                        </xsl:variable>
3286                                        <xsl:variable name="url_tempBottom">
3287                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tempBottom']/@sawsdl:modelReference"/>
3288                                        </xsl:variable>
3289                                        <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3290                                        <fo:leader/>
3291                                        <fo:table>
3292                                                <fo:table-column column-width="100%"/>
3293                                                <fo:table-body>
3294                                                        <fo:table-row font-weight="bold" font-size="14pt">
3295                                                                <fo:table-cell>
3296                                                                        <fo:block>
3297                                                                        Well Control Incident
3298                                                                </fo:block>
3299                                                                </fo:table-cell>
3300                                                        </fo:table-row>
3301                                                        <fo:table-row height="13.840px" overflow="hidden">
3302                                                                <fo:table-cell>
3303                                                                        <fo:block> </fo:block>
3304                                                                </fo:table-cell>
3305                                                        </fo:table-row>
3306                                                        <fo:table-row>
3307                                                                <fo:table-cell>
3308                                                                        <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3309                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="1"/>
3310                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="2"/>
3311                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="3"/>
3312                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="4"/>
3313                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="5"/>
3314                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="6"/>
3315                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="7"/>
3316                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="8"/>
3317                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="9"/>
3318                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="10"/>
3319                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="11"/>
3320                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="12"/>
3321                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="13"/>
3322                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="14"/>
3323                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="15"/>
3324                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="16"/>
3325                                                                                        <fo:table-body>
3326                                                                                                <fo:table-row font-weight="bold">
3327                                                                                                        <fo:table-cell>
3328                                                                                                                <fo:block>
3329                                                                                                                        <fo:basic-link external-destination="url({$url_dTim})">Date</fo:basic-link>
3330                                                                                                                </fo:block>
3331                                                                                                        </fo:table-cell>
3332                                                                                                        <fo:table-cell>
3333                                                                                                                <fo:block>
3334                                                                                                                        <fo:basic-link external-destination="url({$url_mdInflow})">Depth of well</fo:basic-link>
3335                                                                                                                        <fo:block>mMD</fo:block>
3336                                                                                                                </fo:block>
3337                                                                                                        </fo:table-cell>
3338                                                                                                        <fo:table-cell>
3339                                                                                                                <fo:block>
3340                                                                                                                        <fo:basic-link external-destination="url({$url_tvdInflow})">Depth of well mTVD</fo:basic-link>
3341                                                                                                                </fo:block>
3342                                                                                                        </fo:table-cell>
3343                                                                                                        <fo:table-cell>
3344                                                                                                                <fo:block>
3345                                                                                                                        <fo:basic-link external-destination="url({$url_eTimLost})">Lost time</fo:basic-link>
3346                                                                                                                </fo:block>
3347                                                                                                                <fo:block>
3348                                                                                                                        <xsl:if test="string(witsml:eTimLost/@uom)"><fo:inline>
3349<xsl:value-of select="witsml:eTimLost/@uom"/>
3350</fo:inline></xsl:if>
3351                                                                                                                </fo:block>
3352                                                                                                        </fo:table-cell>
3353                                                                                                        <fo:table-cell>
3354                                                                                                                <fo:block>
3355                                                                                                                        <fo:basic-link external-destination="url({$url_dTimRegained})">Time for well control regain</fo:basic-link>
3356                                                                                                                </fo:block>
3357                                                                                                        </fo:table-cell>
3358                                                                                                        <fo:table-cell>
3359                                                                                                                <fo:block>
3360                                                                                                                        <fo:basic-link external-destination="url({$url_mdBit})">Depth at bit</fo:basic-link>
3361                                                                                                                        <fo:block>mMD</fo:block>
3362                                                                                                                </fo:block>
3363                                                                                                        </fo:table-cell>
3364                                                                                                        <fo:table-cell>
3365                                                                                                                <fo:block>
3366                                                                                                                        <fo:basic-link external-destination="url({$url_wtMud})">Drilling fluid density</fo:basic-link>
3367                                                                                                                </fo:block>
3368                                                                                                                <fo:block>
3369                                                                                                                        <xsl:if test="string(witsml:wtMud/@uom)"><fo:inline>
3370<xsl:value-of select="witsml:wtMud/@uom"/>
3371</fo:inline></xsl:if>
3372                                                                                                                </fo:block>
3373                                                                                                        </fo:table-cell>
3374                                                                                                        <fo:table-cell>
3375                                                                                                                <fo:block>
3376                                                                                                                        <fo:basic-link external-destination="url({$url_porePressure})">Pore pressure</fo:basic-link>
3377                                                                                                                </fo:block>
3378                                                                                                                <fo:block>
3379                                                                                                                        <xsl:if test="string(witsml:porePressure/@uom)"><fo:inline>
3380<xsl:value-of select="witsml:porePressure/@uom"/>
3381</fo:inline></xsl:if>
3382                                                                                                                </fo:block>
3383                                                                                                        </fo:table-cell>
3384                                                                                                        <fo:table-cell>
3385                                                                                                                <fo:block>
3386                                                                                                                        <fo:basic-link external-destination="url({$url_mdCsgLast})">Depth to casing</fo:basic-link>
3387                                                                                                                </fo:block>
3388                                                                                                                <fo:block>mMD</fo:block>
3389                                                                                                        </fo:table-cell>
3390                                                                                                        <fo:table-cell>
3391                                                                                                                <fo:block>
3392                                                                                                                        <fo:basic-link external-destination="url({$url_volMudGained})">Gained vol of Fluid</fo:basic-link>
3393                                                                                                                </fo:block>
3394                                                                                                                <fo:block>
3395                                                                                                                        <xsl:if test="string(witsml:volMudGain/@uom)"><fo:inline>
3396<xsl:value-of select="witsml:volMudGain/@uom"/>
3397</fo:inline></xsl:if>
3398                                                                                                                </fo:block>
3399                                                                                                        </fo:table-cell>
3400                                                                                                        <fo:table-cell>
3401                                                                                                                <fo:block>
3402                                                                                                                        <fo:basic-link external-destination="url({$url_presShutInCasing})">Shut in casing pressure</fo:basic-link>
3403                                                                                                                </fo:block>
3404                                                                                                                <fo:block>
3405                                                                                                                        <xsl:if test="string(witsml:presShutInCasing/@uom)"><fo:inline>
3406<xsl:value-of select="witsml:presShutInCasing/@uom"/>
3407</fo:inline></xsl:if>
3408                                                                                                                </fo:block>
3409                                                                                                        </fo:table-cell>
3410                                                                                                        <fo:table-cell>
3411                                                                                                                <fo:block>
3412                                                                                                                        <fo:basic-link external-destination="url({$url_presShutInDrill})">Shut in drill pipe pressure</fo:basic-link>
3413                                                                                                                </fo:block>
3414                                                                                                                <fo:block>
3415                                                                                                                        <xsl:if test="string(witsml:presShutInDrill/@uom)"><fo:inline>
3416<xsl:value-of select="witsml:presShutInDrill/@uom"/>
3417</fo:inline></xsl:if>
3418                                                                                                                </fo:block>
3419                                                                                                        </fo:table-cell>
3420                                                                                                        <fo:table-cell>
3421                                                                                                                <fo:block>
3422                                                                                                                        <fo:basic-link external-destination="url({$url_incidentType})">Incident class</fo:basic-link>
3423                                                                                                                </fo:block>
3424                                                                                                        </fo:table-cell>
3425                                                                                                        <fo:table-cell>
3426                                                                                                                <fo:block>
3427                                                                                                                        <fo:basic-link external-destination="url({$url_killingType})">Killing procd</fo:basic-link>
3428                                                                                                                </fo:block>
3429                                                                                                        </fo:table-cell>
3430                                                                                                        <fo:table-cell>
3431                                                                                                                <fo:block>
3432                                                                                                                        <fo:basic-link external-destination="url({$url_formation})">Formation</fo:basic-link>
3433                                                                                                                </fo:block>
3434                                                                                                        </fo:table-cell>
3435                                                                                                        <fo:table-cell>
3436                                                                                                                <fo:block>
3437                                                                                                                        <fo:basic-link external-destination="url({$url_tempBottom})">BHT</fo:basic-link>
3438                                                                                                                </fo:block>
3439                                                                                                        </fo:table-cell>
3440                                                                                                </fo:table-row>
3441                                                                                                <fo:table-row>
3442                                                                                                        <fo:table-cell>
3443                                                                                                                <fo:block>
3444                                                                                                                        <xsl:if test="string(substring-before(witsml:dTim, 'T'))"><fo:inline>
3445<xsl:value-of select="substring-before(witsml:dTim, 'T')"/>
3446</fo:inline></xsl:if>
3447                                                                                                                </fo:block>
3448                                                                                                        </fo:table-cell>
3449                                                                                                        <fo:table-cell>
3450                                                                                                                <fo:block>
3451                                                                                                                        <xsl:if test="string(witsml:mdInflow)"><fo:inline>
3452<xsl:value-of select="witsml:mdInflow"/>
3453</fo:inline></xsl:if>
3454                                                                                                                </fo:block>
3455                                                                                                        </fo:table-cell>
3456                                                                                                        <fo:table-cell>
3457                                                                                                                <fo:block>
3458                                                                                                                        <xsl:if test="string(witsml:tvdInFlow)"><fo:inline>
3459<xsl:value-of select="witsml:tvdInFlow"/>
3460</fo:inline></xsl:if>
3461                                                                                                                </fo:block>
3462                                                                                                        </fo:table-cell>
3463                                                                                                        <fo:table-cell>
3464                                                                                                                <fo:block>
3465                                                                                                                        <xsl:if test="string(witsml:eTimLost)"><fo:inline>
3466<xsl:value-of select="witsml:eTimLost"/>
3467</fo:inline></xsl:if>
3468                                                                                                                </fo:block>
3469                                                                                                        </fo:table-cell>
3470                                                                                                        <fo:table-cell>
3471                                                                                                                <fo:block>
3472                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimRegained, 0, 17), 'T'))"><fo:inline>
3473<xsl:value-of select="substring-after(substring(witsml:dTimRegained, 0, 17), 'T')"/>
3474</fo:inline></xsl:if>
3475                                                                                                                </fo:block>
3476                                                                                                        </fo:table-cell>
3477                                                                                                        <fo:table-cell>
3478                                                                                                                <fo:block>
3479                                                                                                                        <xsl:if test="string(witsml:mdBit)"><fo:inline>
3480<xsl:value-of select="witsml:mdBit"/>
3481</fo:inline></xsl:if>
3482                                                                                                                </fo:block>
3483                                                                                                        </fo:table-cell>
3484                                                                                                        <fo:table-cell>
3485                                                                                                                <fo:block>
3486                                                                                                                        <xsl:if test="string(witsml:wtMud)"><fo:inline>
3487<xsl:value-of select="witsml:wtMud"/>
3488</fo:inline></xsl:if>
3489                                                                                                                </fo:block>
3490                                                                                                        </fo:table-cell>
3491                                                                                                        <fo:table-cell>
3492                                                                                                                <fo:block>
3493                                                                                                                        <xsl:if test="string(witsml:porePressure)"><fo:inline>
3494<xsl:value-of select="witsml:porePressure"/>
3495</fo:inline></xsl:if>
3496                                                                                                                </fo:block>
3497                                                                                                        </fo:table-cell>
3498                                                                                                        <fo:table-cell>
3499                                                                                                                <fo:block>
3500                                                                                                                        <xsl:if test="string(witsml:mdCsgLast)"><fo:inline>
3501<xsl:value-of select="witsml:mdCsgLast"/>
3502</fo:inline></xsl:if>
3503                                                                                                                </fo:block>
3504                                                                                                        </fo:table-cell>
3505                                                                                                        <fo:table-cell>
3506                                                                                                                <fo:block>
3507                                                                                                                        <xsl:if test="string(witsml:volMudGained)"><fo:inline>
3508<xsl:value-of select="witsml:volMudGained"/>
3509</fo:inline></xsl:if>
3510                                                                                                                </fo:block>
3511                                                                                                        </fo:table-cell>
3512                                                                                                        <fo:table-cell>
3513                                                                                                                <fo:block>
3514                                                                                                                        <xsl:if test="string(witsml:presShutInCasing)"><fo:inline>
3515<xsl:value-of select="witsml:presShutInCasing"/>
3516</fo:inline></xsl:if>
3517                                                                                                                </fo:block>
3518                                                                                                        </fo:table-cell>
3519                                                                                                        <fo:table-cell>
3520                                                                                                                <fo:block>
3521                                                                                                                        <xsl:if test="string(witsml:presShutInDrill)"><fo:inline>
3522<xsl:value-of select="witsml:presShutInDrill"/>
3523</fo:inline></xsl:if>
3524                                                                                                                </fo:block>
3525                                                                                                        </fo:table-cell>
3526                                                                                                        <fo:table-cell>
3527                                                                                                                <fo:block>
3528                                                                                                                        <xsl:if test="string(witsml:incidentType)"><fo:inline>
3529<xsl:value-of select="witsml:incidentType"/>
3530</fo:inline></xsl:if>
3531                                                                                                                </fo:block>
3532                                                                                                        </fo:table-cell>
3533                                                                                                        <fo:table-cell>
3534                                                                                                                <fo:block>
3535                                                                                                                        <xsl:if test="string(witsml:killingType)"><fo:inline>
3536<xsl:value-of select="witsml:killingType"/>
3537</fo:inline></xsl:if>
3538                                                                                                                </fo:block>
3539                                                                                                        </fo:table-cell>
3540                                                                                                        <fo:table-cell>
3541                                                                                                                <fo:block>
3542                                                                                                                        <xsl:if test="string(witsml:formation)"><fo:inline>
3543<xsl:value-of select="witsml:formation"/>
3544</fo:inline></xsl:if>
3545                                                                                                                </fo:block>
3546                                                                                                        </fo:table-cell>
3547                                                                                                        <fo:table-cell>
3548                                                                                                                <fo:block>
3549                                                                                                                        <xsl:if test="string(witsml:tempBottom)"><fo:inline>
3550<xsl:value-of select="witsml:tempBottom"/>
3551</fo:inline></xsl:if>
3552                                                                                                                </fo:block>
3553                                                                                                        </fo:table-cell>
3554                                                                                                </fo:table-row>
3555                                                                                        </fo:table-body>
3556                                                                                </fo:table><fo:table>
3557                                                                                        <fo:table-body>
3558                                                                                                <fo:table-row>
3559                                                                                                        <fo:table-cell>
3560                                                                                                                <fo:block> </fo:block>
3561                                                                                                        </fo:table-cell>
3562                                                                                                </fo:table-row>
3563                                                                                                <fo:table-row>
3564                                                                                                        <fo:table-cell>
3565                                                                                                                <fo:block>
3566                                                                                                                        <xsl:if test="string(witsml:description)"><fo:inline>
3567<xsl:value-of select="witsml:description"/>
3568</fo:inline></xsl:if>
3569                                                                                                                </fo:block>
3570                                                                                                        </fo:table-cell>
3571                                                                                                </fo:table-row>
3572                                                                                        </fo:table-body>
3573                                                                                </fo:table> </fo:block>
3574                                                                </fo:table-cell>
3575                                                        </fo:table-row>
3576                                                </fo:table-body>
3577                                        </fo:table>
3578                                </fo:block>
3579</xsl:for-each>
3580                </fo:block>
3581<xslt:comment> Perforation Information </xslt:comment>
3582                        <fo:block break-before="page">
3583                                <xsl:variable name="element_drillReportPerfInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPerfInfo']/xsd:sequence"/>
3584                                <xsl:variable name="url_dTimOpen">
3585                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimOpen']/@sawsdl:modelReference"/>
3586                                </xsl:variable>
3587                                <xsl:variable name="url_dTimClose">
3588                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimClose']/@sawsdl:modelReference"/>
3589                                </xsl:variable>
3590                                <xsl:variable name="url_mdTop">
3591                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3592                                </xsl:variable>
3593                                <xsl:variable name="url_mdBottom">
3594                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3595                                </xsl:variable>
3596                                <xsl:variable name="url_tvdTop">
3597                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3598                                </xsl:variable>
3599                                <xsl:variable name="url_tvdBottom">
3600                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3601                                </xsl:variable>
3602                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3603                                <fo:leader/>
3604                                <fo:table>
3605                                        <fo:table-column column-width="100%"/>
3606                                        <fo:table-body>
3607                                                <fo:table-row font-weight="bold" font-size="14pt">
3608                                                        <fo:table-cell>
3609                                                                <fo:block>
3610                                                                        Perforation Information
3611                                                                </fo:block>
3612                                                        </fo:table-cell>
3613                                                </fo:table-row>
3614                                                <fo:table-row>
3615                                                        <fo:table-cell>
3616                                                                <fo:block> </fo:block>
3617                                                        </fo:table-cell>
3618                                                </fo:table-row>
3619                                                <fo:table-row>
3620                                                        <fo:table-cell>
3621                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3622                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="1"/>
3623                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="2"/>
3624                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="3"/>
3625                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="4"/>
3626                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="5"/>
3627                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="6"/>
3628                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="7"/>
3629                                                                                <fo:table-body>
3630                                                                                        <fo:table-row font-weight="bold">
3631                                                                                                <fo:table-cell>
3632                                                                                                        <fo:block>
3633                                                                                                                <fo:basic-link external-destination="url({$url_dTimOpen})">Time of opening well perf</fo:basic-link>
3634                                                                                                        </fo:block>
3635                                                                                                </fo:table-cell>
3636                                                                                                <fo:table-cell>
3637                                                                                                        <fo:block>
3638                                                                                                                <fo:basic-link external-destination="url({$url_dTimClose})">Time of closing well perf</fo:basic-link>
3639                                                                                                        </fo:block>
3640                                                                                                </fo:table-cell>
3641                                                                                                <fo:table-cell>
3642                                                                                                        <fo:block>
3643                                                                                                                <fo:basic-link external-destination="url({$urlRDS})">Duration well perf</fo:basic-link>
3644                                                                                                        </fo:block>
3645                                                                                                </fo:table-cell>
3646                                                                                                <fo:table-cell>
3647                                                                                                        <fo:block>
3648                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Top of perf</fo:basic-link>
3649                                                                                                        </fo:block>
3650                                                                                                        <fo:block>mMD</fo:block>
3651                                                                                                </fo:table-cell>
3652                                                                                                <fo:table-cell>
3653                                                                                                        <fo:block>
3654                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Bottom of Perf</fo:basic-link>
3655                                                                                                        </fo:block>
3656                                                                                                        <fo:block>mMD</fo:block>
3657                                                                                                </fo:table-cell>
3658                                                                                                <fo:table-cell>
3659                                                                                                        <fo:block>
3660                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Top of perf</fo:basic-link>
3661                                                                                                        </fo:block>
3662                                                                                                        <fo:block>mTVD</fo:block>
3663                                                                                                </fo:table-cell>
3664                                                                                                <fo:table-cell>
3665                                                                                                        <fo:block>
3666                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Bottom of Perf</fo:basic-link>
3667                                                                                                        </fo:block>
3668                                                                                                        <fo:block>mTVD</fo:block>
3669                                                                                                </fo:table-cell>
3670                                                                                        </fo:table-row>
3671                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:perfInfo">
3672<fo:table-row>
3673                                                                                                <fo:table-cell>
3674                                                                                                        <fo:block>
3675                                                                                                                <xsl:if test="string(substring(witsml:dTimOpen, 0 ,17))"><fo:inline>
3676<xsl:value-of select="substring(witsml:dTimOpen, 0 ,17)"/>
3677</fo:inline></xsl:if>
3678                                                                                                        </fo:block>
3679                                                                                                </fo:table-cell>
3680                                                                                                <fo:table-cell>
3681                                                                                                        <fo:block>
3682                                                                                                                <xsl:if test="string(substring(witsml:dTimClose, 0, 17))"><fo:inline>
3683<xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
3684</fo:inline></xsl:if>
3685                                                                                                        </fo:block>
3686                                                                                                </fo:table-cell>
3687                                                                                                <fo:table-cell>
3688                                                                                                        <fo:block><xslt:comment>&lt;xfd:field xpath="substring-after(xsl:dateTime(witsml:dTimClose) - xsl:dateTime(witsml:dTimOpen), 'PT')"/&gt;</xslt:comment>
3689                                                                                                                duration
3690                                                                                                        </fo:block>
3691                                                                                                </fo:table-cell>
3692                                                                                                <fo:table-cell>
3693                                                                                                        <fo:block>
3694                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3695<xsl:value-of select="witsml:mdTop"/>
3696</fo:inline></xsl:if>
3697                                                                                                        </fo:block>
3698                                                                                                </fo:table-cell>
3699                                                                                                <fo:table-cell>
3700                                                                                                        <fo:block>
3701                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3702<xsl:value-of select="witsml:mdBottom"/>
3703</fo:inline></xsl:if>
3704                                                                                                        </fo:block>
3705                                                                                                </fo:table-cell>
3706                                                                                                <fo:table-cell>
3707                                                                                                        <fo:block>
3708                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3709<xsl:value-of select="witsml:tvdTop"/>
3710</fo:inline></xsl:if>
3711                                                                                                        </fo:block>
3712                                                                                                </fo:table-cell>
3713                                                                                                <fo:table-cell>
3714                                                                                                        <fo:block>
3715                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3716<xsl:value-of select="witsml:tvdBottom"/>
3717</fo:inline></xsl:if>
3718                                                                                                        </fo:block>
3719                                                                                                </fo:table-cell>
3720                                                                                        </fo:table-row>
3721</xsl:for-each>
3722                                                                                </fo:table-body>
3723                                                                        </fo:table> </fo:block>
3724                                                        </fo:table-cell>
3725                                                </fo:table-row>
3726                                        </fo:table-body>
3727                                </fo:table>
3728                        </fo:block>
3729<xslt:comment> Gas Reading Information </xslt:comment>
3730                        <fo:block>
3731                                <xsl:variable name="element_drillReportGasReadingInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportGasReadingInfo']/xsd:sequence"/>
3732                                <xsl:variable name="url_dTim">
3733                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
3734                                </xsl:variable>
3735                                <xsl:variable name="url_readingType">
3736                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='readingType']/@sawsdl:modelReference"/>
3737                                </xsl:variable>
3738                                <xsl:variable name="url_mdTop">
3739                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3740                                </xsl:variable>
3741                                <xsl:variable name="url_mdBottom">
3742                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3743                                </xsl:variable>
3744                                <xsl:variable name="url_tvdTop">
3745                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3746                                </xsl:variable>
3747                                <xsl:variable name="url_tvdBottom">
3748                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3749                                </xsl:variable>
3750                                <xsl:variable name="url_gasHigh">
3751                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasHigh']/@sawsdl:modelReference"/>
3752                                </xsl:variable>
3753                                <xsl:variable name="url_gasLow">
3754                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasLow']/@sawsdl:modelReference"/>
3755                                </xsl:variable>
3756                                <xsl:variable name="url_meth">
3757                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='meth']/@sawsdl:modelReference"/>
3758                                </xsl:variable>
3759                                <xsl:variable name="url_eth">
3760                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='eth']/@sawsdl:modelReference"/>
3761                                </xsl:variable>
3762                                <xsl:variable name="url_prop">
3763                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='prop']/@sawsdl:modelReference"/>
3764                                </xsl:variable>
3765                                <xsl:variable name="url_ibut">
3766                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ibut']/@sawsdl:modelReference"/>
3767                                </xsl:variable>
3768                                <xsl:variable name="url_ipent">
3769                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ipent']/@sawsdl:modelReference"/>
3770                                </xsl:variable>
3771                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3772                                <fo:leader/>
3773                                <fo:table>
3774                                        <fo:table-column column-width="100%"/>
3775                                        <fo:table-body>
3776                                                <fo:table-row font-weight="bold" font-size="14pt">
3777                                                        <fo:table-cell>
3778                                                                <fo:block>
3779                                                                        Gas Reading Information
3780                                                                </fo:block>
3781                                                        </fo:table-cell>
3782                                                </fo:table-row>
3783                                                <fo:table-row>
3784                                                        <fo:table-cell>
3785                                                                <fo:block> </fo:block>
3786                                                        </fo:table-cell>
3787                                                </fo:table-row>
3788                                                <fo:table-row>
3789                                                        <fo:table-cell>
3790                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3791                                                                                <fo:table-column column-width="proportional-column-width(11)" column-number="1"/>
3792                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="2"/>
3793                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="3"/>
3794                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="4"/>
3795                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="5"/>
3796                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="6"/>
3797                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="7"/>
3798                                                                                <fo:table-column column-width="proportional-column-width(6.038)" column-number="8"/>
3799                                                                                <fo:table-column column-width="proportional-column-width(6.038)" column-number="9"/>
3800                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="10"/>
3801                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="11"/>
3802                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="12"/>
3803                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="13"/>
3804                                                                                <fo:table-body>
3805                                                                                        <fo:table-row font-weight="bold">
3806                                                                                                <fo:table-cell>
3807                                                                                                        <fo:block>
3808                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
3809                                                                                                        </fo:block>
3810                                                                                                </fo:table-cell>
3811                                                                                                <fo:table-cell>
3812                                                                                                        <fo:block>
3813                                                                                                                <fo:basic-link external-destination="url({$url_readingType})">Class</fo:basic-link>
3814                                                                                                        </fo:block>
3815                                                                                                </fo:table-cell>
3816                                                                                                <fo:table-cell>
3817                                                                                                        <fo:block>
3818                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top</fo:basic-link>
3819                                                                                                        </fo:block>
3820                                                                                                        <fo:block>mMD</fo:block>
3821                                                                                                </fo:table-cell>
3822                                                                                                <fo:table-cell>
3823                                                                                                        <fo:block>
3824                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth to bottom</fo:basic-link>
3825                                                                                                        </fo:block>
3826                                                                                                        <fo:block>mMD</fo:block>
3827                                                                                                </fo:table-cell>
3828                                                                                                <fo:table-cell>
3829                                                                                                        <fo:block>
3830                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top</fo:basic-link>
3831                                                                                                        </fo:block>
3832                                                                                                        <fo:block>mTVD</fo:block>
3833                                                                                                </fo:table-cell>
3834                                                                                                <fo:table-cell>
3835                                                                                                        <fo:block>
3836                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Depth to bottom</fo:basic-link>
3837                                                                                                        </fo:block>
3838                                                                                                        <fo:block>mTVD</fo:block>
3839                                                                                                </fo:table-cell>
3840                                                                                                <fo:table-cell>
3841                                                                                                        <fo:block>
3842                                                                                                                <fo:basic-link external-destination="url({$url_gasHigh})">Highest gas</fo:basic-link>
3843                                                                                                        </fo:block>
3844                                                                                                        <fo:block>
3845                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom)"><fo:inline>
3846<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom"/>
3847</fo:inline></xsl:if>
3848                                                                                                        </fo:block>
3849                                                                                                </fo:table-cell>
3850                                                                                                <fo:table-cell>
3851                                                                                                        <fo:block>
3852                                                                                                                <fo:basic-link external-destination="url({$url_gasLow})">Lowest gas</fo:basic-link>
3853                                                                                                        </fo:block>
3854                                                                                                        <fo:block>
3855                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom)"><fo:inline>
3856<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom"/>
3857</fo:inline></xsl:if>
3858                                                                                                        </fo:block>
3859                                                                                                </fo:table-cell>
3860                                                                                                <fo:table-cell>
3861                                                                                                        <fo:block>
3862                                                                                                                <fo:basic-link external-destination="url({$url_meth})">C1</fo:basic-link>
3863                                                                                                        </fo:block>
3864                                                                                                        <fo:block>
3865                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom)"><fo:inline>
3866<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom"/>
3867</fo:inline></xsl:if>
3868                                                                                                        </fo:block>
3869                                                                                                </fo:table-cell>
3870                                                                                                <fo:table-cell>
3871                                                                                                        <fo:block>
3872                                                                                                                <fo:basic-link external-destination="url({$url_eth})">C2</fo:basic-link>
3873                                                                                                        </fo:block>
3874                                                                                                        <fo:block>
3875                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom)"><fo:inline>
3876<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom"/>
3877</fo:inline></xsl:if>
3878                                                                                                        </fo:block>
3879                                                                                                </fo:table-cell>
3880                                                                                                <fo:table-cell>
3881                                                                                                        <fo:block>
3882                                                                                                                <fo:basic-link external-destination="url({$url_prop})">C3</fo:basic-link>
3883                                                                                                        </fo:block>
3884                                                                                                        <fo:block>
3885                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom)"><fo:inline>
3886<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom"/>
3887</fo:inline></xsl:if>
3888                                                                                                        </fo:block>
3889                                                                                                </fo:table-cell>
3890                                                                                                <fo:table-cell>
3891                                                                                                        <fo:block>
3892                                                                                                                <fo:basic-link external-destination="url({$url_ibut})">IC4</fo:basic-link>
3893                                                                                                        </fo:block>
3894                                                                                                        <fo:block>
3895                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom)"><fo:inline>
3896<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom"/>
3897</fo:inline></xsl:if>
3898                                                                                                        </fo:block>
3899                                                                                                </fo:table-cell>
3900                                                                                                <fo:table-cell>
3901                                                                                                        <fo:block>
3902                                                                                                                <fo:basic-link external-destination="url({$url_ipent})">IC5</fo:basic-link>
3903                                                                                                        </fo:block>
3904                                                                                                        <fo:block>
3905                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom)"><fo:inline>
3906<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom"/>
3907</fo:inline></xsl:if>
3908                                                                                                        </fo:block>
3909                                                                                                </fo:table-cell>
3910                                                                                        </fo:table-row>
3911                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo">
3912<fo:table-row>
3913                                                                                                <fo:table-cell>
3914                                                                                                        <fo:block>
3915                                                                                                                <xsl:if test="string(substring-after(witsml:dTim, 'T'))"><fo:inline>
3916<xsl:value-of select="substring-after(witsml:dTim, 'T')"/>
3917</fo:inline></xsl:if>
3918                                                                                                        </fo:block>
3919                                                                                                </fo:table-cell>
3920                                                                                                <fo:table-cell>
3921                                                                                                        <fo:block>
3922                                                                                                                <xsl:if test="string(witsml:readingType)"><fo:inline>
3923<xsl:value-of select="witsml:readingType"/>
3924</fo:inline></xsl:if>
3925                                                                                                        </fo:block>
3926                                                                                                </fo:table-cell>
3927                                                                                                <fo:table-cell>
3928                                                                                                        <fo:block>
3929                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3930<xsl:value-of select="witsml:mdTop"/>
3931</fo:inline></xsl:if>
3932                                                                                                        </fo:block>
3933                                                                                                </fo:table-cell>
3934                                                                                                <fo:table-cell>
3935                                                                                                        <fo:block>
3936                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3937<xsl:value-of select="witsml:mdBottom"/>
3938</fo:inline></xsl:if>
3939                                                                                                        </fo:block>
3940                                                                                                </fo:table-cell>
3941                                                                                                <fo:table-cell>
3942                                                                                                        <fo:block>
3943                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3944<xsl:value-of select="witsml:tvdTop"/>
3945</fo:inline></xsl:if>
3946                                                                                                        </fo:block>
3947                                                                                                </fo:table-cell>
3948                                                                                                <fo:table-cell>
3949                                                                                                        <fo:block>
3950                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3951<xsl:value-of select="witsml:tvdBottom"/>
3952</fo:inline></xsl:if>
3953                                                                                                        </fo:block>
3954                                                                                                </fo:table-cell>
3955                                                                                                <fo:table-cell>
3956                                                                                                        <fo:block>
3957                                                                                                                <xsl:if test="string(witsml:gasHigh)"><fo:inline>
3958<xsl:value-of select="witsml:gasHigh"/>
3959</fo:inline></xsl:if>
3960                                                                                                        </fo:block>
3961                                                                                                </fo:table-cell>
3962                                                                                                <fo:table-cell>
3963                                                                                                        <fo:block>
3964                                                                                                                <xsl:if test="string(witsml:gasLow)"><fo:inline>
3965<xsl:value-of select="witsml:gasLow"/>
3966</fo:inline></xsl:if>
3967                                                                                                        </fo:block>
3968                                                                                                </fo:table-cell>
3969                                                                                                <fo:table-cell>
3970                                                                                                        <fo:block>
3971                                                                                                                <xsl:if test="string(witsml:meth)"><fo:inline>
3972<xsl:value-of select="witsml:meth"/>
3973</fo:inline></xsl:if>
3974                                                                                                        </fo:block>
3975                                                                                                </fo:table-cell>
3976                                                                                                <fo:table-cell>
3977                                                                                                        <fo:block>
3978                                                                                                                <xsl:if test="string(witsml:eth)"><fo:inline>
3979<xsl:value-of select="witsml:eth"/>
3980</fo:inline></xsl:if>
3981                                                                                                        </fo:block>
3982                                                                                                </fo:table-cell>
3983                                                                                                <fo:table-cell>
3984                                                                                                        <fo:block>
3985                                                                                                                <xsl:if test="string(witsml:prop)"><fo:inline>
3986<xsl:value-of select="witsml:prop"/>
3987</fo:inline></xsl:if>
3988                                                                                                        </fo:block>
3989                                                                                                </fo:table-cell>
3990                                                                                                <fo:table-cell>
3991                                                                                                        <fo:block>
3992                                                                                                                <xsl:if test="string(witsml:ibut)"><fo:inline>
3993<xsl:value-of select="witsml:ibut"/>
3994</fo:inline></xsl:if>
3995                                                                                                        </fo:block>
3996                                                                                                </fo:table-cell>
3997                                                                                                <fo:table-cell>
3998                                                                                                        <fo:block>
3999                                                                                                                <xsl:if test="string(witsml:ipent)"><fo:inline>
4000<xsl:value-of select="witsml:ipent"/>
4001</fo:inline></xsl:if>
4002                                                                                                        </fo:block>
4003                                                                                                </fo:table-cell>
4004                                                                                        </fo:table-row>
4005</xsl:for-each>
4006                                                                                </fo:table-body>
4007                                                                        </fo:table> </fo:block>
4008                                                        </fo:table-cell>
4009                                                </fo:table-row>
4010                                        </fo:table-body>
4011                                </fo:table>
4012                        </fo:block>
4013                </fo:flow>
4014        </fo:page-sequence>
4015</fo:root>
4016</xsl:template>
4017<!-- ========================= NUMBER FORMATS ========================= -->
4018<!-- ========================= CUSTOM FORMATS ========================= -->
4019<xslt:template name="str:custom-format">
4020<xslt:param name="str" select="''"/>
4021<xslt:param name="pattern" select="''"/>
4022<xslt:param name="crtPos" select="1"/>
4023<xslt:if test="$crtPos &lt;= string-length($pattern)">
4024<xslt:variable name="chr" select="substring(normalize-space($pattern), $crtPos, 1)"/>
4025<xslt:choose>
4026<xslt:when test="$chr = '#'">
4027<xslt:value-of select="substring($str, 1, 1)"/>
4028</xslt:when>
4029<xslt:otherwise>
4030<xslt:value-of select="$chr"/>
4031</xslt:otherwise>
4032</xslt:choose>
4033<xslt:call-template name="str:custom-format">
4034<xslt:with-param name="str">
4035<xslt:choose>
4036<xslt:when test="$chr = '#'">
4037<xslt:value-of select="substring($str, 2)"/>
4038</xslt:when>
4039<xslt:otherwise>
4040<xslt:value-of select="$str"/>
4041</xslt:otherwise>
4042</xslt:choose>
4043</xslt:with-param>
4044<xslt:with-param name="pattern" select="$pattern"/>
4045<xslt:with-param name="crtPos" select="$crtPos + 1"/>
4046</xslt:call-template>
4047</xslt:if>
4048</xslt:template>
4049<!-- ========================= EXSLT TEMPLATES [str.padding.template.xsl] ========================= -->
4050<xslt:template name="str:padding">
4051<xslt:param name="length" select="0"/>
4052<xslt:param name="chars" select="' '"/>
4053<xslt:choose>
4054<xslt:when test="not($length) or not($chars)"/>
4055<xslt:otherwise>
4056<xslt:variable name="string" select="concat($chars, $chars, $chars, $chars, $chars,                                        $chars, $chars, $chars, $chars, $chars)"/>
4057<xslt:choose>
4058<xslt:when test="string-length($string) &gt;= $length">
4059<xslt:value-of select="substring($string, 1, $length)"/>
4060</xslt:when>
4061<xslt:otherwise>
4062<xslt:call-template name="str:padding">
4063<xslt:with-param name="length" select="$length"/>
4064<xslt:with-param name="chars" select="$string"/>
4065</xslt:call-template>
4066</xslt:otherwise>
4067</xslt:choose>
4068</xslt:otherwise>
4069</xslt:choose>
4070</xslt:template>
4071<!-- ========================= EXSLT TEMPLATES [date.format-date.template.xsl] ========================= -->
4072<xslt:template name="date:_get-days-elapsed">
4073<xslt:param name="month"/>
4074<xslt:choose>
4075<xslt:when test="$month = 1">0</xslt:when>
4076<xslt:when test="$month = 2">31</xslt:when>
4077<xslt:when test="$month = 3">59</xslt:when>
4078<xslt:when test="$month = 4">90</xslt:when>
4079<xslt:when test="$month = 5">120</xslt:when>
4080<xslt:when test="$month = 6">151</xslt:when>
4081<xslt:when test="$month = 7">181</xslt:when>
4082<xslt:when test="$month = 8">212</xslt:when>
4083<xslt:when test="$month = 9">243</xslt:when>
4084<xslt:when test="$month = 10">273</xslt:when>
4085<xslt:when test="$month = 11">304</xslt:when>
4086<xslt:when test="$month = 12">334</xslt:when>
4087<xslt:otherwise>365</xslt:otherwise>
4088</xslt:choose>
4089</xslt:template>
4090<xslt:template name="date:_get-month">
4091<xslt:param name="month"/>
4092<xslt:param name="lang-id" select="'en_US'"/>
4093<xslt:choose>
4094<xslt:when test="$lang-id = 'fr_FR'">
4095<xslt:choose>
4096<xslt:when test="$month = 1">Janvier;Jan</xslt:when>
4097<xslt:when test="$month = 2">Février;Fév</xslt:when>
4098<xslt:when test="$month = 3">Mars;Mar</xslt:when>
4099<xslt:when test="$month = 4">Avril;Avr</xslt:when>
4100<xslt:when test="$month = 5">Mai;Mai</xslt:when>
4101<xslt:when test="$month = 6">Juin;Jui</xslt:when>
4102<xslt:when test="$month = 7">Juillet;Juil</xslt:when>
4103<xslt:when test="$month = 8">Août;Aoû</xslt:when>
4104<xslt:when test="$month = 9">Septembre;Sep</xslt:when>
4105<xslt:when test="$month = 10">Octobre;Oct</xslt:when>
4106<xslt:when test="$month = 11">Novembre;Nov</xslt:when>
4107<xslt:when test="$month = 12">Décembre;Déc</xslt:when>
4108</xslt:choose>
4109</xslt:when>
4110<xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4111<xslt:choose>
4112<xslt:when test="$month = 1">Januar;Jan</xslt:when>
4113<xslt:when test="$month = 2">Februar;Feb</xslt:when>
4114<xslt:when test="$month = 3">März;Mär</xslt:when>
4115<xslt:when test="$month = 4">April;Apr</xslt:when>
4116<xslt:when test="$month = 5">Dürfen;Dür</xslt:when>
4117<xslt:when test="$month = 6">Juni;Jun</xslt:when>
4118<xslt:when test="$month = 7">Juli;Jul</xslt:when>
4119<xslt:when test="$month = 8">August;Aug</xslt:when>
4120<xslt:when test="$month = 9">September;Sep</xslt:when>
4121<xslt:when test="$month = 10">Oktober;Okt</xslt:when>
4122<xslt:when test="$month = 11">November;Nov</xslt:when>
4123<xslt:when test="$month = 12">Dezember;Dez</xslt:when>
4124</xslt:choose>
4125</xslt:when>
4126<xslt:when test="$lang-id = 'es_ES'">
4127<xslt:choose>
4128<xslt:when test="$month = 1">Enero;Ene</xslt:when>
4129<xslt:when test="$month = 2">Febrero;Feb</xslt:when>
4130<xslt:when test="$month = 3">Marzo;Mar</xslt:when>
4131<xslt:when test="$month = 4">Abril;Abr</xslt:when>
4132<xslt:when test="$month = 5">Mayo;May</xslt:when>
4133<xslt:when test="$month = 6">Junio;Jun</xslt:when>
4134<xslt:when test="$month = 7">Julio;Jul</xslt:when>
4135<xslt:when test="$month = 8">Agosto;Ago</xslt:when>
4136<xslt:when test="$month = 9">Septiembre;Sep</xslt:when>
4137<xslt:when test="$month = 10">Octubre;Oct</xslt:when>
4138<xslt:when test="$month = 11">Noviembre;Nov</xslt:when>
4139<xslt:when test="$month = 12">Diciembre;Dic</xslt:when>
4140</xslt:choose>
4141</xslt:when>
4142<xslt:when test="$lang-id = 'nl_NL'">
4143<xslt:choose>
4144<xslt:when test="$month = 1">januari;jan</xslt:when>
4145<xslt:when test="$month = 2">februari;feb</xslt:when>
4146<xslt:when test="$month = 3">maart;maa</xslt:when>
4147<xslt:when test="$month = 4">april;apr</xslt:when>
4148<xslt:when test="$month = 5">mei;mei</xslt:when>
4149<xslt:when test="$month = 6">juni;jun</xslt:when>
4150<xslt:when test="$month = 7">juli;jul</xslt:when>
4151<xslt:when test="$month = 8">augustus;aug</xslt:when>
4152<xslt:when test="$month = 9">september;sep</xslt:when>
4153<xslt:when test="$month = 10">oktober;okt</xslt:when>
4154<xslt:when test="$month = 11">november;nov</xslt:when>
4155<xslt:when test="$month = 12">december;dec</xslt:when>
4156</xslt:choose>
4157</xslt:when>
4158<xslt:otherwise>
4159<xslt:choose>
4160<xslt:when test="$month = 1">January;Jan</xslt:when>
4161<xslt:when test="$month = 2">February;Feb</xslt:when>
4162<xslt:when test="$month = 3">March;Mar</xslt:when>
4163<xslt:when test="$month = 4">April;Apr</xslt:when>
4164<xslt:when test="$month = 5">May;May</xslt:when>
4165<xslt:when test="$month = 6">June;Jun</xslt:when>
4166<xslt:when test="$month = 7">July;Jul</xslt:when>
4167<xslt:when test="$month = 8">August;Aug</xslt:when>
4168<xslt:when test="$month = 9">September;Sep</xslt:when>
4169<xslt:when test="$month = 10">October;Oct</xslt:when>
4170<xslt:when test="$month = 11">November;Nov</xslt:when>
4171<xslt:when test="$month = 12">December;Dec</xslt:when>
4172</xslt:choose>
4173</xslt:otherwise>
4174</xslt:choose>
4175</xslt:template>
4176<xslt:template name="date:_get-day">
4177<xslt:param name="day"/>
4178<xslt:param name="lang-id" select="'en_US'"/>
4179<xslt:choose>
4180<xslt:when test="$lang-id = 'fr_FR'">
4181<xslt:choose>
4182<xslt:when test="$day = 1">Dimanche;Dim</xslt:when>
4183<xslt:when test="$day = 2">Lundi;Lun</xslt:when>
4184<xslt:when test="$day = 3">Mardi;Mar</xslt:when>
4185<xslt:when test="$day = 4">Mercredi;Mer</xslt:when>
4186<xslt:when test="$day = 5">Jeudi;Jeu</xslt:when>
4187<xslt:when test="$day = 6">Vendredi;Ven</xslt:when>
4188<xslt:when test="$day = 7">Samedi;Sam</xslt:when>
4189</xslt:choose>
4190</xslt:when>
4191<xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4192<xslt:choose>
4193<xslt:when test="$day = 1">Sonntag;Son</xslt:when>
4194<xslt:when test="$day = 2">Montag;Mon</xslt:when>
4195<xslt:when test="$day = 3">Dienstag;Die</xslt:when>
4196<xslt:when test="$day = 4">Mittwoch;Mit</xslt:when>
4197<xslt:when test="$day = 5">Donnerstag;Don</xslt:when>
4198<xslt:when test="$day = 6">Freitag;Fre</xslt:when>
4199<xslt:when test="$day = 7">Samstag;Sam</xslt:when>
4200</xslt:choose>
4201</xslt:when>
4202<xslt:when test="$lang-id = 'es_ES'">
4203<xslt:choose>
4204<xslt:when test="$day = 1">Domingo;Dom</xslt:when>
4205<xslt:when test="$day = 2">Lunes;Lun</xslt:when>
4206<xslt:when test="$day = 3">Martes;Mar</xslt:when>
4207<xslt:when test="$day = 4">Miércoles;Mié</xslt:when>
4208<xslt:when test="$day = 5">Jueves;Jue</xslt:when>
4209<xslt:when test="$day = 6">Viernes;Vie</xslt:when>
4210<xslt:when test="$day = 7">Sábado;Sáb</xslt:when>
4211</xslt:choose>
4212</xslt:when>
4213<xslt:when test="$lang-id = 'nl_NL'">
4214<xslt:choose>
4215<xslt:when test="$day = 1">zondag;zon</xslt:when>
4216<xslt:when test="$day = 2">maandag;maa</xslt:when>
4217<xslt:when test="$day = 3">dinsdag;din</xslt:when>
4218<xslt:when test="$day = 4">woensdag;woe</xslt:when>
4219<xslt:when test="$day = 5">donderdag;don</xslt:when>
4220<xslt:when test="$day = 6">vrijdag;vri</xslt:when>
4221<xslt:when test="$day = 7">zaterdag;zat</xslt:when>
4222</xslt:choose>
4223</xslt:when>
4224<xslt:otherwise>
4225<xslt:choose>
4226<xslt:when test="$day = 1">Sunday;Sun</xslt:when>
4227<xslt:when test="$day = 2">Monday;Mon</xslt:when>
4228<xslt:when test="$day = 3">Tuesday;Tue</xslt:when>
4229<xslt:when test="$day = 4">Wednesday;Wed</xslt:when>
4230<xslt:when test="$day = 5">Thursday;Thu</xslt:when>
4231<xslt:when test="$day = 6">Friday;Fri</xslt:when>
4232<xslt:when test="$day = 7">Saturday;Sat</xslt:when>
4233</xslt:choose>
4234</xslt:otherwise>
4235</xslt:choose>
4236</xslt:template>
4237<xslt:template name="date:format-date">
4238<xslt:param name="date-time"/>
4239<xslt:param name="pattern"/>
4240<xslt:param name="lang-id"/>
4241<xslt:variable name="formatted">
4242<xslt:choose>
4243<xslt:when test="starts-with($date-time, '---')">
4244<xslt:call-template name="date:_format-date">
4245<xslt:with-param name="year" select="'NaN'"/>
4246<xslt:with-param name="month" select="'NaN'"/>
4247<xslt:with-param name="day" select="number(substring($date-time, 4, 2))"/>
4248<xslt:with-param name="pattern" select="$pattern"/>
4249<xslt:with-param name="lang-id" select="$lang-id"/>
4250</xslt:call-template>
4251</xslt:when>
4252<xslt:when test="starts-with($date-time, '--')">
4253<xslt:call-template name="date:_format-date">
4254<xslt:with-param name="year" select="'NaN'"/>
4255<xslt:with-param name="month" select="number(substring($date-time, 3, 2))"/>
4256<xslt:with-param name="day" select="number(substring($date-time, 6, 2))"/>
4257<xslt:with-param name="pattern" select="$pattern"/>
4258<xslt:with-param name="lang-id" select="$lang-id"/>
4259</xslt:call-template>
4260</xslt:when>
4261<xslt:otherwise>
4262<xslt:variable name="neg" select="starts-with($date-time, '-')"/>
4263<xslt:variable name="no-neg">
4264<xslt:choose>
4265<xslt:when test="$neg or starts-with($date-time, '+')">
4266<xslt:value-of select="substring($date-time, 2)"/>
4267</xslt:when>
4268<xslt:otherwise>
4269<xslt:value-of select="$date-time"/>
4270</xslt:otherwise>
4271</xslt:choose>
4272</xslt:variable>
4273<xslt:variable name="no-neg-length" select="string-length($no-neg)"/>
4274<xslt:variable name="timezone">
4275<xslt:choose>
4276<xslt:when test="substring($no-neg, $no-neg-length) = 'Z'">Z</xslt:when>
4277<xslt:otherwise>
4278<xslt:variable name="tz" select="substring($no-neg, $no-neg-length - 5)"/>
4279<xslt:if test="(substring($tz, 1, 1) = '-' or                                      substring($tz, 1, 1) = '+') and                                    substring($tz, 4, 1) = ':'">
4280<xslt:value-of select="$tz"/>
4281</xslt:if>
4282</xslt:otherwise>
4283</xslt:choose>
4284</xslt:variable>
4285<xslt:if test="not(string($timezone)) or                           $timezone = 'Z' or                            (substring($timezone, 2, 2) &lt;= 23 and                            substring($timezone, 5, 2) &lt;= 59)">
4286<xslt:variable name="dt" select="substring($no-neg, 1, $no-neg-length - string-length($timezone))"/>
4287<xslt:variable name="dt-length" select="string-length($dt)"/>
4288<xslt:choose>
4289<xslt:when test="substring($dt, 3, 1) = ':' and                                   substring($dt, 6, 1) = ':'">
4290<xslt:variable name="hour" select="substring($dt, 1, 2)"/>
4291<xslt:variable name="min" select="substring($dt, 4, 2)"/>
4292<xslt:variable name="sec" select="substring($dt, 7)"/>
4293<xslt:if test="$hour &lt;= 23 and                                    $min &lt;= 59 and                                    $sec &lt;= 60">
4294<xslt:call-template name="date:_format-date">
4295<xslt:with-param name="year" select="'NaN'"/>
4296<xslt:with-param name="month" select="'NaN'"/>
4297<xslt:with-param name="day" select="'NaN'"/>
4298<xslt:with-param name="hour" select="$hour"/>
4299<xslt:with-param name="minute" select="$min"/>
4300<xslt:with-param name="second" select="$sec"/>
4301<xslt:with-param name="timezone" select="$timezone"/>
4302<xslt:with-param name="pattern" select="$pattern"/>
4303<xslt:with-param name="lang-id" select="$lang-id"/>
4304</xslt:call-template>
4305</xslt:if>
4306</xslt:when>
4307<xslt:otherwise>
4308<xslt:variable name="year" select="substring($dt, 1, 4) * (($neg * -2) + 1)"/>
4309<xslt:choose>
4310<xslt:when test="not(number($year))"/>
4311<xslt:when test="$dt-length = 4">
4312<xslt:call-template name="date:_format-date">
4313<xslt:with-param name="year" select="$year"/>
4314<xslt:with-param name="timezone" select="$timezone"/>
4315<xslt:with-param name="pattern" select="$pattern"/>
4316<xslt:with-param name="lang-id" select="$lang-id"/>
4317</xslt:call-template>
4318</xslt:when>
4319<xslt:when test="substring($dt, 5, 1) = '-'">
4320<xslt:variable name="month" select="substring($dt, 6, 2)"/>
4321<xslt:choose>
4322<xslt:when test="not($month &lt;= 12)"/>
4323<xslt:when test="$dt-length = 7">
4324<xslt:call-template name="date:_format-date">
4325<xslt:with-param name="year" select="$year"/>
4326<xslt:with-param name="month" select="$month"/>
4327<xslt:with-param name="timezone" select="$timezone"/>
4328<xslt:with-param name="pattern" select="$pattern"/>
4329<xslt:with-param name="lang-id" select="$lang-id"/>
4330</xslt:call-template>
4331</xslt:when>
4332<xslt:when test="substring($dt, 8, 1) = '-'">
4333<xslt:variable name="day" select="substring($dt, 9, 2)"/>
4334<xslt:if test="$day &lt;= 31">
4335<xslt:choose>
4336<xslt:when test="$dt-length = 10">
4337<xslt:call-template name="date:_format-date">
4338<xslt:with-param name="year" select="$year"/>
4339<xslt:with-param name="month" select="$month"/>
4340<xslt:with-param name="day" select="$day"/>
4341<xslt:with-param name="timezone" select="$timezone"/>
4342<xslt:with-param name="pattern" select="$pattern"/>
4343<xslt:with-param name="lang-id" select="$lang-id"/>
4344</xslt:call-template>
4345</xslt:when>
4346<xslt:when test="substring($dt, 11, 1) = 'T' and                                                        substring($dt, 14, 1) = ':' and                                                        substring($dt, 17, 1) = ':'">
4347<xslt:variable name="hour" select="substring($dt, 12, 2)"/>
4348<xslt:variable name="min" select="substring($dt, 15, 2)"/>
4349<xslt:variable name="sec" select="substring($dt, 18)"/>
4350<xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4351<xslt:call-template name="date:_format-date">
4352<xslt:with-param name="year" select="$year"/>
4353<xslt:with-param name="month" select="$month"/>
4354<xslt:with-param name="day" select="$day"/>
4355<xslt:with-param name="hour" select="$hour"/>
4356<xslt:with-param name="minute" select="$min"/>
4357<xslt:with-param name="second" select="$sec"/>
4358<xslt:with-param name="timezone" select="$timezone"/>
4359<xslt:with-param name="pattern" select="$pattern"/>
4360<xslt:with-param name="lang-id" select="$lang-id"/>
4361</xslt:call-template>
4362</xslt:if>
4363</xslt:when>
4364</xslt:choose>
4365</xslt:if>
4366</xslt:when>
4367</xslt:choose>
4368</xslt:when>
4369<xslt:when test="string(number(substring($dt,5,1)))!='NaN'">
4370<xslt:variable name="month" select="substring($dt, 5, 2)"/>
4371<xslt:choose>
4372<xslt:when test="not($month &lt;= 12)"/>
4373<xslt:when test="$dt-length = 6">
4374<xslt:call-template name="date:_format-date">
4375<xslt:with-param name="year" select="$year"/>
4376<xslt:with-param name="month" select="$month"/>
4377<xslt:with-param name="timezone" select="$timezone"/>
4378<xslt:with-param name="pattern" select="$pattern"/>
4379<xslt:with-param name="lang-id" select="$lang-id"/>
4380</xslt:call-template>
4381</xslt:when>
4382<xslt:otherwise>
4383<xslt:variable name="day" select="substring($dt, 7, 2)"/>
4384<xslt:if test="$day &lt;= 31">
4385<xslt:choose>
4386<xslt:when test="$dt-length = 8">
4387<xslt:call-template name="date:_format-date">
4388<xslt:with-param name="year" select="$year"/>
4389<xslt:with-param name="month" select="$month"/>
4390<xslt:with-param name="day" select="$day"/>
4391<xslt:with-param name="timezone" select="$timezone"/>
4392<xslt:with-param name="pattern" select="$pattern"/>
4393<xslt:with-param name="lang-id" select="$lang-id"/>
4394</xslt:call-template>
4395</xslt:when>
4396<xslt:when test="substring($dt, 9, 1) = 'T' and  substring($dt, 12, 1) = ':' and  substring($dt, 15, 1) = ':'">
4397<xslt:variable name="hour" select="substring($dt, 10, 2)"/>
4398<xslt:variable name="min" select="substring($dt, 13, 2)"/>
4399<xslt:variable name="sec" select="substring($dt, 16)"/>
4400<xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4401<xslt:call-template name="date:_format-date">
4402<xslt:with-param name="year" select="$year"/>
4403<xslt:with-param name="month" select="$month"/>
4404<xslt:with-param name="day" select="$day"/>
4405<xslt:with-param name="hour" select="$hour"/>
4406<xslt:with-param name="minute" select="$min"/>
4407<xslt:with-param name="second" select="$sec"/>
4408<xslt:with-param name="timezone" select="$timezone"/>
4409<xslt:with-param name="pattern" select="$pattern"/>
4410<xslt:with-param name="lang-id" select="$lang-id"/>
4411</xslt:call-template>
4412</xslt:if>
4413</xslt:when>
4414</xslt:choose>
4415</xslt:if>
4416</xslt:otherwise>
4417</xslt:choose>
4418</xslt:when>
4419</xslt:choose>
4420</xslt:otherwise>
4421</xslt:choose>
4422</xslt:if>
4423</xslt:otherwise>
4424</xslt:choose>
4425</xslt:variable>
4426<xslt:value-of select="$formatted"/>
4427</xslt:template>
4428<xslt:template name="date:_format-date">
4429<xslt:param name="year"/>
4430<xslt:param name="month" select="1"/>
4431<xslt:param name="day" select="1"/>
4432<xslt:param name="hour" select="0"/>
4433<xslt:param name="minute" select="0"/>
4434<xslt:param name="second" select="0"/>
4435<xslt:param name="timezone" select="'Z'"/>
4436<xslt:param name="pattern" select="''"/>
4437<xslt:param name="lang-id" select="'en_US'"/>
4438<xslt:variable name="char" select="substring($pattern, 1, 1)"/>
4439<xslt:choose>
4440<xslt:when test="not($pattern)"/>
4441<xslt:when test="$char = &quot;'&quot;">
4442<xslt:choose>
4443<xslt:when test="substring($pattern, 2, 1) = &quot;'&quot;">
4444<xslt:text>'</xslt:text>
4445<xslt:call-template name="date:_format-date">
4446<xslt:with-param name="year" select="$year"/>
4447<xslt:with-param name="month" select="$month"/>
4448<xslt:with-param name="day" select="$day"/>
4449<xslt:with-param name="hour" select="$hour"/>
4450<xslt:with-param name="minute" select="$minute"/>
4451<xslt:with-param name="second" select="$second"/>
4452<xslt:with-param name="timezone" select="$timezone"/>
4453<xslt:with-param name="pattern" select="substring($pattern, 3)"/>
4454<xslt:with-param name="lang-id" select="$lang-id"/>
4455</xslt:call-template>
4456</xslt:when>
4457<xslt:otherwise>
4458<xslt:variable name="literal-value" select="substring-before(substring($pattern, 2), &quot;'&quot;)"/>
4459<xslt:value-of select="$literal-value"/>
4460<xslt:call-template name="date:_format-date">
4461<xslt:with-param name="year" select="$year"/>
4462<xslt:with-param name="month" select="$month"/>
4463<xslt:with-param name="day" select="$day"/>
4464<xslt:with-param name="hour" select="$hour"/>
4465<xslt:with-param name="minute" select="$minute"/>
4466<xslt:with-param name="second" select="$second"/>
4467<xslt:with-param name="timezone" select="$timezone"/>
4468<xslt:with-param name="pattern" select="substring($pattern, string-length($literal-value) + 2)"/>
4469<xslt:with-param name="lang-id" select="$lang-id"/>
4470</xslt:call-template>
4471</xslt:otherwise>
4472</xslt:choose>
4473</xslt:when>
4474<xslt:when test="not(contains('abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $char))">
4475<xslt:value-of select="$char"/>
4476<xslt:call-template name="date:_format-date">
4477<xslt:with-param name="year" select="$year"/>
4478<xslt:with-param name="month" select="$month"/>
4479<xslt:with-param name="day" select="$day"/>
4480<xslt:with-param name="hour" select="$hour"/>
4481<xslt:with-param name="minute" select="$minute"/>
4482<xslt:with-param name="second" select="$second"/>
4483<xslt:with-param name="timezone" select="$timezone"/>
4484<xslt:with-param name="pattern" select="substring($pattern, 2)"/>
4485<xslt:with-param name="lang-id" select="$lang-id"/>
4486</xslt:call-template>
4487</xslt:when>
4488<xslt:when test="not(contains('GyMdhHmsSEDFwWakKz', $char))">
4489<xslt:message>
4490              Invalid token in format string: <xslt:value-of select="$char"/></xslt:message>
4491<xslt:call-template name="date:_format-date">
4492<xslt:with-param name="year" select="$year"/>
4493<xslt:with-param name="month" select="$month"/>
4494<xslt:with-param name="day" select="$day"/>
4495<xslt:with-param name="hour" select="$hour"/>
4496<xslt:with-param name="minute" select="$minute"/>
4497<xslt:with-param name="second" select="$second"/>
4498<xslt:with-param name="timezone" select="$timezone"/>
4499<xslt:with-param name="pattern" select="substring($pattern, 2)"/>
4500<xslt:with-param name="lang-id" select="$lang-id"/>
4501</xslt:call-template>
4502</xslt:when>
4503<xslt:otherwise>
4504<xslt:variable name="next-different-char" select="substring(translate($pattern, $char, ''), 1, 1)"/>
4505<xslt:variable name="pattern-length">
4506<xslt:choose>
4507<xslt:when test="$next-different-char">
4508<xslt:value-of select="string-length(substring-before($pattern, $next-different-char))"/>
4509</xslt:when>
4510<xslt:otherwise>
4511<xslt:value-of select="string-length($pattern)"/>
4512</xslt:otherwise>
4513</xslt:choose>
4514</xslt:variable>
4515<xslt:choose>
4516<xslt:when test="$char = 'G'">
4517<xslt:choose>
4518<xslt:when test="string($year) = 'NaN'"/>
4519<xslt:when test="$year &gt; 0">AD</xslt:when>
4520<xslt:otherwise>BC</xslt:otherwise>
4521</xslt:choose>
4522</xslt:when>
4523<xslt:when test="$char = 'M'">
4524<xslt:choose>
4525<xslt:when test="string($month) = 'NaN'"/>
4526<xslt:when test="$pattern-length &gt;= 3">
4527<xslt:variable name="month-node">
4528<xslt:call-template name="date:_get-month">
4529<xslt:with-param name="month" select="number($month)"/>
4530<xslt:with-param name="lang-id" select="$lang-id"/>
4531</xslt:call-template>
4532</xslt:variable>
4533<xslt:choose>
4534<xslt:when test="$pattern-length &gt;= 4">
4535<xslt:value-of select="substring-before(normalize-space($month-node), ';')"/>
4536</xslt:when>
4537<xslt:otherwise>
4538<xslt:value-of select="substring-after(normalize-space($month-node), ';')"/>
4539</xslt:otherwise>
4540</xslt:choose>
4541</xslt:when>
4542<xslt:when test="$pattern-length = 2">
4543<xslt:value-of select="format-number($month, '00')"/>
4544</xslt:when>
4545<xslt:when test="$pattern-length = 1">
4546<xslt:value-of select="format-number($month, '0')"/>
4547</xslt:when>
4548<xslt:otherwise>
4549<xslt:value-of select="$month"/>
4550</xslt:otherwise>
4551</xslt:choose>
4552</xslt:when>
4553<xslt:when test="$char = 'E'">
4554<xslt:choose>
4555<xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
4556<xslt:otherwise>
4557<xslt:variable name="month-days">
4558<xslt:call-template name="date:_get-days-elapsed">
4559<xslt:with-param name="month" select="number($month)"/>
4560</xslt:call-template>
4561</xslt:variable>
4562<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)"/>
4563<xslt:variable name="y-1" select="$year - 1"/>
4564<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"/>
4565<xslt:variable name="day-node">
4566<xslt:call-template name="date:_get-day">
4567<xslt:with-param name="day" select="number($dow)"/>
4568<xslt:with-param name="lang-id" select="$lang-id"/>
4569</xslt:call-template>
4570</xslt:variable>
4571<xslt:choose>
4572<xslt:when test="$pattern-length &gt;= 4">
4573<xslt:value-of select="substring-before(normalize-space($day-node),';')"/>
4574</xslt:when>
4575<xslt:otherwise>
4576<xslt:value-of select="substring-after(normalize-space($day-node),';')"/>
4577</xslt:otherwise>
4578</xslt:choose>
4579</xslt:otherwise>
4580</xslt:choose>
4581</xslt:when>
4582<xslt:when test="$char = 'a'">
4583<xslt:choose>
4584<xslt:when test="string($hour) = 'NaN'"/>
4585<xslt:when test="$hour &gt;= 12">PM</xslt:when>
4586<xslt:otherwise>AM</xslt:otherwise>
4587</xslt:choose>
4588</xslt:when>
4589<xslt:when test="$char = 'z'">
4590<xslt:choose>
4591<xslt:when test="$timezone = 'Z'">UTC</xslt:when>
4592<xslt:otherwise>
4593                    UTC<xslt:value-of select="$timezone"/></xslt:otherwise>
4594</xslt:choose>
4595</xslt:when>
4596<xslt:otherwise>
4597<xslt:variable name="padding">
4598<xslt:choose>
4599<xslt:when test="$pattern-length &gt; 10">
4600<xslt:call-template name="str:padding">
4601<xslt:with-param name="length" select="$pattern-length"/>
4602<xslt:with-param name="chars" select="'0'"/>
4603</xslt:call-template>
4604</xslt:when>
4605<xslt:otherwise>
4606<xslt:value-of select="substring('0000000000', 1, $pattern-length)"/>
4607</xslt:otherwise>
4608</xslt:choose>
4609</xslt:variable>
4610<xslt:choose>
4611<xslt:when test="$char = 'y'">
4612<xslt:choose>
4613<xslt:when test="string($year) = 'NaN'"/>
4614<xslt:when test="$pattern-length &gt; 2">
4615<xslt:value-of select="format-number($year, $padding)"/>
4616</xslt:when>
4617<xslt:otherwise>
4618<xslt:value-of select="format-number(substring($year, string-length($year) - 1), $padding)"/>
4619</xslt:otherwise>
4620</xslt:choose>
4621</xslt:when>
4622<xslt:when test="$char = 'd'">
4623<xslt:choose>
4624<xslt:when test="string($day) = 'NaN'"/>
4625<xslt:otherwise>
4626<xslt:value-of select="format-number($day, $padding)"/>
4627</xslt:otherwise>
4628</xslt:choose>
4629</xslt:when>
4630<xslt:when test="$char = 'h'">
4631<xslt:variable name="h" select="$hour mod 12"/>
4632<xslt:choose>
4633<xslt:when test="string($hour) = 'NaN'"/>
4634<xslt:when test="$h">
4635<xslt:value-of select="format-number($h, $padding)"/>
4636</xslt:when>
4637<xslt:otherwise>
4638<xslt:value-of select="format-number(12, $padding)"/>
4639</xslt:otherwise>
4640</xslt:choose>
4641</xslt:when>
4642<xslt:when test="$char = 'H'">
4643<xslt:choose>
4644<xslt:when test="string($hour) = 'NaN'"/>
4645<xslt:otherwise>
4646<xslt:value-of select="format-number($hour, $padding)"/>
4647</xslt:otherwise>
4648</xslt:choose>
4649</xslt:when>
4650<xslt:when test="$char = 'k'">
4651<xslt:choose>
4652<xslt:when test="string($hour) = 'NaN'"/>
4653<xslt:when test="$hour">
4654<xslt:value-of select="format-number($hour, $padding)"/>
4655</xslt:when>
4656<xslt:otherwise>
4657<xslt:value-of select="format-number(24, $padding)"/>
4658</xslt:otherwise>
4659</xslt:choose>
4660</xslt:when>
4661<xslt:when test="$char = 'K'">
4662<xslt:choose>
4663<xslt:when test="string($hour) = 'NaN'"/>
4664<xslt:otherwise>
4665<xslt:value-of select="format-number($hour mod 12, $padding)"/>
4666</xslt:otherwise>
4667</xslt:choose>
4668</xslt:when>
4669<xslt:when test="$char = 'm'">
4670<xslt:choose>
4671<xslt:when test="string($minute) = 'NaN'"/>
4672<xslt:otherwise>
4673<xslt:value-of select="format-number($minute, $padding)"/>
4674</xslt:otherwise>
4675</xslt:choose>
4676</xslt:when>
4677<xslt:when test="$char = 's'">
4678<xslt:choose>
4679<xslt:when test="string($second) = 'NaN'"/>
4680<xslt:otherwise>
4681<xslt:value-of select="format-number($second, $padding)"/>
4682</xslt:otherwise>
4683</xslt:choose>
4684</xslt:when>
4685<xslt:when test="$char = 'S'">
4686<xslt:choose>
4687<xslt:when test="string($second) = 'NaN'"/>
4688<xslt:otherwise>
4689<xslt:value-of select="format-number(substring-after($second, '.'), $padding)"/>
4690</xslt:otherwise>
4691</xslt:choose>
4692</xslt:when>
4693<xslt:when test="$char = 'F'">
4694<xslt:choose>
4695<xslt:when test="string($day) = 'NaN'"/>
4696<xslt:otherwise>
4697<xslt:value-of select="floor($day div 7) + 1"/>
4698</xslt:otherwise>
4699</xslt:choose>
4700</xslt:when>
4701<xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
4702<xslt:otherwise>
4703<xslt:variable name="month-days">
4704<xslt:call-template name="date:_get-days-elapsed">
4705<xslt:with-param name="month" select="number($month)"/>
4706</xslt:call-template>
4707</xslt:variable>
4708<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)"/>
4709<xslt:choose>
4710<xslt:when test="$char = 'D'">
4711<xslt:value-of select="format-number($days, $padding)"/>
4712</xslt:when>
4713<xslt:when test="$char = 'w'">
4714<xslt:call-template name="date:_week-in-year">
4715<xslt:with-param name="days" select="$days"/>
4716<xslt:with-param name="year" select="$year"/>
4717</xslt:call-template>
4718</xslt:when>
4719<xslt:when test="$char = 'W'">
4720<xslt:variable name="y-1" select="$year - 1"/>
4721<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"/>
4722<xslt:choose>
4723<xslt:when test="($day - $day-of-week) mod 7">
4724<xslt:value-of select="floor(($day - $day-of-week) div 7) + 2"/>
4725</xslt:when>
4726<xslt:otherwise>
4727<xslt:value-of select="floor(($day - $day-of-week) div 7) + 1"/>
4728</xslt:otherwise>
4729</xslt:choose>
4730</xslt:when>
4731</xslt:choose>
4732</xslt:otherwise>
4733</xslt:choose>
4734</xslt:otherwise>
4735</xslt:choose>
4736<xslt:call-template name="date:_format-date">
4737<xslt:with-param name="year" select="$year"/>
4738<xslt:with-param name="month" select="$month"/>
4739<xslt:with-param name="day" select="$day"/>
4740<xslt:with-param name="hour" select="$hour"/>
4741<xslt:with-param name="minute" select="$minute"/>
4742<xslt:with-param name="second" select="$second"/>
4743<xslt:with-param name="timezone" select="$timezone"/>
4744<xslt:with-param name="pattern" select="substring($pattern, $pattern-length + 1)"/>
4745<xslt:with-param name="lang-id" select="$lang-id"/>
4746</xslt:call-template>
4747</xslt:otherwise>
4748</xslt:choose>
4749</xslt:template>
4750<xslt:template name="date:_week-in-year">
4751<xslt:param name="days"/>
4752<xslt:param name="year"/>
4753<xslt:variable name="y-1" select="$year - 1"/>
4754<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"/>
4755<xslt:variable name="dow">
4756<xslt:choose>
4757<xslt:when test="$day-of-week">
4758<xslt:value-of select="$day-of-week"/>
4759</xslt:when>
4760<xslt:otherwise>7</xslt:otherwise>
4761</xslt:choose>
4762</xslt:variable>
4763<xslt:variable name="start-day" select="($days - $dow + 7) mod 7"/>
4764<xslt:variable name="week-number" select="floor(($days - $dow + 7) div 7)"/>
4765<xslt:choose>
4766<xslt:when test="$start-day &gt;= 4">
4767<xslt:value-of select="$week-number + 1"/>
4768</xslt:when>
4769<xslt:otherwise>
4770<xslt:choose>
4771<xslt:when test="not($week-number)">
4772<xslt:call-template name="date:_week-in-year">
4773<xslt:with-param name="days" select="365 + ((not($y-1 mod 4) and $y-1 mod 100) or not($y-1 mod 400))"/>
4774<xslt:with-param name="year" select="$y-1"/>
4775</xslt:call-template>
4776</xslt:when>
4777<xslt:otherwise>
4778<xslt:value-of select="$week-number"/>
4779</xslt:otherwise>
4780</xslt:choose>
4781</xslt:otherwise>
4782</xslt:choose>
4783</xslt:template>
4784<!-- ========================= END OF STYLESHEET ========================= -->
4785</xslt:stylesheet>
Note: See TracBrowser for help on using the browser.