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

Revision 159, 205.0 kB (checked in by yaolu, 13 years ago)

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

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