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

Revision 150, 208.2 kB (checked in by yaolu, 13 years ago)

Created a pdf sample report, and done some changes on the xml for the html report, according to comments from energistics

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